• Resolved saurav.rox

    (@sauravrox)


    I am using Easy Digital Downloads plugin to sell some digital products. However, I am facing an issue when I use the Purchase Link on ajax. If I use ajax filter and filter the products then the Purchase Link throws an error:

    Uncaught TypeError: Cannot read property 'total' of null
        at Object.success (edd-ajax.js?ver=2.9.16:229)
        at i (jquery.js?ver=1.12.4-wp:2)
        at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
        at x (jquery.js?ver=1.12.4-wp:4)
        at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4)

    However, the Purchase Link works fine on page load but is throwing the above error after I filter the products.

    I know why I am facing this issue. Actually, there is a nonce value when I inspect the purchase button but when I try to alert or console it, the value is returned blank and hence nonce check fails. This leads to the above error – https://prntscr.com/qcvbm8

    This is the code for purchase link –

    echo edd_get_purchase_link( array( 'download_id' => 1111 ) );

    Any help would be more than appreciable.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there! I am dealing with a similar issue on my website currently. Could you give me some details on the solution you found for your problem? Thank you!

    Hi @kcampbell023

    I have checked the provided code echo edd_get_purchase_link( array( 'download_id' => 1111 ) ); in my local and it is working fine.

    Can you please provide me web page URL on which you are facing this issue? so I can take a look and try to understand the scenario.

    @pratik-jain of course. Our issue is not the exact same one he is describing but it is similar with the exact same error message appearing. I’ve been in touch with your support but have not received any sort of fix after almost a month of this ongoing issue so I was hoping that the issue the previous poster was having was similar enough to give me some direction for troubleshooting.

    https://beatpcos.com/store/

    Intermittently we are having issues with our “add to cart” button not completing. Mostly on mobile but will happen on desktop as well.

    Hi @kcampbell023

    Sorry for my delay response.

    I’ve been in touch with your support but have not received any sort of fix after almost a month of this ongoing issue.

    – Actually, I am not aware about it. As I am not from EDD support team. I am an individual user who loves EDD and like to support as end user.

    Our issue is not the exact same one he is describing but it is similar.

    – As you said, you scenario is a different.

    It looks like that you are using older version of EDD 2.9.19 Have you checked it by updating the plugin or theme?

    Also I found that, your product listing is coming through Divi theme. Can you please create the test page without page builder (with default WP Editor), add the EDD product shortcode in it and check the behavior.

    Let’s test some scenario. I try my best to solve it.

    @pratik-jain

    Actually, I am not aware about it. As I am not from EDD support team. I am an individual user who loves EDD and like to support as end user.

    So sorry for the confusion! I do appreciate you trying to help.

    Let me see what I can get set up as far as a test page goes and I’ll get back to you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Easy Digital Downloads Purchase Link not working’ is closed to new replies.