• Hi,

    I am having an issue with YITH products add-on plugin. All add-ons are getting added to the cart by themselves and there is no option to remove the add-ons from cart then.

    Did anyone have this issue?

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Chris Lynch

    (@planetofthepenguins)

    Yes, I am having this issue as well.

    Chris Lynch

    (@planetofthepenguins)

    Hi!

    If anyone else is affected by this, I’ve made a quick and dirty work-around with some JQuery. You need to turn off your AJAX add to cart and accept redirecting to the cart (or product page if you miss a variant selection).

    
    jQuery('.single_add_to_cart_button').off();
    jQuery('.single_add_to_cart_button').mousedown(function(e){
    	e.preventDefault();
    	jQuery("input:checkbox:not(:checked)").remove();
    	jQuery('input[type="radio"]:not(:checked)').remove();
    	jQuery(this).parents('form:first').submit();
    	window.location.href('cart');
    	jQuery(this).remove();
    });
    

    This works by removing options that aren’t selected. It looks like its the form construction that’s the problem – either the way the form is being submitted doesn’t work with the latest Woo or maybe it’s broken inside the Yith plugin. Either way, this has fixed my problem until there’s a patch from the developer.

    • This reply was modified 4 years, 8 months ago by Chris Lynch.
    Thread Starter kumarsuresh444

    (@kumarsuresh444)

    Thank you. Your code worked and fixed the issue on my website. Appreciated!!!

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    did you tried to see if the issue persists also if you leave enabled WooCommerce and a WordPress default theme?
    @planetofthepenguins thank you for your contribute, unfortunately we can’t replicate the issue on our installation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product Add-ons add to cart by themselves and cannot be removed’ is closed to new replies.