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.
Currently I'm finding that if I try to add 5 items of Product A, and there is only 4 in stock, then no items are added to the cart.
Is there a way around this with Rules or possible in config?
Thanks!
Comments
Comment #1
guy_schneerson CreditAttribution: guy_schneerson commentedHi @carn1x,
the stock module currently stops you from adding more then in stock, you can use rules to do what you wont but i believe you will need to disable stock for your product types.
The main thing the module does is control the flow of the user experience, if that's not needed it could all be done using rules, it is possible that in the future the stock module will be more configurable but i think at the moment you except how it works or write update rules to do it yourself.
Comment #2
carn1x CreditAttribution: carn1x commentedSorry maybe I didn't explain what I'm trying to get:
* If there are 4x ProductA in stock, and I try to add 5x ProductA to my cart, currently no items add to cart, and I get an error.
* I would like the option to instead have the 4x in stock ProductA to add to the cart, and an error/message saying that only 4 items have been added to cart.
But I will try and accomplish this with Rules if I can.
Since Commerce and everything else is going Rules crazy (which I'm in favor of!), perhaps the currently built-in process of denying add to cart should be a default Rule itself?
Comment #3
guy_schneerson CreditAttribution: guy_schneerson commented@carn1x, yes that's what i understood, currently the only way to get around this is by disabling the module, the plan is for version 2 to be fully rules based.
i have added this to the roadmap http://drupal.org/node/1269168#comment-5019366
Comment #4
guy_schneerson CreditAttribution: guy_schneerson commentedI am closing this issue for now but do have a look at version two when it comes out
Comment #5
carn1x CreditAttribution: carn1x commentedthanks!