• Hello, how are you? Thanks for the plugin!
    Whenever I try to add a product to the cart, it goes up by 2 in 2. Always following this rule 1,3,5,7 ……
    I read many topics in this theme. But I can not find right solution for me.
    My theme is Ekommart.

    What can I do to resolve this?

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • My Thema: envo-ecommerce.

    Plugin Author taisho

    (@taisho)

    Hello,

    this +2 added is a repeating problem caused by some themes that have their own quantity button handling. +1 from the plugin and + 1 from the theme. Although I resolved some cases, including the most popular themes that I mainly handled individually in plugin’s code, I was never able to eliminate the issue completely.

    The theme’s quantity buttons normally are hidden for almost all themes, unless as it comes out, they are outside the quantity DIV – the case of @valeriocosta.

    The website with the problem reported by @mrmelhay is under construction with no access so hopefully, what I suggest here is applicable for You too.

    1. This is a safe way to disable the click event assigned to the theme’s buttons. Safe means without affecting quantity buttons not processed by this plugin that come from mini-carts etc. The script searches for the buttons not further than the parent of this plugin’s buttons container. Please look for .php plugin’s file and in line 567 is a function that should have this line added:

    $(".qib-container").parent().off("click", ".plus:not(.qib-button), .minus:not(.qib-button)");

    In the end, it will look like this:

    		wc_enqueue_js( $event_listeners .		
    			
    			'
    			function QtyChng() {			
    				$(".qib-container").parent().off("click", ".plus:not(.qib-button), .minus:not(.qib-button)");
    				$(document).off("click", ".qib-button").on( "click", ".qib-button", function() {'				
    					. $quantity_change .					
    				'});
    			}
    			'
    		);

    Please let me know if this works, if yes, I’ll have it included with the next plugin patch.

    2. For the plus and minus buttons added by the theme that are visible, the similar trick can’t be safely used, as there is no parent selector in CSS and hiding .plus and .minus class in the whole HTML document could make some other quantity buttons disappear (mini-carts etc.), so feel free to try this in your child theme CSS or theme’s extra CSS, but it’s not something I can put in the plugin and will need to think if there is any good applicable solution:

    .minus:not(#qib_id):not(#qib_id), .plus:not(#qib_id):not(#qib_id) {
    			display: none;
    		}

    Best regards,

    Ryszard

    • This reply was modified 4 years, 6 months ago by taisho.

    Hello I have a same problem.
    I tried your solution but it didn’t work, you could help me.
    Only after updating the cart value does the step become 1 correctly.

    My Theme is ekommart

    Best Regards

    Hello I have a same problem mxxavi.My theme is Ekommart same problem which have mxxavi.After updating step become correctly.But in regular form it is work wrong steps increased +2

    Thanks @taisho.
    But don’t work for me with this new code (line 567).
    And the second option, missing de minus and plus for all pages.
    Thanks.

    Thread Starter Hayrulla

    (@mrmelhay)

    Hi @taisho our site still under construction. But i made copy to another domain. https://test.onlinerasta.uz. Please can you check the problem.
    Thank you for attention

    Thread Starter Hayrulla

    (@mrmelhay)

    Dear @taisho solution that you wrote not worked for me.

    Hello, @taisho good night I have a problem, my theme is Envo Storefront – Version 1.0.5, I noticed that the problem is that the buttons of the Qty plugin are inside the buttons of the theme.
    Can you help me solve this problem?
    When he clicks on + he passes 2 numbers 1,3,5,7,9,11.
    Thank you

    Thread Starter Hayrulla

    (@mrmelhay)

    Hello @taisho our site is online now. https://onlinerasta.uz

    I can not find right solution for me. My theme is Ekommart.
    The solution that you wrote one month ago not worked.
    What solution do you suggest?

    I’m using the same theme. Hope ill get answers too. Thanks!

    danlopes

    (@danlopes)

    hi @mrmelhay @valeriocosta @mxxavi @andranikgrigoryan98 @torcato @joseph-b,

    In the file “qty-increment-buttons-for-woocommerce.php” delete line 506 to 575.
    It worked well for me

    • This reply was modified 4 years ago by danlopes.
    • This reply was modified 4 years ago by danlopes.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘The buttons increase quantity 1,3,5’ is closed to new replies.