Shopping cart is empty upon checkout

Home Support Basic Support Shopping cart is empty upon checkout

This topic is: resolved
  • Author
    Posts
  • #4613

    rmdpub
    Participant

    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?

    #4614

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

    #4653

    rmdpub
    Participant
    #4658

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

    #4659

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

    #4660

    rmdpub
    Participant

    Done

    #4661

    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?

    #4662

    rmdpub
    Participant

    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?

    #4663

    No, they’re not stored in the database.

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

    #4664

    rmdpub
    Participant

    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

    #4665

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

    #4666

    rmdpub
    Participant

    EasyCGI: http://www.easycgi.com

    #4667

    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.

    #4676

    rmdpub
    Participant

    No luck with changing the theme.

    #4685

    Do you have access to your php.ini file?

    #4689

    rmdpub
    Participant

    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.

    #4705

    Excellent!

    Let me know if you have any further questions.

    #4706

    rmdpub
    Participant

    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.

    #4710

    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?

    #4717

    rmdpub
    Participant

    I’d like to add user info fields.

    Editing theme files is not a problem.

    Thanks.

    #4718

    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.

    #4807

    rmdpub
    Participant

    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 pastebin.com

    #4809

    rmdpub
    Participant

    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?

    #4815

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

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

    #4816

    rmdpub
    Participant

    http://pastebin.com/D5H7LJA8

    #4821

    Remove line 28 – 34 of in the paste bin.

    #4851

    rmdpub
    Participant

    No dice. The terms still don’t show.

    #4853

    rmdpub
    Participant

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

    http://pastebin.com/Fn7rtWbU

    #4858

    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');
    
    #4859

    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 69 total)

You must be logged in to reply to this topic.