The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Prevent quantity change in cart

FuzionMonkeyFuzionMonkey Member
in Help edited December 2008
Is there a way to prevent customers from changing the quantity of a product in the cart? (But still allow them to remove it). I have custom pricing code that is executed when the product is added to the cart, but if they change the quantity in-cart they could get pricing that shouldn't happen.
Comments
  • brettbrett FoxyCart Team
    Yes and no, and yes and no.
    If you're generating custom pricing dynamically, you could probably also set a minimum and maximum quantity to the exact quantity entered, which would effectively prevent them from changing it, but would allow them to remove it.

    If you went with this option you could use some jQuery and the JSON on the cart to either disable or hide (and generate a new "dummy") quantity input box, which would make it clear that the quantity can't be changed.

    Does that sound like what you want?
  • lukeluke FoxyCart Team
    How about just adding some css to your cart template make the input box disabled?
Sign In or Register to comment.