• Hi team!

    We have designed the product page using the jet woobuilder plugin, and the add to cart button on this page works as Ajax.
    The problem is when we add the product to the shopping cart, the WooCommerce notification (your plugin) is not displayed. But when we enter the other product page, the notification that the previous product has been added to the shopping cart appears, which creates a very bad UX.
    Actually this is a problem with ajax add to cart. If I disable this ajax in the jet woobuilder plugin, the problem is solved. I hope there is a solution to this problem.

    thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hi @hoseinkh ,

    Have you tried our option “AJAX add to cart notice” ?

    And can you please send me a screenshot of how you used the Jet plugin to created the add to cart button? I’m not so familiar with it

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi @karzin

    Regarding the first question, yes. I enabled it but it didn’t work.

    But the second question, exactly from which part should I send a screenshot? This plugin provides widgets for Elementor and allows you to edit WooCommerce pages. By default, add-to-cart Ajax is disabled in this plugin, but we can enable it in the settings of this plugin. https://prnt.sc/IsoVmiOEI4Io
    It can also be seen in the compatibility section : https://prnt.sc/-DvZVZXzYxHQ
    I will talk to the developer of this plugin and let you know the result. I hope it is useful in solving this problem. thanks

    Plugin Author Pablo Pacheco

    (@karzin)

    I don’t think I was able to reproduce the problem here. When I enable both options (AJAX add to cart notice, and AJAX add to cart from Compatibility with JetWooBuilder) the notice is displayed just fine.

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    I enabled these two options, but with these two options enabled, the add to cart button of this plugin does not work as ajax, but adds the product to the cart by reloading the page.
    To activate Ajax add to cart button of this plugin, you need to enable Ajax addition from WooCommerce settings > jet woobuilder tab.

    After activating it, your plugin notification will not be displayed when we add a product to the cart. Rather, it will be displayed on the next product page. In general, if add to cart ajax is not enabled in jet woobuilder plugin, everything works fine. Because Ajax is disabled. But if we enable Ajax, there is a problem. I should also add that I am using the Hello elementor template.
    Anyway, I have raised this issue with the jet woobuilder developer, hopefully there is a solution.

    thank you

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @hoseinkh ,

    I think there is an error on JetWooBuilder. At least on my version I got here (1.10.5).

    On ajax-single-add-to-cart.js, they are trying to call window.jetWooBuilderData.ajax_url, but this is being localized only in other js (jet-woo-builder.js).

    This should fix it. At least it worked here. Please, put this in your functions.php:

    add_action( 'wp_enqueue_scripts', function(){
    	global $wp_query;
    	$localize_data = array(
    		'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ),
    		'products' => json_encode( $wp_query->query_vars ),
    	);
    	wp_localize_script( 'jet-woo-builder-ajax-single-add-to-cart', 'jetWooBuilderData', $localize_data );
    }, 100 );

    Let me know if it helps.

    • This reply was modified 2 years, 5 months ago by Pablo Pacheco.
    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    didn’t work.

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @hoseinkh ,

    In that case, as wp.org forums are very restrictive, can you please contact us on our forums and then send me the JetWoo plugin along with the other required plugins to make it work?

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi again @karzin , I apologize for the long delay…

    Jet wooBuilder is a premium plugin. I hope there is another way to check it.

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @hoseinkh ,

    Exactly, that’s why I’ve asked you to send me. Let me know if you can do that, but, as I said, through our forums

    Thread Starter Hossein Khadem Abolfazl

    (@hoseinkh)

    Hi again @karzin , This bug was fixed in the new version of jet woobuilder plugin.

    Plugin Author Pablo Pacheco

    (@karzin)

    Ok @hoseinkh ,

    Thanks for letting me know.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘WooCommerce notice is not displayed at the right time.’ is closed to new replies.