• Resolved apfotos

    (@apfotos)


    This was working on my development site, but since I’ve migrated it over, it doesn’t work correctly.
    When I add an item to the the cart, that works. When I click on “checkout” link, it goes to the checkout page, but it says there is nothing in the cart.
    How do I fix this?
    I’ve deleted the plugin, and re-installed the plugin, but it’s always the same.
    Thanks for your help.

    https://www.ads-software.com/extend/plugins/simple-cart-buy-now/

Viewing 15 replies - 16 through 30 (of 33 total)
  • Plugin Author bluey80

    (@bluey80)

    tproctor — The only thing I can think of that would cause this is some caching on the server-side so effectively when you go to the checkout page, it loads an old (read empty) version of the site. Can you make sure you don’t have any caching plugin or the like on your system?

    Thread Starter apfotos

    (@apfotos)

    I can only speak for myself –
    I removed the wp super cache plugin I had, and deleted all the files. I also went into the wordpress database and deleted the Cache references as well as removed them from the wp-config file.
    But that didn’t make a difference.

    Thread Starter apfotos

    (@apfotos)

    my only difference was – it worked on one site, same server, but when I migrated the site over, it didn’t work anymore. Even when I removed the plugin and deleted all the files and reinstalled it. Is there something else in the wordpress DB that might need to be removed before the plugin is re-installed?
    Are others having a problem with a site that was migrated, or an original?

    bluey80,
    I don’t have any caching plugin installed on my site, and cleared the cache of all 3 browsers I attempted everything in, to no avail. Man this is frustrating!

    Where are the WordPress fairies when you need them, to swoop in and fix everything?

    Plugin Author bluey80

    (@bluey80)

    Ok, so since it is working fine on my sites, I don’t have a clue what is going on. If someone wants to try to debug it, here are a few suggestions:

    Add the line

    print_r($_SESSION['wfcart']);

    to scabn.php — this will print at the top of the page the contents of the session, which is where the shopping cart contents are stored. This will confirm that going to the checkout page is wiping the cart contents rather than something else affecting the fine cart. Also, you can use this to check if the shopping carts get edited (emptied) from any other pages.

    Next, try changing the shortcode on the checkout page from [scabn] to [donothing] and see if making that page not a checkout page ‘fixed’ it, i.e. you can now go to the checkout page and the cart doesn’t get emptied (granted, it won’t be a checkout page).

    Assuming that stops the cart getting emptied, change the short code back to [scabn]. Then take a look at the file classes/backend.php — there is a function shortcodes($attrs). Look at the function and start commenting out lines to see what part(s) are causing the problem.

    Plugin Author bluey80

    (@bluey80)

    Ok, I have a thought. If you look at classes/backend.php and find the function shortcodes($atts) you will see that it looks to see if this is a Paypal receipt page (basically, Paypal does a redirect back here after a successful transaction and SCABN then displays a ‘thank you for your order’ and shows a receipt’). The way SCABN detects if you got to this page via a Paypal redirect or by clicking on checkout is the presence of the “tx” variable being passed with the page. Could you have some theme/plugin or something else that is setting passing a variable named ‘tx’? If that were happening, I’d expect that checkout page display “Thank you for your order…” which is why I didn’t think about this, but maybe for some reason it isn’t displaying that.

    To test my theory, first comment out the line there the looks like

    $cart->empty_cart();

    and see if that makes a difference. If so, we need to see why that line is being executed.

    So I haven’t done any super delving in just yet (been working on other things and just saw the additional comments/suggestions).

    One thing I did notice, is if I click update (to update quantity of a product in the cart) whether I changed the product qty or just left it as it was when initially added to the cart, it does the same thing- empties the cart. No checkout page even involved.

    Oi vey! Does that shed light on anything? Also, where do I turn on debug or whatever? or would I just go into the plugin code itself? (again, very minimal php knowledge here and a desire to not wreck the plugin, or my site)

    https://www.proctorsitedesign.com/shop

    Did you take a look at my site and see the behavior yourself? Just curious.

    Plugin Author bluey80

    (@bluey80)

    Ok, on your site, the cart is never stored. If I add item1 to the cart and then add item2, it replaces item1 instead of having both items in the cart. So the problem is that the cart is not ever getting stored. If you go to any page, you lose the cart.

    You could try enabling wordpress debugging by adding / un-commenting out

    define('WP_DEBUG', true);

    to your wp-config.php

    I’m wondering if this may be some security setting in php. Hopefully, it will output warnings, which with WP debuging enabled, should be displayed. Maybe look at your web servers log too. What web server, php version, etc, are you running?

    I am trying something with WooCommerce’s WRAP directions real quick actually… Give me a few minutes to see what this does…stay tuned.

    Well that didn’t do anything productive unfortunately… okay so let me get to trying your recommendation which at this point was to try and figure out why the cart isn’t being stored, right?

    I’ve got the SCABN plugin reinstalled and everything back to the way it was.

    For some WEIRD reason, I can no longer use the title “SHOP” for my store page. All it does is just show me the contents of the home page… so “Pricing” it is, I guess…

    Ok, Debugging is now turned on.

    How would I go about freezing the page mid-navigation in order to see the debug code? or mid, “update cart” operation or “go to checkout” etc?

    Thanks so much for helping out!

    Plugin Author bluey80

    (@bluey80)

    You can’t freeze the page (well can try to stop processing, but I won’t do that) — easier is to put echo lines at different parts in the pages:

    echo "Starting page load<br/>";
    ...
    echo "Finished first part<br/>";
    ...

    this is in the “text” view of like.. my ‘pricing’ page for example..correct? Sorry I’m still new to the PHP scene…

    I have this in my WP Dashboard now at the very top of the window… maybe this helps?

    Warning: session_start(): open(/var/php_sessions/sess_c0001a2f214870214918fef7a0f85d10, O_RDWR) failed: No such file or directory (2) in /hermes/waloraweb037/b1143/moo.trusoundproductionsc/ProctorSiteDesign/wp-content/plugins/simple-cart-buy-now/classes/backend.php on line 59 Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /hermes/waloraweb037/b1143/moo.trusoundproductionsc/ProctorSiteDesign/wp-content/plugins/simple-cart-buy-now/classes/backend.php:59) in /hermes/waloraweb037/b1143/moo.trusoundproductionsc/ProctorSiteDesign/wp-content/plugins/simple-cart-buy-now/classes/backend.php on line 59 Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /hermes/waloraweb037/b1143/moo.trusoundproductionsc/ProctorSiteDesign/wp-includes/functions.php on line 2923

    Plugin Author bluey80

    (@bluey80)

    I believe this error is saying that php is not configured correctly for sessions, which is how SCABN handles the shopping cart contents. On your website, I see the error:

    Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0

    More details at https://www.php.net/manual/en/intro.session.php

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘Nothing on the Checkout Page’ is closed to new replies.