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.

Update Cart Twice

kscotbarrkscotbarr Member
in Bugs & Feature Requests edited October 2008
I'm doing some user testing and have found that the functionality for changing the quantity in the shopping cart to be a bit confusing.

Whenever someone changes the quantity and then clicks on "Update Cart" rather than hitting "tab" or "enter", they are given the message "Please update your cart" and have to hit "Update Cart" a second time.

Is there any way to avoid this? It seems like hitting "tab" or "enter" after changing the quantity should trigger the update function, and clicking on "Update cart" after changing the quantity should do the same.
  • brettbrett FoxyCart Team
    We've gone back and forth on this, and our long term plans are to make the cart itself all ajaxy, but the issue isn't that you have to hit the "update" link twice, but rather that the "hiding" of the checkout link is done onchange, which doesn't get triggered until the input element loses focus.

    So when you click off the modified input element, it triggers the onchange, which can interfere with the click, so you have to click twice.

    We know it's kind of annoying. If you'd like to create a feature request we'd love you for it:

    In the meantime... you could probably hijack or extend the onchange event, which is made easier by some undocumented functionality in 040. If that interests you let me know and we'll document it.
  • lukeluke FoxyCart Team
    We have talked about this one a bit. I personally think it's MUCH more annoying if you have 5 items in your cart and you want to adjust all of them... and after each change in the quantity the whole page would have to reload... 5 times. Ajax might make it "feel" better if it auto-updated, but I still like being able to set everything up like I want it and then updating when I'm ready.

    I wonder... what about changing the image on focus of the quantity field? Then, when they tab out... we change it back if they didn't change anything. But we might have the same problem in reverse. Interesting to think about. We're always interested in improving the work flow process of the checkout because we believe we have the best one out there and we work hard to keep it that way.
  • Luke, building on your idea... What if when the cart initially loads all you see is the checkout "button". Then when a quantity field comes into focus "Checkout" changes to "Update Cart". On blur, if the quantity remains the same the "Checkout" reappears, otherwise "Update Cart" remains. This would make things cleaner, and would eliminate any unnecessary clicking of "Update Cart" when nothing's been changed.

    As for the current version, my cart setup isn't working quite like yours. In the demo on your site, when I change the quantity and then click on "Update Cart", the "please update your cart" text briefly appears, but then the cart refreshes. On mine, when I click "Update Cart" the "please..." appears but the cart doesn't refresh. What's the difference?
  • lukeluke FoxyCart Team
    The cart doesn't refresh when you hit update? What browser are you using? Seems to work just fine here... unless I'm not understanding you.

    Great implementation, btw! We love seeing customized Foxy carts.
  • brettbrett FoxyCart Team
    Wow... I actually like your idea a LOT. We're usually pretty on the ball with unnecessary elements, but in this case you're right that the "Update Cart" link is completely unnecessary until it's actually necessary.

    We'll chat about that but I like that idea a lot.

    We could also not change the button from "checkout" to "update" until there was a keypress change. More javascript overhead, which is why we avoided that up to now, but that'd feel even cleaner to me. Don't change on focus, and not on change (blur), but on actual change while you're typing in a new quantity.
Sign In or Register to comment.