• Hello.

    The button work on the default product page – https://topexplainers.com/downloads/whiteboard-video/

    But it doesn’t work when I add the shortcode to a pop-up window, which is called by the button. See here https://topexplainers.com/edd-testing/

    When you click the package button the pop-up shows up where you can choose multiple packages. And the purchase button doesn’t add the item to the cart.

    I want to add that it worked before when I tried it first and still works in the cached version of the website. But at some point, it just stopped.

    Thank you!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • i also have a same problem. anyone have Solutions? this is my website.
    https://jazzhealthy.com

    Hi @genazvale

    Thanks for the web page link. I have checked your page on which the popup is opening on “Choose Package”.

    It looks like that you are using a cache plugin WP Rocket. Can you please try with cache flush and check?

    I suggest you to check after deactivating the cache plugin.

    Hi @amirakhan

    Thanks for your website link but I can not find the EDD product page. Can you please show me the location where the error is coming so I can take a look into it and try to understand the scenario.

    Thread Starter genazvale

    (@genazvale)

    It looks like that you are using a cache plugin WP Rocket. Can you please try with cache flush and check?

    @pratik-jain, OMG, mate, you have just saved me a lot of coding time… Yesterday support told me that this doesn’t work because not all code is loaded with the pop-up. So I was going to run a part of the code separately with the pop-up button.

    And now it turned out that everything was so simple… You’re the man, Patrick. I appreciate you took your time. Let me know if I can send a letter to your supervisor and ask him to promote you ?? you deserve it.

    Hi @laszlobartucz

    Thanks for the web page URL. I have checked it and also it looks like a caching issue. I am not fully sure but here what I have observed

    Your web page is saying “Cached with CBBC SpeedUp” so I am assuming this can be a cache issue.

    The direct buy link is working. The below link will add product in a cart.
    https://topnotchteaching.com/checkout/?edd_action=add_to_cart&download_id=32683&edd_options%5Bprice_id%5D=32683

    Now when you visit your page https://topnotchteaching.com/store/ it still says that there is no product in a cart https://prntscr.com/qeq69x

    But when you visit the same page with any query string in a URL then it will display product is in a cart https://prntscr.com/qeq8td

    I have checked all the things as a guest user. May be a logged-in user will not be cached. That you can check.

    So may be a cache issue. In recent have you installed any plugin? I hope this information will help you.

    Hi Pratik,

    Thank you very much for your reply. I’m sorry for not getting back to you earlier, but we were traveling and then COVID struck, upsetting our life a bit.

    But now we are back at working on EDD issues.

    We do use Swift Pro for caching. When it is turned off, and the purchase buttons are made visible, clicking the button will take us to the cart but would not add the product.

    In the meantime, we also received the official response from EDD, please read below.

    Do you think there could be any solution for this? We don’t think either EDD or Divi will solve it soon.

    Kind regards,
    Laszlo

    EDD’s response:

    I was able to confirm an incompatibility with EDD and Divi using your staging site and tracing through the code.

    EDD actually outputs 2 purchase buttons for each product:
    – A button that works with javascript to add the item to the cart, which then changes to a “Checkout” button
    – A button which simply adds the item to the cart, but isn’t javascript-enabled.

    When the page loads, EDD scans the page to hide the non-javascript button, and shows the javascript one.

    The problem when being used alongside Divi is that Divi adds the buttons to the page a microsecond after EDD scans the page. So EDD’s scan of the page is essentially doing nothing in that scenario, and you are left with the no-javascript button only.

    When you click on that button, it attempts to do that, but the nonce is not attached because it is using the non-javascript button.

    For now, I would advise simply enabling “Redirect to checkout” in your EDD “misc” settings, which I believe you already did.

    This is a deeper issue in incompatibility with Divi and EDD, and will take time to figure out a resolution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘The “Purchase” button doesn’t work’ is closed to new replies.