Jump to content

Mark few products as SOLD


Recommended Posts

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

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

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

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 .

post-348814-0-24957900-1397754582_thumb.png

post-348814-0-60717700-1397754787_thumb.png

post-348814-0-72975100-1397754803_thumb.png

change 1.txt

change 2.txt

Edited by vasan82 (see edit history)
  • Like 1
Link to comment
Share on other sites

 

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

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

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

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

  • 2 weeks later...

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

post-405989-0-59363700-1398871032_thumb.png

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
 

 

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

  • 2 months later...

 

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

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

×
×
  • Create New...