this feature sounds good to me :
"Check restrictions ( product stock is active and 0 ) and display in a ajax message."
i need a stock restriction for my single item shop but when i test RC8 with stock active on UC beta 4/Drupal 6.10 i can purchase as many item as i want without any stock control and no more message

Did i miss something ?

Thank you by advance

Comments

Erik Seifert’s picture

Hey,

Correct.

You must habe uc_stock enabled and make a stock active for a product. The same for attributes.

My module implement - 'uc_stock_add_to_cart' and 'uc_attribute_add_to_cart' for correct cart handling.

I have checked in my current install.

@update

Check and works.

Try this use case:

Go to product, set stock = 0 and active = checked. You should not be able to buy this product.

chourmovs’s picture

damned you're right
I'ts a shame i didn't try with uc_stock at 0

Now i've another problem, i can still buy several product in 1 session even if there is only 1 item to buy
In fact it's not because of ajax cart but the fact that uc_stock can't manage stock in real time

The ideal would be: uc_stock OR ajax cart check quantities in real time and avoid buy more than existing quantities

there are several way to do that i think

Thank you for you're work and you're answer, i'm going to put my site online with this version of ajax cart anyway

I'll follow your project evolution too

Erik Seifert’s picture

Category: support » feature

The problem is, there are many points where to check for stock

- in listing
- in cart
- in checkout

Other problem is in time.

Because,

2 User on your site.
1 Product with stock 1

Both user can add it to cart, because 1 product is there.

If the one user go to checkout and crreate an order, the other one should be able to end checkout, because now stock is 0 . So i think stock module will handle it correct but you need a check for checkout.

You can have an look on uc_multi_stock . But i doesn't test this module. But if uc_multi_stock module make an correct implementation og hook_add_to_cart(), it should not be a problem to my module.

chourmovs’s picture

For me with my little experience with oscommerce shop

Stock must be decreased on "complete checkout" in all case, it's now possible

If another customer has a newly 0 stock product in his cart, it must be specified on checkout with an asterisk in the cart listing or/and an ajax message like " this [product_name] is not available anymore" so the customer has to delete it manually

what do you think about this ?

Erik Seifert’s picture

Erik Seifert’s picture

This could be a solution for display such informations. My problem is, i must a make a feature freeze now. Because there are too much changes between BETA Releases from Ubercart.

So it could be in Version 1.1. Because see this request, this could be easy implemented with ajaxabile cart .

http://drupal.org/node/345809

Amarjit’s picture

Another check needs to be done actually concerning Attributes.

When an option must be selected, e.g. Small, Medium, Large.

If only Medium and Large are shown on the product page, i can simply add another option in the html to the select box with a value of 'Small'. Now if I add that to my cart and 'View Basket'...the product has been added. This hack can also be done with attributes do not even exist and you can still add the product, which doesn't show any attributed listed at all in the Basket.

A check needs to be done on whether the attribute exists before adding to cart. You may also want to think about checking quantities of each indvidual SKU and not allowing the user to add more than that to their cart, as some people have 1 product with many SKU's (different attributes).
..I know 2 or more people can order at the same time BUT don't let them order more than is in stock + do a check when whilst on Basket page + Checking out. This will reduce the chance of too many being quantities being ordered.

Erik Seifert’s picture

Status: Active » Fixed

This restriction is now corrected in 1.0

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.