Forums / General Questions / Don't display a Sold Out Button on Upcoming products ? ( on listings )

Don't display a Sold Out Button on Upcoming products ? ( on listings )

Started by mesnitu on 6 Jul 2016, 4:05 PM · Views: 507

Results 1 to 3 of 3
6 Jul 2016, 4:05 PM
#1
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Don't display a Sold Out Button on Upcoming products ? ( on listings )

Hi
I'm trying to find a default way to do this.
I have upcoming products, that have a stock 0

On product listings , the sold out button is showing ... But this is not correct, they are not sold, they have a stock 0 cause they are not there already, but it's a product that can be pre-order.

Does zencart have a "default" way to configure this ? Without messing in the code ?
This is my stock config:

Check stock level - 	true	
Subtract stock	-      true	
Allow Checkout	-   true
Mark product out of stock	***	
Stock Re-order level	- 5	
Products status in Catalog when out of stock should be set to	- 1	
Show Sold Out Image in place of Add to Cart	- 1

Thanks

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

6 Jul 2016, 8:07 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Don't display a Sold Out Button on Upcoming products ? ( on listings )

One way to do this is to assign the product to be a document product type, where the add-to-cart button is disabled in the catalog->product types selection. The product type doesn't offer necessarily "different" fields, but allows management of the same product, then when the product is to be made available, the product type can be changed back to the general product type. After the product is originally created, the product type can be changed through a sql statement or as permitted by a bulk product management tool of your choice.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

7 Jul 2016, 5:34 AM
#3
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Don't display a Sold Out Button on Upcoming products ? ( on listings )

Thanks
This is for the bookx module. On the product_info page ( bookx ) , the zen buy button has this changes since it uses a altered function to this zen buy button function that is aware of this upcoming books. I just had to change since a bit, since it was not possible to pre order.

Today the muse awoke at the same time that me and said: why don't you replace the zen_buy_button with that one from bookx on products listings ?
And I said: ok.

And it turns out that it's working on product listings as well.
All good.

Tahnks

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison