Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Erik Seifert CreditAttribution: Erik Seifert commentedHey,
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.
Comment #2
chourmovs CreditAttribution: chourmovs commenteddamned 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
Comment #3
Erik Seifert CreditAttribution: Erik Seifert commentedThe 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.
Comment #4
chourmovs CreditAttribution: chourmovs commentedFor 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 ?
Comment #5
Erik Seifert CreditAttribution: Erik Seifert commented@see http://drupal.org/node/386270
Comment #6
Erik Seifert CreditAttribution: Erik Seifert commentedThis 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
Comment #7
Amarjit CreditAttribution: Amarjit commentedAnother 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.
Comment #8
Erik Seifert CreditAttribution: Erik Seifert commentedThis restriction is now corrected in 1.0