hurray Posted June 21, 2010 Share Posted June 21, 2010 I would like to know how I can add a line saying "Free Shipping" right next to the price on product detail page. Link to comment Share on other sites More sharing options...
Kaihaku Posted June 21, 2010 Share Posted June 21, 2010 Same idea as last time you asked, just edit product.tpl. Link to comment Share on other sites More sharing options...
hurray Posted June 21, 2010 Author Share Posted June 21, 2010 Thank you. I just did not know what file. By the way, how do you find out what file the code resides in? I have installed Firebug but am having hard time with it.Thanks Link to comment Share on other sites More sharing options...
hurray Posted June 21, 2010 Author Share Posted June 21, 2010 Hi ElderDepot, I cannot figure out exactly after which code or codes in product.tpl, I would need to add "Free Shipping."Can you please help? Link to comment Share on other sites More sharing options...
Kaihaku Posted June 25, 2010 Share Posted June 25, 2010 This is how you can find code segments in tpl files.1) Find text that appears near what you're looking for. It has to be text stored in the code, not the database. In this instance I used "tax incl."2) Open all tpl files in Notepad++.3) Search for the word, "tax incl.", and then hit the button.4) Sort through the results until you find one that looks right. <!-- prices --> {if $product->on_sale} {l s='On sale!'} {elseif ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {l s='Price lowered!'} {/if} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPrice(true, $smarty.const.NULL)} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {if $priceDisplay == 2} {convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {if !$priceDisplay || $priceDisplay == 2} {convertPrice price=$product->getPriceWithoutReduct()} {if $tax_enabled}{l s='tax incl.'}{/if} {/if} {if $priceDisplay == 1} {convertPrice price=$product->getPriceWithoutReduct(true)} {if $tax_enabled}{l s='tax excl.'}{/if} {/if} {/if} {if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))} {l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'} {/if} {if $packItems|@count} {l s='instead of'} {convertPrice price=$product->getNoPackPrice()} {/if} {if $product->ecotax != 0} {l s='include'} {convertPrice price=$product->ecotax} {l s='for green tax'} {/if} {if isset($groups)} I'd recommend adding "This Item qualifies for Free Shipping" either before the pricing or just after the 'ecotax' and 'pack count'.If you want to make it conditional, you can try something like... {if $free_ship > price} {l s='This Item qualifies for Free Shipping!'} {/if} Though, forewarning, I don't know Smarty, I'm not all that familiar with PrestaShop's variables, and I haven't tried that. Link to comment Share on other sites More sharing options...
abilas Posted August 20, 2010 Share Posted August 20, 2010 Dont forget to use translations in the backend (Tools | Translations), only available in ps 1.3+ Link to comment Share on other sites More sharing options...
Recommended Posts