• Resolved mtlsam

    (@mtlsam)


    On the product page, if you change the quantity in the quantity input field and press enter it will add the product to the cart right away, this causes a UX problem with this plugin as the user needs to change the quantity and then configure their product fields for each item before they get added to the cart.

    If the user mouse clicks instead away from the quanity field after changing the number instead of pressing enter, the problem is avoided, but many users will press enter, it was the first thing my client did.

    I can prevent this default behavior with the following code but…

    document.querySelector(".quantity").addEventListener("keypress", function(e) {
    	if (e.key === 'Enter') {
    		event.preventDefault();
    	}
    }, false);

    This obviously makes pressing enter on the quantity field do nothing at all, is there any code snippet I can add to allow the pressing of the enter to update the number of product option fields without adding anything to the cart?

    I really need a solution for this.

    • This topic was modified 3 years, 10 months ago by mtlsam.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Wombat Plugins

    (@maartenbelmans)

    Hi @mtlsam

    WordPress does not allow us to do support for our premium version on their forums. From your question, it seems you’re talking of our premium version. Their forums are only meant for the free version (these are their rules, I have to abide by them).

    Please contact us through our website’s technical support form (studiowombat.com/request-support) and include your license key. I’m marking the ticket as solved here.

    Thank you!

    Thread Starter mtlsam

    (@mtlsam)

    sigh.. okay I didn’t realize what question included pro features.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Enter key on quantity field UX conflict’ is closed to new replies.