Jump to content

Out of stock - Image overlay


tilljonasbn

Recommended Posts

  • 4 weeks later...
  • 4 weeks later...

The way I did it was to add this code to “product.tmp” around line 146 right after <div id="pb-left-column">

Add this code:

<center>{if $product->quantity == 0}<img class="sold_out_float" src="{$img_dir}/sold_stamp.png" />{/if}</center>

 

Just change the image name. Mine was sold_stamp.png.

 

stamp_overlay.png

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

The way I did it was to add this code to “product.tmp” around line 146 right after <div id="pb-left-column">

Add this code:

<center>{if $product->quantity == 0}<img class="sold_out_float" src="{$img_dir}/sold_stamp.png" />{/if}</center>

 

Just change the image name. Mine was sold_stamp.png.

 

stamp_overlay.png

 

hello, my "Sold out" image only shows when I enter the product, but I need it to show only on the small preview image (on the categories pages) like the "NEW" icon of prestashop

 

PS: see http://www.net-a-porter.com/Shop/Whats-New?level3Filter=&pn=1&npp=view_all&image_view=product&dScroll=0

Edited by lipo83 (see edit history)
Link to comment
Share on other sites

  • 1 year later...

You can use joenmass his code, but instead of adding this code to product.tpl you can use it on product-list.tpl

Just edit the image in your css file and you are good to go.

 

Thanks for the reply. Yes I did something like that and it is working on my product pages but it is not working on my homepage for the new products module  and most sold module.

Any Idea how to fix that? Here is the problem described more detailed: https://www.prestashop.com/forums/topic/323879-mark-few-products-as-sold/?p=1955319

Link to comment
Share on other sites

Because the homepage is most likely the featured block.

You can add the above code the same way as you did for product and product-list templates.

But this time you have to do it in the template for the featured block.

 

Anyway, it has to be a block that has been activated or used inside your homepage.

You can check this out by going to modules --> position and look for the "displayHome" section.

In here should be a block that will preview the articles on your homepage. Now you know which block or module should be altered.

 

Let me know if this fixed your problem

Link to comment
Share on other sites

Because the homepage is most likely the featured block.

You can add the above code the same way as you did for product and product-list templates.

But this time you have to do it in the template for the featured block.

 

Anyway, it has to be a block that has been activated or used inside your homepage.

You can check this out by going to modules --> position and look for the "displayHome" section.

In here should be a block that will preview the articles on your homepage. Now you know which block or module should be altered.

 

Let me know if this fixed your problem

 

I have also tried to look into that, it is either the "new-products.tpl" or the "blocknewproducts.tpl"I tried to paste the same code in both of these(not at the same time) but neither of them worked for me. Maybe I am pasting the code the wrong place?

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...