<?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; visitors</title>
	<atom:link href="http://nemops.com/tag/visitors/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>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>
