Shopping cart is empty upon checkout

Home Forums Basic Support Shopping cart is empty upon checkout

This topic is: resolved

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

  • #4613


    I am trying to decide if this plugin is right for what my client is trying to achieve. I set up a test download and it shows in the shopping cart widget when I add it to the cart. But when I click Checkout, the following page (Checkout-2) gives a “Your cart is empty” message. I cannot test the process any further from there. How can I fix this problem so I can test this out fully?

    I did install and uninstall the plugin previously. Could that be the issue?


    It could be a couple of things. Can you give me a live URL so that I can take a look?



    Did you disable ajax in Downloads > Settings > Misc? If so, can you re-enable it for a moment so I can test something?


    Nevermind, disregard that. But actually, could you go to that page and disable ajax for a moment?





    The problem appears to be caused by something that is prevent the SESSION variables from being stored. When items are added to the cart, they are stored in the session (a way to remember things in the browser).

    Do you know of any reason why sessions wouldn’t be working?



    Are these variables are stored in the database? If so then could something have happened to the database when I installed/uninstalled the plug in the first time?


    No, they’re not stored in the database.

    Can you give me a list of the other plugins you have active?



    Easy Digital Downloads
    Google Analytics for WordPress
    GroupDocs Viewer Embedder
    Health Check
    Paid Downloads
    SEO-Tool – Keyword Density Checker
    Use Google Libraries
    Visual Form Builder
    WordPress HTTPS
    WordPress SEO


    Those all look fine (I’ve used half of them). Who’s your host?





    Can you please try switching to the default theme and see if that makes a difference? There are a few themes can do weird stuff that cause this exact behavior.



    No luck with changing the theme.


    Do you have access to your php.ini file?



    That did the trick! I ran this by the webhost this morning and they updated the php.ini file by assigning the session save path to the absolute directory of the document root.

    Now I can test it out. Hopefully I can get this plugin to work for free digital downloads.

    Much appreciated, Pippin.



    Let me know if you have any further questions.



    One more actually…

    Is the checkout page form editable? I’d love to be able to add other fields.

    And the Show Terms link does not display the terms.


    Yes, it is editable. The ease of editability depends on which part you want to edit. Do you want to edit the shopping cart part or the user info fields?

    The terms of agreement are not showing because you have a jQuery conflict. Your theme is loading jQuery incorrectly. Are you comfortable editing some theme files to fix it?



    I’d like to add user info fields.

    Editing theme files is not a problem.



    Are you familiar with how to use actions and filters in WordPress? If so, see here for a list of hooks on the checkout page.

    You need to find where your theme is loading the .min version of jQuery and remove it entirely. It’s probably in header.php, but could be in functions.php, or another file included into functions.php.



    The code for header.php is below. Please let me know what I should remove to get the terms of agreement to show/hide.

    Admin EDIT: code removed. Please use



    I found the code on your site for custom checkout fields but I am not familiar with actions or functions. Where would I put this code?


    I removed your code. Can you please paste it via and then share the link?

    You can place that code in a custom plugin. Use Pluginception to create one.




    Remove line 28 – 34 of in the paste bin.



    No dice. The terms still don’t show.



    And from your code to add additional form fields, what do I delete to make the phone number optional?


    To make the phone not required, remove this section:

    // check for errors with out custom fields
    function pippin_edd_validate_custom_fields($data) {
            if(!isset($data['edd_phone']) || $data['edd_phone'] == '') {
                    // check for a phone number
                    edd_set_error( 'invalid_phone', __('You provide your phone number.', 'pippin_edd') );
    add_action('edd_checkout_error_checks', 'pippin_edd_validate_custom_fields');

    There is still an old version of jQuery being loaded. You will need to comb your theme files and find it.

Viewing 30 posts - 1 through 30 (of 98 total)

This ticket is resolved. To continue this ticket or to report a similar issue, please open a ticket from our new Support page.

Error: Please enter a valid email address

Error: Invalid email