<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NemoPS &#187; stock</title>
	<atom:link href="http://nemops.com/tag/stock/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Automatically remove Out of Stock products from the Prestashop Cart</title>
		<link>http://nemops.com/auto-remove-products-prestashop-cart/</link>
		<comments>http://nemops.com/auto-remove-products-prestashop-cart/#comments</comments>
		<pubDate>Wed, 22 Apr 2015 12:38:23 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[stock]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2384</guid>
		<description><![CDATA[<p>In this video tutorial we will see how to automatically remove out of stock products from the Prestashop cart, and display a message about it as well. Watch the screencast Steps Breakdown File: modules/blockcart/blockcart.php Around line 64, change: To Around line 133, add the following to the Smarty assign: File: themes/default-bootstrap/modules/blockcart/blockcart.tpl Add the following at [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/auto-remove-products-prestashop-cart/">Automatically remove Out of Stock products from the Prestashop Cart</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this video tutorial we will see how to automatically remove out of stock products from the Prestashop cart, and display a message about it as well.<br />
<span id="more-2384"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/Dq2J0vqGA-A" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2>Steps Breakdown</h2>
<p><strong>File: modules/blockcart/blockcart.php</strong></p>
<p>Around line 64, change:</p>
<pre class="brush: php; title: ; notranslate">
		$nbTotalProducts = 0;
		foreach ($products as $pk =&gt; $product)
		{
			$nbTotalProducts += (int)$product['cart_quantity'];
		}
</pre>
<p>To</p>
<pre class="brush: php; title: ; notranslate">
		$nbTotalProducts = 0;
		$removed = array();
		foreach ($products as $pk =&gt; $product)
		{
			if($product['quantity_available'] &lt;= 0 &amp;&amp; !Product::isAvailableWhenOutOfStock($product['out_of_stock']))
			{
				$this-&gt;context-&gt;cart-&gt;deleteProduct($product['id_product'],$product['id_product_attribute'], $product['id_customization'], $product['id_address_delivery']);
				$removed[] = $product['name'];
				unset($product[$pk]);
				continue;
			}
			$nbTotalProducts += (int)$product['cart_quantity'];
		}
</pre>
<p>Around line 133, add the following to the Smarty assign:</p>
<pre class="brush: php; title: ; notranslate">
			'removed_products' =&gt; $removed,
			'cart_qties' =&gt; (int)$this-&gt;context-&gt;cart-&gt;nbProducts(),
</pre>
<p><strong>File: themes/default-bootstrap/modules/blockcart/blockcart.tpl</strong><br />
Add the following at the very beginning</p>
<pre class="brush: php; title: ; notranslate">
&lt;script&gt;
{if $removed_products}
	var removed_products = new Array();
	{foreach from=$removed_products item=prd}
		removed_products.push('{$prd}');
	{/foreach}
	var products_string = removed_products.join(', ');
	alert(&quot;{l s='The following products have been removed from your cart as they are out of stock:' mod='blockcart'}&quot; + products_string);
{/if}
&lt;/script&gt;

</pre>
<p>The post <a rel="nofollow" href="http://nemops.com/auto-remove-products-prestashop-cart/">Automatically remove Out of Stock products from the Prestashop Cart</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/auto-remove-products-prestashop-cart/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Prestashop Advanced Stock Management Overview</title>
		<link>http://nemops.com/prestashop-advanced-stock-management/</link>
		<comments>http://nemops.com/prestashop-advanced-stock-management/#comments</comments>
		<pubDate>Tue, 28 Jan 2014 13:31:13 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[stock]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=1835</guid>
		<description><![CDATA[<p>In this video we will go through the process of setting up Advanced stock management in Prestashop Additional Resources</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-advanced-stock-management/">Prestashop Advanced Stock Management Overview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this video we will go through the process of setting up Advanced stock management in Prestashop</p>
<p><span id="more-1835"></span><br />

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/jotveLMu5gY" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div></p>
<h3>Additional Resources</h3>
<ul>
<li><a title="Prestashop Doc: Advanced Stock Management" rel="nofollow href="http://doc.prestashop.com/display/PS15/Advanced+Stock+Management#AdvancedStockManagement-Managementrules">Prestashop Doc: Advanced Stock Management</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-advanced-stock-management/">Prestashop Advanced Stock Management Overview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-advanced-stock-management/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
