Support » Plugin: Woocommerce Upsell / cross sell Popup plugin » Multiple Popups in one sequence

  • Resolved Johnny


    Hello, I want to know if it’s possible to have multiple upsells in the same sequence.

    So we have 3 products A, B & C. B is an upsell of A and C is an upsell of B.

    The customer adds product A to cart and the first upsell popup comes up, containing product B. The customer selects Yes – Add to Cart and after that’s added to cart, a second upsell popup comes up containing product C and the Yes/No buttons.

    Is this possible?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Yes, it’s possible with some tweaks.

    First, you have to set the plugin not to use AJAX. On the main setting page of the plugin, you will see an option to turn off AJAX.

    Go to Woocommerce > Upsell Popup > General.

    Here you will see an option to turn off AJAX. Tick the box that says “Turn off AJAX on single product pages”.

    The second thing to do is you have to modify a line of code in the plugin’s core file. Follow the steps below:

    1. On your server, go to this directory: /wp-content/plugins/very-simple-woocommerce-upsell-popup/ and open the file in this directory with the name wup-noajax.php.

    2. On line 11, you will see this code:

    if ((! is_ajax()) && ($thp_addtocart_popup_btn != true)) {

    Change the above code with the following code:

    if (! is_ajax()) {

    3. Save your file.

    That’s it.

    Thread Starter Johnny


    Thanks for taking your time, much appreciated.

    However I assume this fix is only possible if you’re adding the product to cart from the product page?

    I want to trigger the popup on a custom page that only uses AJAX when adding products to cart.

    If you want it on a custom page, the steps would be the same but you would have to do with not using AJAX. Is AJAX a must for this custom page to work?

    A bit of explanation before I’m signing off.

    If you are using Woocommerce shortcodes like [products], [featured_products], [sale_products], [add_to_cart id="99"], etc on your custom page, you can disable AJAX via Woocommerce settings.

    Go to Woocommerce > Settings > Products > General > Shop Pages > Add to cart behavior, and then untick Enable AJAX add to cart buttons on archives.

    And then you can apply the steps in my reply above.

    Let me know how it goes. Happy to help you to get this working.

    Thread Starter Johnny


    @tentenbiz Thanks for your help with this.

    Unfortunately the custom page MUST use AJAX. There is a grid of products with “add to cart” buttons so customers click on thee button directly from the grid and the product is added to cart via AJAX. There is no other way to add such products to cart, not even from their individual product pages.

    I’m also not using any of the shortcodes you mentioned – it’s a custom grid.

    Have you tried our plugin on this custom page though? Do the popups show on this custom page? First we should try to get your popups to show correctly on this custom page before attempting any tweak to make the popups show in one sequence like you wanted.

    Here is how to show popups on custom pages:

    It would also help if you could share the URL of this custom page if it’s live.

    Thread Starter Johnny


    @tentenbiz Yes your plugin does work on the custom page. I was satisfied with it until I got a new requirement asking for the multiple popups. I also disabled AJAX to test your solution and it actually did work. Unfortunately the site heavily relies on AJAX for the user experience so the multiple popups wouldn’t be applicable.

    I’ll see if I can get the client to agree to a single popup with multiple products instead. Appreciate your help regardless, thanks!

    You’re welcome. But if they still want this, I could think of something. Just let me know.

    Thread Starter Johnny


    You’re amazing, thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Multiple Popups in one sequence’ is closed to new replies.