If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Change the sold out status from 0 in stock to -1

Change the sold out status from 0 in stock to -1

Started by patf on 1 Sep 2011, 12:52 PM · Views: 731

Results 1 to 3 of 3
1 Sep 2011, 12:52 PM
#1
patf avatar

patf

Zen Follower

Join Date:
May 2008
Posts:
200
Plugin Contributions:
0

Post #1 by patf

This may sound a bit bizzarre but I have a reason for this. :smile:

In Admin-Config-Stock When Show Sold Out Image instead of add to cart is selected it means that any item with a stock level of 0 or under has the add to cart button disabled.

Would anyone have any idea where I could amend the code so that a stock level of 0 will still allow add to cart and checkout but anything beneath this ie -1,-2 etc would be blocked. ?

Thanks in advance

3 Sep 2011, 2:46 PM
#2
eentje avatar

eentje

Zen Follower

Join Date:
Jan 2009
Location:
The Netherlands/Germany
Posts:
144
Plugin Contributions:
4

Post #2 by eentje

WARNING CORE FILES MODIFICATION, BACK UP FIRST!

open includes/functions/functions_general.php

search for:

case ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):

replace by:

case ($button_check->fields['products_quantity'] < 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):

I came, I saw, I got zenned... :)

4 Sep 2011, 8:55 PM
#3
patf avatar

patf

Zen Follower

Join Date:
May 2008
Posts:
200
Plugin Contributions:
0

Post #3 by patf

Thanks very much :smile: