Jump to content

How to do?ON SALE icon and old price in homefeatured and product list page


Vaidas

Recommended Posts

  • 3 weeks later...
Hello, i'd search in forume but have not found the right decision how to put on sale icon and old price in homefeatured and product list page. Now on sale icon and old price is only in product page.
Can any body help?


I would like to know the answer to this, too. does make no sense to have something featured on the first page and then not show sale or specials.

phil
Link to comment
Share on other sites

To add the "On sale" image to product-list.tpl, change lines 12-13 of product-list.tpl from:

{if $product.on_sale}
{l s='On sale!'}



to:

{if $product.on_sale}
   <img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
{l s='On sale!'}

Link to comment
Share on other sites

  • 1 month later...
To add the "On sale" image to product-list.tpl, change lines 12-13 of product-list.tpl from:

{if $product.on_sale}
{l s='On sale!'}



to:

{if $product.on_sale}
   <img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/>
{l s='On sale!'}



Thank you so much for your help! Now, I have one problem. My onsale icon is too big, it fits the whole product image. How can i fix that? The image size should be like 50px in width and height. I see no size attributes in the global.css, there´s only one option "float:left". It seems like that its controlled by the height and width attributes of the following line in global.css:
#center_column .categorie_product img

But this also controls the product images. Thank you so much in advance!

(This is a 50px test Image, it says "new" but of course it should say something like "sale" or similar in german)

40412_NoxSJnn3UTZOYbdbntDj_t

Link to comment
Share on other sites

You just need to make a version for every language FX


onsale_de.gif
onsale_gb.gif
onsale_da.gif


Thank you for your quick response! I copied the onsale_en.gif and called it onsale_de.gif. But its the same problem. The image is stretched (screenshot attached). I use the matrice theme, maybe the author made some changes in the code. Ive never had an onsale icon in the product description for exemple. my product-list.tpl:
         {if $product.on_sale}

{l s='On sale!'}...



and my global.css:

  #primary_block form#buy_block img.on_sale_img{float:left;} 



Thank you for any help!

40414_CRagiWgld1mytLWqlBYP_t

Link to comment
Share on other sites

It has something to do with the modded product-list.tpl from the matrice theme!
I copied the standard product-list.tpl from the prestashop theme, then I added the code above. Now the onsale icon appears normal (original size).
I have to figure it out for myself. Thank you guys

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...