capbat Posted July 18, 2012 Share Posted July 18, 2012 (edited) Hi all I have previously ask the same question here but did not get any satisfying answer. I will try here to be more precise. I would like to automaticly add an image, (actually a free shipping logo) to all items. More precisly in the box that presents the price, Reference, Quantity and where it offers us the "Add to Cart" or "Add to Wishlist" buttons. This box is presented when we view a product. I would simply want to add a logo there. But I am not familiare with programming and I know I would have to modify the product.tpl of my theme, but I don't know exactly how. I would appreciate your help. Bat Edited July 18, 2012 by capbat (see edit history) Link to comment Share on other sites More sharing options...
rogerwee Posted July 19, 2012 Share Posted July 19, 2012 Hi Bat, In your product.tpl (themes/<themename>/product.tpl), you should be able to insert your image (<img src="file/path/to/image.jpg"/>) before or after these <p></p> tags, this may vary depending on what your theme looks like, but on the default prestashop theme its around lines 337. <!-- availability --> <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <span id="availability_label">{l s='Availability:'}</span> <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}> {if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if} </span> </p> <!-- number of item in stock --> {if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)} <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> <span id="quantityAvailable">{$product->quantity|intval}</span> <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span> </p> {/if} Link to comment Share on other sites More sharing options...
capbat Posted July 20, 2012 Author Share Posted July 20, 2012 Thanks Roger I will try it out. Just to complicate things would it be possible to put one image in one language and another in a different language^ Tks. Bat Link to comment Share on other sites More sharing options...
rogerwee Posted July 24, 2012 Share Posted July 24, 2012 Not entirely sure to be honest. I did find this thread though. http://prestaportal.com/thread-657.html Hope this sheds some light. Link to comment Share on other sites More sharing options...
ezakimak Posted July 24, 2012 Share Posted July 24, 2012 (edited) in your product tamplate use $lang_iso attribute to build the image file name like : <img src="file/path/to/{$lang_iso}-image.jpg"/.... I think that will do the job. ps. of course you will have to provide the images for each language Thanks Roger I will try it out. Just to complicate things would it be possible to put one image in one language and another in a different language^ Tks. Bat Edited July 24, 2012 by ezakimak (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts