• Hello.
    I am using an alternative plugin which creates a custom form for each product, and also includes its own ‘add to cart’ button which uses AJAX.

    In the plugin settings, and in order for the mini-cart to be updated, it requires a CSS class to update it correctly. I have not been able to make this work with the builtin floating cart of the theme, and I would like to use your plugin. However it does not work as expected.

    I have experimented with various classes and I ended up with the class

    .widget_shopping_cart_content

    This updates the theme’s floating cart but does not update the small number which shows the number of products. It also does not update your cart.

    Strangely, I have noticed that if I delete a product from the floating cart your cart is updated properly.

    Could you please let me know how to proceed and perhaps indicate which class to use. The theme mentions that it uses Woocommerce defaults for all this.

    The idea is to disable the floating cart completely and use your cart instead.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! I’m not sure I completely understand your setup… WooCommerce Menu Cart does not require any specific classes, it hooks into the standard WooCommerce AJAX functions (“Fragments”). Each time the one of the adding_to_cart, added_to_cart, or updated_wc_div events are triggered, our plugin is updated together with all other WooCommerce fragments – this should not require any specific class targeting because that part is handled by WooCommerce natively.
    Just make sure that you haven’t enabled the “Custom AJAX” option in the plugin settings because that would bypass the WooCommerce AJAX and that’s not what you want.
    The rest should be fully automatic.

    Thread Starter fesarlis

    (@fesarlis)

    Thank you for your reply. I understand what you say.

    Let me clarify: I am experimenting with EZ form calculator to create a custom form using ez form creator for my products. One of the issues I am facing is this.

    My theme (flatsome) has a floating cart on the RHS of the screen.

    The thing is that if I am to use the custom form, EZ form calculator will hide the default ‘Add to cart’ and add its own.

    However, its options include two SPECIFIC options for this case. I quote:

    – Update mini-cart after adding products (Please note that you use the correct CSS selector or the cart will not be updated.)

    – Cart CSS selector (The mini-cart CSS selector can change depending on your theme. If you are not sure, you might want to contact the theme author.)

    Both you and the theme developer replied that you use the default classes. Still the form’s add to cart does not update neither your cart nor the floating cart.

    As I previously mentioned, I have a partial solution. Using the selector widget_shopping_cart_content the floating cart is updated partially. So the class must be wrong.

    I just want you to provide this selector (even if it is the default WC one) and/or if you understand my config now to pinpoint where the problem might be, ASSUMING that the option above works as expected. Theme’s floating cart is great. That said, I prefer to use your plugin to show added products instead.
    Thanks

    • This reply was modified 5 years, 7 months ago by fesarlis.
    • This reply was modified 5 years, 7 months ago by fesarlis.
    • This reply was modified 5 years, 7 months ago by fesarlis.
    • This reply was modified 5 years, 7 months ago by fesarlis.
    Plugin Contributor Ewout

    (@pomegranate)

    Apologies for any confusion. We not using default classes because there is no menu cart in WooCommerce by default (so no default classes). We are hooking into the default functions that WooCommerce uses to live update elements in the page (“AJAX fragments”).
    The fact that the EZ form plugin requires you to enter classes manually means that it’s probably disabling the WooCommerce AJAX altogether…

    The class we have registered for the WooCommerce AJAX is a.wpmenucart-contents, but I don’t know if entering that will solve your issue because this is not the same as the mini-cart replacement.

    Hope that helps though!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AJAX mini cart’ is closed to new replies.