tilljonasbn Posted December 6, 2011 Share Posted December 6, 2011 Hello! I've been looking around for a module that can make a image be a overlay on the shop when a product is out of stock. Have anyone build/found a module like that? Best regards Jonas www.postr.se posters skolplanscher Link to comment Share on other sites More sharing options...
doekia Posted December 6, 2011 Share Posted December 6, 2011 No need for a module. Just tune your template by affecting some class to a div based on stock/non-stock Best, (d)oekia Link to comment Share on other sites More sharing options...
tilljonasbn Posted January 3, 2012 Author Share Posted January 3, 2012 Ok! Cool I will look in to that. Thanks. postr.se poster skolplansch - Unika motiv till humana priser Link to comment Share on other sites More sharing options...
joenmass Posted February 1, 2012 Share Posted February 1, 2012 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. 1 Link to comment Share on other sites More sharing options...
lipo83 Posted November 7, 2013 Share Posted November 7, 2013 (edited) 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. 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 November 7, 2013 by lipo83 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 7, 2013 Share Posted November 7, 2013 take a look here: http://www.prestashop.com/forums/topic/249939-solved-display-sold-ribbon-over-the-product-image-when-item-no-longer-available/ Link to comment Share on other sites More sharing options...
khaledsaied Posted February 8, 2015 Share Posted February 8, 2015 take a look here: http://www.prestashop.com/forums/topic/249939-solved-display-sold-ribbon-over-the-product-image-when-item-no-longer-available/ I took a look at this link but it looks like it's not up to date with prestashop 1.6. I wrote a comment in there and a couple of others also did that as it is a little confusing... Link to comment Share on other sites More sharing options...
helldog2004 Posted February 8, 2015 Share Posted February 8, 2015 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. Link to comment Share on other sites More sharing options...
khaledsaied Posted February 9, 2015 Share Posted February 9, 2015 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 More sharing options...
helldog2004 Posted February 9, 2015 Share Posted February 9, 2015 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 More sharing options...
khaledsaied Posted February 9, 2015 Share Posted February 9, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now