<?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; shipping</title>
	<atom:link href="http://nemops.com/tag/shipping/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>Set the order status to Shipped when adding a tracking code in Prestashop</title>
		<link>http://nemops.com/prestashop-order-status-shipped-tracking/</link>
		<comments>http://nemops.com/prestashop-order-status-shipped-tracking/#comments</comments>
		<pubDate>Mon, 01 Jun 2015 09:34:34 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[orders]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[shipping]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2435</guid>
		<description><![CDATA[<p>This little trick will save you the time of having to manually change the order status when you add a tracking number for orders, in the Prestashop Back Office. Before proceeding, be aware that this method is not ideal in case you are offering multi shipping (that is, if the same order is associated to [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-order-status-shipped-tracking/">Set the order status to Shipped when adding a tracking code in Prestashop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>This little trick will save you the time of having to manually change the order status when you add a tracking number for orders, in the Prestashop Back Office.</p>
<p><span id="more-2435"></span></p>
<p>Before proceeding, be aware that this method is not ideal in case you are offering multi shipping (that is, if the same order is associated to multiple carriers and tracking numbers), as it would be set to shipped even if not all of the items have been.</p>
<p>That said, open up <strong>AdminOrdersController.php</strong> located in the <em>controllers/admin</em> folder. Locate the following:</p>
<pre class="brush: php; title: ; notranslate">
if (Tools::isSubmit('submitShippingNumber') &amp;&amp; isset($order))
		{
			..
</pre>
<p>Inside this conditional, we are going to plug in our code, and the ideal spot for it would be right before</p>
<pre class="brush: php; title: ; notranslate">
// Send mail to customer
	$customer = new Customer((int)$order-&gt;id_customer);
	$carrier = new Carrier((int)$order-&gt;id_carrier, $order-&gt;id_lang);
</pre>
<p>As at this point the tracking number has already been set. Therefore, let&#8217;s start by adding some lines of code (my line is around 465, in Prestashop 1.6.0.14:)</p>
<pre class="brush: php; title: ; notranslate">

$shipped_status = Configuration::get('PS_OS_SHIPPING');
if($order-&gt;current_state != $shipped_status &amp;&amp; $order-&gt;current_state != Configuration::get('PS_OS_CANCELED'))
{
	// todo
}

</pre>
<p><strong>Explanation:</strong> First, we are grabbing the shipped status from the database configuration, then we check that the current order has not been shipped already (it would be redundant to add another identical status!). We also make sure it&#8217;s not canceled, to avoid any conflict if we accidentally (or necessarily) update the tracking after canceling an order</p>
<p> Inside our new condition, add</p>
<pre class="brush: php; title: ; notranslate">
	$history = new OrderHistory();
	$history-&gt;id_order = $order-&gt;id;
	$history-&gt;id_employee = (int)$this-&gt;context-&gt;employee-&gt;id;

	$history-&gt;changeIdOrderState((int)$shipped_status, $order);
 </pre>
<p> So that we effectively modify the status. Now that the order is changed, we can do two things: sending an extra email to the customer (For the &#8220;shipped&#8221; status) and updating stock in case we use advanced stock management.</p>
<pre class="brush: php; title: ; notranslate">
	$carrier = new Carrier($order-&gt;id_carrier, $order-&gt;id_lang);
	$templateVars = array();
	if ($order-&gt;shipping_number)
		$templateVars = array('{followup}' =&gt; str_replace('@', $order-&gt;shipping_number, $carrier-&gt;url));

	if ($history-&gt;addWithemail(true, $templateVars))
	{
		if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
			foreach ($order-&gt;getProducts() as $product)
				if (StockAvailable::dependsOnStock($product['product_id']))
					StockAvailable::synchronize($product['product_id'], (int)$product['id_shop']);
	}	
 </pre>
<p> Bear in mind that, if you don&#8217;t want to send out any email, you migh as well just paste in the last part:</p>
<pre class="brush: php; title: ; notranslate">

 	if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
			foreach ($order-&gt;getProducts() as $product)
				if (StockAvailable::dependsOnStock($product['product_id']))
					StockAvailable::synchronize($product['product_id'], (int)$product['id_shop']);
 </pre>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-order-status-shipped-tracking/">Set the order status to Shipped when adding a tracking code in Prestashop</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-order-status-shipped-tracking/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Prestashop 101 Day 7: Prestashop Shipping, Zones and Countries</title>
		<link>http://nemops.com/prestashop-shipping-zones-countries/</link>
		<comments>http://nemops.com/prestashop-shipping-zones-countries/#comments</comments>
		<pubDate>Wed, 03 Sep 2014 19:24:35 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[countries]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 101]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=895</guid>
		<description><![CDATA[<p>Nobody would ever start a shop without having setup shipping options, right? Today, we will have a look at how to setup Prestashop shipping and carriers, and why Zones and Countries are useful for this. Running Time: 17mins / 13 mins Watch the screencast &#8211; 1.6 version Watch the screencast &#8211; 1.5 version &#160; All [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-shipping-zones-countries/">Prestashop 101 Day 7: Prestashop Shipping, Zones and Countries</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Nobody would ever start a shop without having setup shipping options, right? Today, we will have a look at how to setup Prestashop shipping and carriers, and why Zones and Countries are useful for this.<span id="more-895"></span></p>
<ul>
<li><strong><span style="line-height: 14px;">Running Time: </span></strong><span style="line-height: 14px;">17mins / 13 mins</span></li>
</ul>
<h2>Watch the screencast &#8211; 1.6 version</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/QFLFWSoJu5w" 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>Watch the screencast &#8211; 1.5 version</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/qtzGZRHKAhs" 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>
<h3>All series&#8217; lessons</h3>
<h3>Prestashop 1.6</h3>
<ul><li><a href="http://nemops.com/prestashop-101-day-1-installing-prestashop" title="Prestashop 101 Day 1 – Introducing and installing Prestashop">Prestashop 101 Day 1 – Introducing and installing Prestashop</a></li><li><a href="http://nemops.com/prestashop-101-prestashop-configuration" title="Prestashop 101 Day 2 – Basic Prestashop Configuration">Prestashop 101 Day 2 – Basic Prestashop Configuration</a></li><li><a href="http://nemops.com/prestashop-categories-and-products" title="Prestashop 101 Day 3 – Prestashop categories and products">Prestashop 101 Day 3 – Prestashop categories and products</a></li><li><a href="http://nemops.com/prestashop-attributes" title="Prestashop 101 Day 4 – Prestashop attributes combinations">Prestashop 101 Day 4 – Prestashop attributes combinations</a></li><li><a href="http://nemops.com/prestashop-upgrade" title="Prestashop 101 Day 5 – Prestashop Upgrade">Prestashop 101 Day 5 – Prestashop Upgrade</a></li><li><a href="http://nemops.com/prestashop-modules" title="Prestashop 101 Day 6 – Prestashop Modules">Prestashop 101 Day 6 – Prestashop Modules</a></li><li>Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries</li><li><a href="http://nemops.com/prestashop-payments-currencies-taxes" title="Prestashop 101 Day 8 – Taxes, Currencies, Payments">Prestashop 101 Day 8 – Taxes, Currencies, Payments</a></li><li><a href="http://nemops.com/order-management" title="Prestashop 101 Day 9 – Order Management">Prestashop 101 Day 9 – Order Management</a></li><li><a href="http://nemops.com/prestashop-customers" title="Prestashop 101 Day 10 – Prestashop Customers">Prestashop 101 Day 10 – Prestashop Customers</a></li><li><a href="http://nemops.com/prestashop-discounts-cart-rules" title="Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)">Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)</a></li></ul>
<h3>Prestashop 1.5</h3>
<ul><li><a href="http://nemops.com/prestashop-101-day-1-installing-prestashop" title="Prestashop 101 Day 1 – Introducing and installing Prestashop">Prestashop 101 Day 1 – Introducing and installing Prestashop</a></li><li><a href="http://nemops.com/prestashop-101-prestashop-configuration" title="Prestashop 101 Day 2 – Basic Prestashop Configuration">Prestashop 101 Day 2 – Basic Prestashop Configuration</a></li><li><a href="http://nemops.com/prestashop-categories-and-products" title="Prestashop 101 Day 3 – Prestashop categories and products">Prestashop 101 Day 3 – Prestashop categories and products</a></li><li><a href="http://nemops.com/prestashop-attributes" title="Prestashop 101 Day 4 – Prestashop attributes combinations">Prestashop 101 Day 4 – Prestashop attributes combinations</a></li><li><a href="http://nemops.com/prestashop-upgrade" title="Prestashop 101 Day 5 – Prestashop Upgrade">Prestashop 101 Day 5 – Prestashop Upgrade</a></li><li><a href="http://nemops.com/prestashop-modules" title="Prestashop 101 Day 6 – Prestashop Modules">Prestashop 101 Day 6 – Prestashop Modules</a></li><li>Prestashop 101 Day 7 – Prestashop Shipping, Zones and Countries</li><li><a href="http://nemops.com/prestashop-payments-currencies-taxes" title="Prestashop 101 Day 8 – Taxes, Currencies, Payments">Prestashop 101 Day 8 – Taxes, Currencies, Payments</a></li><li><a href="http://nemops.com/order-management" title="Prestashop 101 Day 9 – Order Management">Prestashop 101 Day 9 – Order Management</a></li><li><a href="http://nemops.com/prestashop-customers" title="Prestashop 101 Day 10 – Prestashop Customers">Prestashop 101 Day 10 – Prestashop Customers</a></li><li><a href="http://nemops.com/prestashop-discounts-cart-rules" title="Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)">Prestashop 101 Day 11 – Prestashop Discounts (Cart rules)</a></li><li><a href="http://nemops.com/prestashop-themes" title="Prestashop 101 Day 12 – Prestashop Themes and visual tweaks">Prestashop 101 Day 12 – Prestashop Themes and visual tweaks</a></li><li><a href="http://nemops.com/prestashop-cms" title="Prestashop 101 Day 13 – Prestashop CMS">Prestashop 101 Day 13 – Prestashop CMS</a></li><li><a href="http://nemops.com/prestashop-seo-and-preferences" title="Prestashop 101 Day 14 – Prestashop SEO and Preferences">Prestashop 101 Day 14 – Prestashop SEO and Preferences</a></li><li><a href="http://nemops.com/prestashop-multistore" title="Prestashop 101 Day 15 – Prestashop Multistore">Prestashop 101 Day 15 – Prestashop Multistore</a></li><li><a href="http://nemops.com/prestashop-employees-and-languages/#.U2f_LPna6r0" title="Prestashop 101 Day 16 – Employees and Languages">Prestashop 101 Day 16 – Employees and Languages</a></li></ul>
<div class="separator"></div>
<p>&nbsp;</p>
<h3>Additional Resources</h3>
<ul>
<li><a title="More about Prestashop Shipping at Prestashop Docs" href="http://doc.prestashop.com/display/PS15/Managing+Shipping">More about Prestashop Shipping at Prestashop Docs</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-shipping-zones-countries/">Prestashop 101 Day 7: Prestashop Shipping, Zones and Countries</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-shipping-zones-countries/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Prestashop 1.5.5 : The new Carrier Creation Wizard</title>
		<link>http://nemops.com/prestashop-carrier-creation-wizard/</link>
		<comments>http://nemops.com/prestashop-carrier-creation-wizard/#comments</comments>
		<pubDate>Mon, 02 Sep 2013 10:25:39 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[carriers]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=1526</guid>
		<description><![CDATA[<p>Prestashop 1.5.5 came out last week with a nice tasty addition: a carrier Creation wizard that finally gets rid of the confusing old carrier creation process! Let&#8217;s have a first look at it! Watch The Screencast &#160;</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-carrier-creation-wizard/">Prestashop 1.5.5 : The new Carrier Creation Wizard</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Prestashop 1.5.5 came out last week with a nice tasty addition: a carrier Creation wizard that finally gets rid of the confusing old carrier creation process! Let&#8217;s have a first look at it!</p>
<p><span id="more-1526"></span></p>
<h2>Watch The Screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/dYR4jOW_VQY" 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>The post <a rel="nofollow" href="http://nemops.com/prestashop-carrier-creation-wizard/">Prestashop 1.5.5 : The new Carrier Creation Wizard</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-carrier-creation-wizard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: hide shipping cost for non registered users</title>
		<link>http://nemops.com/hide-shipping-cost/</link>
		<comments>http://nemops.com/hide-shipping-cost/#comments</comments>
		<pubDate>Tue, 06 Aug 2013 10:54:47 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[cart]]></category>
		<category><![CDATA[shipping]]></category>
		<category><![CDATA[visitors]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=1458</guid>
		<description><![CDATA[<p>In this quick tip, we will see how to hide the shipping cost, or misleading free shipping label for non-registered customers. Watch The Screencast (text below) &#160; &#160; Hide shipping cost for non registered users You might have come across this issue if you setup zones so that carriers have a different price depending on [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/hide-shipping-cost/">Quick Tip: hide shipping cost for non registered users</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this quick tip, we will see how to hide the shipping cost, or misleading free shipping label for non-registered customers.</p>
<p><span id="more-1458"></span></p>
<h2>Watch The Screencast (text below)</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/6CvOzUZ_SP4" 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>
<div class="separator"></div>
<p>&nbsp;</p>
<h2>Hide shipping cost for non registered users</h2>
<p>You might have come across this issue if you setup zones so that carriers have a different price depending on the customer’s address: a default shipping price, or even worse a free shipping label is shown for everybody who has not login yet.</p>
<p>This can be misleading at times, and some of your customers will definitely get angry if the price rises after adding shipping address details. Moreover, we do not want this.</p>
<p>First, let’s disable our carrier (remember to do it for all carriers if you use many) for visitors in the back office. Go to Shipping -> Carriers and click on a carrier. Then, disable it for visitors.</p>
<p><img src="http://nemops.com/wp-content/uploads/2013/08/disablecarrier.png" alt="Disable carrier for visitors" width="521" height="495" class="alignnone size-full wp-image-1461" /></p>
<p>You can also do it for guests if you disabled the guest checkout.</p>
<p>Refresh and see it says free shipping! This is even more misleading but now we can target that label and still have the total match the products total price.</p>
<p>Let’s go to <em>modules/blockcart</em> and copy <strong>blockcart.tpl</strong> in the theme folder <em>modules/blockcart</em>. Open it and locate the second script block:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;script type=&quot;text/javascript&quot;&gt;
var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}';
var removingLinkText = '{l s='Please remove this product from my cart.' mod='blockcart' js=1}';
var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
&lt;/script&gt;

</pre>
<p>See where it reads free shipping? We need to change the block as follows</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;script type=&quot;text/javascript&quot;&gt;
var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}';
var removingLinkText = '{l s='Please remove this product from my cart.' mod='blockcart' js=1}';

var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
var delete_txt = '{l s='Delete' mod='blockcart' js=1}';

//&lt;![CDATA[[

	{if !$logged AND !$cart-&gt;id_customer}
		var freeShippingTranslation = '{l s='Login to see the shipping cost!' mod='blockcart' js=1}';		
	{else}
		var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
	{/if}

//]]&gt;
&lt;/script&gt;

</pre>
<p>As you can see, we removed the free shipping text and added it below. We used a small trick to target the unregistered customer. So, <strong>If the customer is not logged in, nor has added any shipping information</strong> (that is, no customer id exists for him), then show a different text. Else, it is okay to display the free shipping label.</p>
<p>It looks a bit ugly now, because the cart block is still displaying the shipping label. Let’s hide that as well! Locate the following at about line 154 of the same file:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
&lt;span&gt;{l s='Shipping' mod='blockcart'}&lt;/span&gt;
</pre>
<p>And change it the following way</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{if $logged OR $cart-&gt;id_customer}
	&lt;span&gt;{l s='Shipping' mod='blockcart'}&lt;/span&gt;
{/if}	
</pre>
<p>This time, the text will only be shown if the customer is logged or has already added shipping information.</p>
<p>As a finishing touch, we can add the little information to <strong>shopping cart.tpl</strong> as well (you can find it in the theme folder once again). Locate this:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;tr class=&quot;cart_total_delivery&quot; style=&quot;{if !isset($carrier-&gt;id) || is_null($carrier-&gt;id)}display:none;{/if}&quot;&gt;
	&lt;td colspan=&quot;5&quot;&gt;{l s='Shipping'}&lt;/td&gt;
	&lt;td colspan=&quot;2&quot; class=&quot;price&quot; id=&quot;total_shipping&quot;&gt;{l s='Free Shipping!'}&lt;/td&gt;
&lt;/tr&gt;


</pre>
<p>And change it this way</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
&lt;tr class=&quot;cart_total_delivery&quot;&gt;
	&lt;td colspan=&quot;5&quot;&gt;{l s='Shipping'}&lt;/td&gt;
	&lt;td colspan=&quot;2&quot; class=&quot;price&quot; id=&quot;total_shipping&quot;&gt;
		
		{if !$logged AND !$cart-&gt;id_customer}
			{l s='Login for the correct price'}
		{else}
			{l s='Free Shipping!'}
		{/if}
		

	&lt;/td&gt;
&lt;/tr&gt;
</pre>
<p>Note that other than adding the same condition as before, we also removed the display:none style. There is a little downside to this, as that block will always be shown, even if there are no carriers available for the destination. However, this won&#8217;t happen if you setup zones, countries and states the correct way.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/hide-shipping-cost/">Quick Tip: hide shipping cost for non registered users</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/hide-shipping-cost/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
