I was implementing the price table this morning and everything seemed to be working great. That was until I tested removing quantities from the cart, and the price remained at the discounted price.

For example, if someone kicks the quantity up to 11, the price drops by a dollar from $5.50 to $4.50. If they then remove 10 items, leaving 1, the price for that 1 item still shows $4.50. The price should revert to the price for quantities below 11.

Update: I had not set any pricing for quantities of 1 to 1 (only 2 to 10, and 11 to 50). I assumed that a value I had not set would default back to the original price. After setting the 1 - 1 quantity set to the original price, things are coming out correctly now. Feel free to close if this was by design. Thanks.

Comments

crymzyn’s picture

Issue summary: View changes

Just cleaning up typos...

pcambra’s picture

Status: Active » Closed (works as designed)

Hi!

I'm marking this as fixed as you certainly need to check in the system if an user can purchase 1 item or not, the module is working as far as I can tell for the use case you report, but you need to decide what you do when an user tries to buy a "non-defined" quantity by the price table module.
I'd suggest to take a look to commerce_stock module to see an example of how to block certain quantities.

Thanks for reporting btw :)

giuvax’s picture

I had the same issue.
A row with a price for 6 to 10 products. I added 6 to cart and I got the price table value, then I removed one but the price didn't change.
I added a row 1 to 5, with the same base price, and then it worked. But it shouldn't be like this, I guess. With a quantity that doesn't exist in the price table, the regular price should be applied.

giuvax’s picture

Issue summary: View changes

Updated with new info...