Repository Forums Support WooCommerce Extended Coupon Features PRO Free product multiple choices with Woocommerce AJAX Cart

Topic Resolution: Resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #16005
    Laurent MASSÉ
    Participant

    Hello everyone,

    I just bought this plugin, and it is working extremely well, so thank you for that.

    I am using Woocommerce AJAX Cart on my website, to allow the cart to refresh instantly when adding or reducing the quantity of a certain product.

    I have created an auto-coupon to be reedemed when customer add a certain product to the shopping cart. When at the check-out page, customer have to select the free item that they want. And this is where my problem is : when you choose one the free item, the cart does not refresh instantly with this new item.

    Is there a solution to my problem ? To allow the compatibility of WooCommerce Extended Coupon Features PRO with AJAX Cart ?

    Thank you so much in advance for your help, and do not hesitate to ask me if you need more information or screenshots.

    Regards

    #16007
    Soft79
    Keymaster

    Please send an url + steps to reproduce the issue on your site.

    #16023
    Laurent MASSÉ
    Participant

    Dear Soft79,

    Thank you for your prompt reply. I am sorry I couldn’t get back to you earlier.

    Here is the product you can add to cart : Costa – Tuna Alley

    Then you can go to Cart. The 4-free product appears and you can choose the color. I’d like that when you choose “1” in the color of your choice, the cart updates automatically with my WC AJAX Cart plugin, and that you don’t need to press “Mettre à jour le panier” (French for “Update cart”).

    For now, if the user does not click on “Update cart” and go to check-out page, the 4-free product appears again and I think it might confuse the user. That is why it would be perfect if it could work with my AJAX plug-in.

    Thank you very much in advance, and do not hesitate to ask me if you need any more information.

    Regards

    #16024
    Soft79
    Keymaster

    You can apply this custom javascript to enable automatic refresh:

    
    jQuery( document ).on(
      'change input',
      '.wjecf-auto-submit input[type="number"]',
      wacRefreshCart
    );
    
    #16027
    Laurent MASSÉ
    Participant

    Thank you very much.

    Where should I apply it ? in Plugins > Editor > WC Ajax Cart, or WC Extended Coupon Features PRO, or somewhere else ?

    #16028
    Soft79
    Keymaster

    You can add it to your child theme. Uf you don’t know how to do that, you can use a plugin like https://wordpress.org/plugins/live-css-js-code-editor/ .

    #16030
    Laurent MASSÉ
    Participant

    I downloaded the plugin, and copy-pasted your code in “JavaScript Code” of my child theme but it is not working 🙁 Have I been doing something wrong ?

    Thank you for your assistance, and sorry for my incompetence ..

    #16033
    Soft79
    Keymaster

    I don’t see the snippet anywhere, so maybe you’re not using the plugin in the right way. I don’t see any trace of the css/js plugin. Is it actually activated?

    #16035
    Laurent MASSÉ
    Participant

    Sorry, I deleted it after seeing it was not working. Just put it back (y)

    #16036
    Soft79
    Keymaster

    Try replacing the snippet with:

    
    jQuery( document ).on(
      'change input',
      '.wjecf-auto-submit input[type="number"]',
      function() { wacRefreshCart(); }
    );
    
    #16037
    Laurent MASSÉ
    Participant

    It is now working fine ! Thank you so much for your assistance and your reactivity !!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.