vasan82 Posted April 15, 2014 Share Posted April 15, 2014 Hi , I have photos of few products that we have sold already in the last few years on the physical stores. I want to add those products for reference . Is it possible to add those products with the option as SOLD . I dont want the price to be displayed if possible . Thanks in Advance Link to comment Share on other sites More sharing options...
NemoPS Posted April 16, 2014 Share Posted April 16, 2014 Well you can set availability to not available (aka: product quantity to 0 in the back office, and deny orders for those products when out of stock) Then you might modify the template and hide the price if $product.quantity == 0 (category list, use $product->quantity in the single product page) Link to comment Share on other sites More sharing options...
vasan82 Posted April 16, 2014 Author Share Posted April 16, 2014 which are all the places I should make these changes . Slightly confused . Link to comment Share on other sites More sharing options...
NemoPS Posted April 16, 2014 Share Posted April 16, 2014 Availability: product back office Coding: product.tpl, near where the price is shown (but you need a developer if you are not a coder) Link to comment Share on other sites More sharing options...
vasan82 Posted April 16, 2014 Author Share Posted April 16, 2014 Thanks for the reply . I dont know PHP . I know few other languages . If you can provide me the piece of code I can add it in the product.tpl . Link to comment Share on other sites More sharing options...
vekia Posted April 16, 2014 Share Posted April 16, 2014 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 think that this is what you're looking for Link to comment Share on other sites More sharing options...
vasan82 Posted April 17, 2014 Author Share Posted April 17, 2014 (edited) Thanks a lot ...Yes , I hope this works fine with PS V 1.6 ....I will have a look at it . I will check and confirm . Kindly advise on which filename I need to change . If the code is same as found in the link provided by you ..please let me know the file name that is to be edited . Edited April 17, 2014 by vasan82 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 17, 2014 Share Posted April 17, 2014 product-list.tpl from your theme directory. paste code somewhere between {foreach} loop Link to comment Share on other sites More sharing options...
vasan82 Posted April 17, 2014 Author Share Posted April 17, 2014 (edited) I checked in my local host . I am getting some thing wrong . I dont understand the error .I am attachng the screen shot and corresponding codes here . I see the alignment / Price / New tag / Sold tags are displayed wrongly . Kindly help Which one is correct Change 1 or Change 2 ? Check for Image attachment names before refering the code . change 1.txt change 2.txt Edited April 17, 2014 by vasan82 (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted April 17, 2014 Share Posted April 17, 2014 C:\wamp\www\prestashop\prestashop\img\Sold Out.png wrong path. you have to use path with http instead of path like you used C:\wamp\www\prestashop\prestashop\img\Sold Out.png wrong path. you have to use path with http instead of path like you used. all other things (undefined) are not related to this "sold out" feature. Link to comment Share on other sites More sharing options...
vasan82 Posted April 18, 2014 Author Share Posted April 18, 2014 wrong path. you have to use path with http instead of path like you used wrong path. you have to use path with http instead of path like you used. all other things (undefined) are not related to this "sold out" feature. Hi , I have changed the path to http://papyrusartgallery.com/img/Sold.jpg . I see the formatting and some images are not showing up properly . The out come of the site is below . Kindly advise . http://papyrusartgallery.com/3-women Link to comment Share on other sites More sharing options...
vekia Posted April 19, 2014 Share Posted April 19, 2014 at the moment i dont see there any sold out badge, moreover your product list is a little crashed Link to comment Share on other sites More sharing options...
vasan82 Posted April 19, 2014 Author Share Posted April 19, 2014 at the moment i dont see there any sold out badge, moreover your product list is a little crashed Is there any way to rectify this . Link to comment Share on other sites More sharing options...
NemoPS Posted April 19, 2014 Share Posted April 19, 2014 You're missing tons of classes for the list elements, they only have these: ajax_block_product first_item item clearfix While they should be, for example: ajax_block_product col-xs-12 col-sm-6 col-md-4 first-in-line last-line first-item-of-tablet-line first-item-of-mobile-line last-mobile-line I'd start from scratch using a 1.6 list element from product-list.tpl Link to comment Share on other sites More sharing options...
vasan82 Posted April 19, 2014 Author Share Posted April 19, 2014 You're missing tons of classes for the list elements, they only have these: ajax_block_product first_item item clearfix While they should be, for example: ajax_block_product col-xs-12 col-sm-6 col-md-4 first-in-line last-line first-item-of-tablet-line first-item-of-mobile-line last-mobile-line I'd start from scratch using a 1.6 list element from product-list.tpl should i reinstall the shop ? Link to comment Share on other sites More sharing options...
NemoPS Posted April 19, 2014 Share Posted April 19, 2014 Of course not, just re-upload a clean product-list.tpl from a fresh package Link to comment Share on other sites More sharing options...
jonah2494 Posted April 30, 2014 Share Posted April 30, 2014 Hi guys, I don't know if this will help you?? but I have been looking for a way round the sold sticker for a while. Just had a look in the code product.tpl (default 1.6 them) find line 161: <div id="image-block" class="clearfix"> enter this code below: {if $product->quantity < 1} <span class="new-box"> <span class="new-label">{l s='SOLD!!'}</span> </span> {/if} will place a sold sticker on product when ==0 (less than one) Cheers Dean0 1 Link to comment Share on other sites More sharing options...
vekia Posted April 30, 2014 Share Posted April 30, 2014 in this case, if product will be out of stock, and allowed to order, sold ribbon will appear too Link to comment Share on other sites More sharing options...
Ben90 Posted December 5, 2014 Share Posted December 5, 2014 (edited) Hi guys, I don't know if this will help you?? but I have been looking for a way round the sold sticker for a while. Just had a look in the code product.tpl (default 1.6 them) find line 161: <div id="image-block" class="clearfix"> enter this code below: {if $product->quantity < 1} <span class="new-box"> <span class="new-label">{l s='SOLD!!'}</span> </span> {/if} will place a sold sticker on product when ==0 (less than one) Cheers Dean0 This one doesn't work, dude. Any update on this case guys? For prestashop 1.6 Edited December 5, 2014 by rukano (see edit history) Link to comment Share on other sites More sharing options...
khaledsaied Posted February 9, 2015 Share Posted February 9, 2015 (edited) Hi guys, I don't know if this will help you?? but I have been looking for a way round the sold sticker for a while. Just had a look in the code product.tpl (default 1.6 them) find line 161: <div id="image-block" class="clearfix"> enter this code below: {if $product->quantity < 1} <span class="new-box"> <span class="new-label">{l s='SOLD!!'}</span> </span> {/if} will place a sold sticker on product when ==0 (less than one) Cheers Dean0 This works for me, but not in the product.tpl. I placed the code in the product-list.tpl and used a custom label which I created in global.css: <li class="ajax_block_product{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> {if isset($product.new) && $product.new == 1} <span class="new-box"> <span class="new-label">{l s='New'}</span> </span> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span class="sale-box"> <span class="sale-label">{l s='Sale!'}</span> </span> {/if} {if $product.quantity < 1} <span class="sold-box"> <span class="sold-label">{l s='Not in stock!'}</span> </span> {/if} But I only have one problem, the label is not visible on the products shown on the home page. How can I achieve that? My custom label is called "sold-label" and I am using a paid theme with Prestashop 1.6 Edited February 9, 2015 by khaledsaied (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted February 11, 2015 Share Posted February 11, 2015 Clear cache, the home featured module is cached 1 Link to comment Share on other sites More sharing options...
Ben90 Posted February 13, 2015 Share Posted February 13, 2015 (edited) This works for me, but not in the product.tpl. I placed the code in the product-list.tpl and used a custom label which I created in global.css: <li class="ajax_block_product{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> {if isset($product.new) && $product.new == 1} <span class="new-box"> <span class="new-label">{l s='New'}</span> </span> {/if} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span class="sale-box"> <span class="sale-label">{l s='Sale!'}</span> </span> {/if} {if $product.quantity < 1} <span class="sold-box"> <span class="sold-label">{l s='Not in stock!'}</span> </span> {/if} But I only have one problem, the label is not visible on the products shown on the home page. How can I achieve that? My custom label is called "sold-label" and I am using a paid theme with Prestashop 1.6 Clear cache, the home featured module is cached Refer to this one for product list: https://www.prestashop.com/forums/topic/249939-solved-display-sold-ribbon-over-the-product-image-when-item-no-longer-available/page-4?do=findComment&comment=1953961 Now all good. Thanks Edited February 13, 2015 by rukano (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts