• Resolved jonathanlangton1

    (@jonathanlangton1)


    Plugin only updates cart when I type in a quantity and not when I use the “+” or “-” symbols next to the quantity.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author taisho

    (@taisho)

    Hello,

    this is a fault of the buttons. I’m also an author of a plugin Qty Increment Buttons for WooCommerce. To make the buttons “really” work, apart from changing the value inside the input field, triggering this change is also required. In my plugin I do so in jQuery fired on the button click, this is the last thing that happens in the button click code (apart from some StoreFront theme exception in the next line):

    Find the quantity input field corresponding to the increment button clicked:
    var qty = $( this ).siblings( ".quantity" ).find( ".qty" );
    Trigger the change in this quantity input field.
    qty.trigger("change");

    On the linked website, cart totals will get automatically updated when the quantity is increased with buttons AND after this, the input field is clicked – doesn’t need to be changed, clicking is enough to trigger it.

    You may either try out my plugin or if You like the design of the current buttons or other reasons – contact theme’s author about this problem, it’s as easy as these 2 lines that I posted (I assume that the buttons are a part of the theme).

    Best regards,

    Ryszard

    • This reply was modified 4 years, 11 months ago by taisho.
    Thread Starter jonathanlangton1

    (@jonathanlangton1)

    Hi Ryszard,

    Thank you very much for your reply!

    I got in touch with the theme developer who suggested that I should download a plugin called “Insert Headers and footers“, however, I have read the reviews and I wouldn’t want to add this plugin to my site for security reasons.

    I would like to keep the theme buttons, but still do not know how to implement the code you sent me.

    Thanks,
    Jonathan

    Plugin Author taisho

    (@taisho)

    Hello,

    in this case, I can only suggest trying out Qty Increment Buttons for WooCommerce and use its buttons instead. Very awkward that the support of the theme suggests some other plugin for manually adding a line of code that all WooCommerce-compatible quantity buttons should have from the start. On top of this, the plugin won’t just simply allow adding this line of code – it should appear in the exact place, not be some additional and unrelated jQuery code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin only updates cart when I type in a quantity and not when I use the “+”’ is closed to new replies.