Jump to content

Adding Images In Price Section of products Help Needed.?


Recommended Posts

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 by capbat (see edit history)
Link to comment
Share on other sites

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

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 by ezakimak (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...