Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...
ie product AA has 3 options: small, medium & large. Stock values are : 1, 0, 1 respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
In our dreams...
Quote:
Originally Posted by
ssteel
Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...
ie product AA has 3 options: small, medium & large. Stock values are : 1, 0, 1 respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
ssteel said:
Quote:
Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...
Sort of. I'm zc 1.3.9h, using SbA v 1.4.9 with ajax (I haven't updated as folks seem to be having trouble with new versions that I am not having. So I am very afraid!)
I also use Product Attribute Grid v1.1.1
So my product page shows a grid - in my case by colour and size of socks. It shows HOW MANY are in stock underneath each type. If the stock is zero, the 'add # to cart' box for that type is replaced with a red 'x' - so at least the customer can not enter a buy for something not existing, and therefore won't be sent off to the cart before they find out.
If the customer enters a number higher than the number showing in stock for a type, they will be allowed to go to the checkout page - where they will get an error message about stock shortfall and they can revise their order.
sample product with an out of stock attribute:
http://www.meafordwool.com/Heavy-Wool-Socks/Sport
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
ssteel
Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...
ie product AA has 3 options: small, medium & large. Stock values are : 1, 0, 1 respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.
You can have it not show the option at all or you can have it show as out of stock.
Search for Dynamic Dropdowns by SBA
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
CarolineBogart
You can have it not show the option at all or you can have it show as out of stock.
Search for Dynamic Dropdowns by SBA
I have SBA and Dynamic Dropdowns by SBA and can confirm that these two working together will appear the way the other poster requested. That is, out of stock items will no longer appear as an option.
-lindasdd
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
THANKS!!!!!!!! I've been pulling my hairs for days trying to find out how to solve the problem as customers with product out of stock in their cart were unable to place the order and with no error message they had no idea what to do!
Thanks a lot!
:hug:
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
When I uncomment this code if I add a product that is in stock to a cart which already contains something flagged as out of stock, although the header message remains:
"Products marked with *** are out of stock. Items not in stock will be placed on backorder."
The "***" flag is removed from the item which is out of stock. :(
Quote:
Originally Posted by
CarolineBogart
I hope this helps the people on this thread.
The store I'm debugging has both items priced by stock attributes and items not priced by stock attributes.
For items not priced by attributes, if the customer asked for a quantity greater than that in stock, but the "out of stock" message did not display.
In priced by attributes version 1.4.13, in
includes/modules/pages/shopping_cart/header_php.php,
the code to check for "out of stock" on items not priced by attributes is commented out.
Uncomment these lines at about line 146:
if (STOCK_CHECK == 'true') {
$flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity']);
if ($flagStockCheck == true) {
$flagAnyOutOfStock = true;
}
}
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
jodpcc: if I understand the question, I'd quibble with the fact that it's a problem. If I'm going to change code of that nature, I'm going to also wipe cache or reset the server or something to wipe out people's carts. It's not a fair test to change the code in mid cart like that.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I obviously didn't explain very well :blush:
The sequence of events is :
I revert to the standard module and uncomment the code in question.
I add a product that is in stock to my cart
I add a product that is out of stock to my cart
I add a product that is in stock to my cart
When I add the product which is out of stock it correctly processes i.e.
I get a header message saying "Products marked with *** are out of stock. Items not in stock will be placed on backorder."
A "***" flag appears next to the out of stock item in the cart.
When I add the next product which is in stock it processes incorrectly i.e.
I correctly get a header message saying "Products marked with *** are out of stock. Items not in stock will be placed on backorder."
Unfortunately the "***" flag no longer appears next to the out of stock item in the cart.
So I have reverted back to the "Athena Code" :smile: which processes correctly for me. I would appreciate it if some others could confirm the sequence of events on their systems for the standard module with the code uncommented as suggested by CarolineBogart, as this might be an issue specific to my system.
Quote:
Originally Posted by
CarolineBogart
jodpcc: if I understand the question, I'd quibble with the fact that it's a problem. If I'm going to change code of that nature, I'm going to also wipe cache or reset the server or something to wipe out people's carts. It's not a fair test to change the code in mid cart like that.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I'm sorry I've been too swamped to try this in my test cart but have been monitoring this thread and will try late today.