Forums / Customization from the Admin / Show Out of Stock Products Doesn't Work

Show Out of Stock Products Doesn't Work

Started by freefire on 21 Feb 2010, 11:29 AM · Views: 12,771

Results 21 to 32 of 32
10 Jul 2012, 6:50 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Show Out of Stock Products Doesn't Work

Go to the Tools ... Developers Tool Kit ... and in the bottom input box do a search on:
STOCK_MARK_PRODUCT_OUT_OF_STOCK

and select Catalog and click SEARCH ...

See what files, other than the PayPal files, reference this ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jul 2012, 7:03 PM
#22
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

below is the list of files.
/catalog/includes/functions/functions_lookups.php

Line #241 : $out_of_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';

Line #255 : $out_of_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';

Line #258 : $out_of_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';

/catalog/includes/languages/english/Rumina/checkout_confirmation.php

Line #27 : define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');

/catalog/includes/languages/english/Rumina/shopping_cart.php

Line #23 : define('OUT_OF_STOCK_CANT_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock or there are not enough in stock to fill your order.<br />Please change the quantity of products marked with (' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '). Thank you');

Line #24 : define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');

/catalog/includes/languages/english/checkout_confirmation.php

Line #26 : define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');

/catalog/includes/languages/english/shopping_cart.php

Line #23 : define('OUT_OF_STOCK_CANT_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock or there are not enough in stock to fill your order.<br />Please change the quantity of products marked with (' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '). Thank you');

Line #24 : define('OUT_OF_STOCK_CAN_CHECKOUT', 'Products marked with ' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . ' are out of stock.<br />Items not in stock will be placed on backorder.');

10 Jul 2012, 8:35 PM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Out of Stock Products Doesn't Work

It shows at quantity 83 ... maybe there is some issue on your Add on if it is not working correctly for this attribute combination ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jul 2012, 8:40 PM
#24
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

I have 83 for that style, but the black large is zero.
so I would think that on the line of the large black in the shopping cart it would say "out of stock" at that line as well as the top.

Below is how I have the attributes set up.

38 TEXT + 0.0000 + 0 0
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
Delete Color
37 Color White + 0.0000 + 0 1
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
36 Color Black + 0.0000 + 0 2
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
Delete Size
32 Size Small + 0.0000 + 0.4625 1
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
34 Size Large + 0.0000 + 0.38 3
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
35 Size X-Large + 0.0000 + 1 4
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete

10 Jul 2012, 8:46 PM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Out of Stock Products Doesn't Work

Might try posting on the support thread for that add on plugin and see if anyone has a solution or possible cause to the problem ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jul 2012, 6:12 PM
#26
gokeypa avatar

gokeypa

New Zenner

Join Date:
Sep 2011
Posts:
86
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

OK, I found the issue I was having. I followed your suggestion and went to that plugin and got the latest update. 1.4.14, the problem was in the "includes\modules\pages\shopping_cart\header_php.php" file. I updated that file and now it show the item that is out of stock. There is I think a new small bug. if I select an item that is out of stock, and do not delete the first item, then add a different item to the cart then that item shows out of stock as well.

Any suggestions?

11 Jul 2012, 10:37 PM
#27
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Out of Stock Products Doesn't Work

Same as before ... I do not use this add on plugin so check with the support thread for it ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Mar 2013, 4:15 PM
#28
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

Ajeh:

What that setting does is that when an order is made and the products_quantity falls to <= 0 the products_status is set to 0 which makes the Product be "Out of Stock" meaning not show in the Catalog ...
Changing that setting only affects Products based on future Orders ... it does not change the current setting for the products_status on Products where products_quantity <= 0 ...
You can do this manually or you could run this SQL in the Tools ... Install SQL Patches ...

UPDATE products SET products_status = 0 WHERE products_quantity <= 0;

> 
> NOTE: make a backup of your database before running commands like this ...

Linda - I have pre-populated the cart with products, some with **quantity in stock** and some with **"0" quantity** (showing Out of stock in the catalog).

Now, shop owner realizes that he does NOT want to show products Out of Stock in the catalog.
I have gone under **“Admin>Configuration>Stock”** and change the following variables:
**Products status in Catalog when out of stock should be set to 0.**

Reading this thread tells me that if a product has been added in the past to the catalog with “0” quantity, by changing the setting in **“Admin>Configuration>Stock> Products status in Catalog when out of stock should be set to “0””** would not have an effect on product disappearing from the catalog. I understand this and it is replicated on the site.

My question: 
When you add a **new product** with “Products Quantity: 0” and “Products Status: In Stock:”, then the product would show in the catalog as “Out of Stock”. So by changing the “Admin>Configuration>Stock> Products status in Catalog when out of stock should be set to “0””, the “Out of Stock” status in the catalog will show anyways, Correct? 

Then the only use that “Admin>Configuration>Stock> Products status in Catalog when out of stock should be set to “0”” is when you have 1 or more products for “Products Quantity:”, and as customers purchase the product and the stock quantity becomes 0, then it will changes the product’s “Products Status: Out of Stock:”, making it disappear from the catalog.  Correct?

My conclusion is when populating the catalog with products, if the “Products Quantity: 0”, and you don't want to the "Out of Stock" Status, then you should check the “Products Status:" to "Out of Stock”, otherwise it will show in the catalog as "Out of Stock". And, the **“Admin>Configuration>Stock> Products status in Catalog when out of stock should be set to “0””** has no auto functionality. Correct?

Using Zen Cart 1.5.1

13 Mar 2013, 4:52 PM
#29
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Out of Stock Products Doesn't Work

Setting the Product Stock to be turned off ( 0 ) when quantity goes to <= 0 only affects Products during the completion of checkout ...

That setting will not change current settings based on products_quantity <= 0, those have to be changed manually ...

If you want to globally change ALL Products with products_quantity <= 0 to be turned off so that they do not show in the Catalog, you can run this in the Tools ... Install SQL Patches:

UPDATE products SET products_status = 0 WHERE products_quantity <= 0;

NOTE: It is always a good idea to backup your database before running these types of changes ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Mar 2013, 5:03 PM
#30
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

Got it now. Thank you.

Using Zen Cart 1.5.1

7 May 2016, 7:26 PM
#31
shoptocreate avatar

shoptocreate

New Zenner

Join Date:
Mar 2015
Location:
www.shoptocreate.com/
Posts:
2
Plugin Contributions:
0

Re: Show Out of Stock Products Doesn't Work

I would like it so that when my product hits zero - that the product DOES NOT DISAPPEAR from the catalog. I would like it to still show up in the catalog but just have a "Sold Out" button instead of add to cart.
Basically, I want out of stock products to STAY visible on my store and not just disappear from the store once they've sold out. I want them always to show on the store!! (Just with a Sold Out button/text whatever it is that keeps the product visible even if the quantity is zero and item is sold out)
I hope this makes sense?! I've really been struggling with this.
Thank you in advance for your help

8 May 2016, 2:10 AM
#32
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Show Out of Stock Products Doesn't Work

In the Configuration ... Stock ... make sure you have the settings for:

Check stock level
Check to see if sufficent stock is available
true

Allow Checkout
Allow customer to checkout even if there is insufficient stock
false

Show Sold Out Image in place of Add to Cart
Show Sold Out Image instead of Add to Cart Button
1= on

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!