Mar 13, 2017
Apr 14, 2017
Core
Closed, Fixed and tested
Cart validation behaves differently depending on whether it is done with old format workflow validation or new format ICart extensions-based validation.
This bug occurs if variation is set to have a Max. quantity but is not tracked by inventory.
The problem is that, in the same situation and depending only on which validation method is used, the max. quantity limit is either ignored or changes the line item quantity.
In other words, front-end validation allows quantities over max. quantity value, while Commerce Manager changes overly large quantities to follow the limit. The error is in the front-end validation, which should limit the quantity and set corresponding AdjustedQuantityByMaxQuantity.
Steps to reproduce:
1. Create/update a variation with a Max. quantity of 100 and Tracked set as unchecked.
2. Run the test code:
var test1 = new MaxQuantityTester().Test(code, 50); var test2 = new MaxQuantityTester().Test(code, 150);
3. Notice that test1 == true and test2 == false, indicating that validations give conflicting results when Max. quantity is reached.