tmcmanus Posted March 2, 2012 Share Posted March 2, 2012 Hey guys, I'm looking to change anything with a price of "$0" to the text "FREE" and add a class to the text such as <span class="free">FREE</span> I looked eveywhere for this and was surprised to see nobody seems to have asked for this yet (at least that I saw). If this has been addressed elsewhere my apologies. I'm new to the forums and prestashop for that matter. Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted March 2, 2012 Share Posted March 2, 2012 take a look at THIS post. Link to comment Share on other sites More sharing options...
tmcmanus Posted March 13, 2012 Author Share Posted March 13, 2012 Well just tried the solution on that page and found it seems to be out of date. It doesn't seem to work anymore. Anyone have any suggestions? Link to comment Share on other sites More sharing options...
tmcmanus Posted March 13, 2012 Author Share Posted March 13, 2012 Figured it out... modifying the code from the link you gave me elpatron In product list.tpl there was code: {displayWtPrice p=$product.price} which I changed to: {if $product.price == 0}{l s='FREE'}{else}{displayWtPrice p=$product.price}{/if} 1 Link to comment Share on other sites More sharing options...
CartExpert.net Posted March 13, 2012 Share Posted March 13, 2012 Hello, you should change the script in product.tpl if you want to have 'FREE' displayed on the product info pages too. 1 Link to comment Share on other sites More sharing options...
poncho_333 Posted January 30, 2013 Share Posted January 30, 2013 Hi all, After days of attempts I succeeded it but only in one language. it is not in the ordering process (Basket of 1-5 pages) and in the main page (I guess it uses the file "product-list.tpl" too) if anyone knows how to make this another changes please say it. I write the code to change "0.00" to "Free" on the product page: In file "product.tpl" of your theme (line 383): Original code: <p class="our_price_display"> {if $priceDisplay >= 0 && $priceDisplay <= 2 <span id="our_price_display">{convertPrice price=$productPrice}</span> <!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if}--> {/if} </p> And the solution code: <p class="our_price_display"> {if $priceDisplay >= 0 && $priceDisplay <= 2 and $productPrice neq 0} <span id="our_price_display">{convertPrice price=$productPrice}</span> <!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if}--> {else} Free {/if} </p> My PS version is 1.5.3.1 Link to comment Share on other sites More sharing options...
PascalVG Posted February 1, 2013 Share Posted February 1, 2013 {l s=' Free'} Link to comment Share on other sites More sharing options...
laserking123 Posted January 19, 2014 Share Posted January 19, 2014 where and what to do this in shopping-cart.tpl. So it also say this in the checkout ??? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now