Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix conflict between two cart rules and a single product cart #8361
Fixing this case: two cart rules, one with a free product and other with a percentage discount. The problem is when there is no stock of the free product, the code to load the second cart rule didn't checked if the product was in the cart. If detected that the gift rule was loaded, it substracted one unit from the total quantity cart products. And if the cart had only one product, it generated a "Cart empty" error. Now it checks if the cart contains the cart rule free product.