• Resolved DNCmaps

    (@dncmaps)


    The add to cart button is not working for customers who are not logged into the site.

    It works fine for myself when logged in as the admin and i have just had a customer place an order when they were logged in. However anybody who is a ‘guest’ clicks add to cart and it just loads up the cart with nothing in it.

    any ideas would be good.

    I’ve tried changing theme to see if there was a conflict there, but it stayed the same.

    https://www.getaplan.co.uk

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter DNCmaps

    (@dncmaps)

    System report:

    ### WordPress Environment ###
    
    Home URL: https://www.getaplan.co.uk
    Site URL: https://www.getaplan.co.uk
    WC Version: 2.5.1
    Log Directory Writable: ?  /var/www/vhosts/getaplan.co.uk/httpdocs/wp-content/uploads/wc-logs/
    WP Version: 4.4.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.3.2-1ubuntu4.19 - We recommend a minimum PHP version of 5.4. See: How to update your PHP version
    PHP Post Max Size: 25 MB
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.1.41
    Max Upload Size: 25 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.5.1
    :
    woocommerce_sessions: Table does not exist
    woocommerce_api_keys: Table does not exist
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    
    ### Active Plugins (14) ###
    
    Arconix FAQ: by John Gardner – 1.6.1
    Contact Form 7: by Takayuki Miyoshi – 4.3.1
    Google Analytics by Yoast: by Team Yoast – 5.4.6
    Salient Visual Composer: by Michael M - WPBakery.com | Modified by ThemeNectar – 4.3.5
    Really Simple CAPTCHA: by Takayuki Miyoshi – 1.8.0.1
    Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri
    INC – 1.7.17
    
    WooCommerce PayPoint Payment Gateway: by VanboDevelops – 1.2.3
    WooCommerce jQuery Cookie Fix: by Splashing Pixels (Roy Ho) – 1.0
    WooCommerce PDF Invoices & Packing Slips: by Ewout Fernhout – 1.5.26
    WooCommerce Product Add-ons: by WooThemes – 2.7.14
    WooCommerce: by WooThemes – 2.5.1
    WooThemes Helper: by WooThemes – 1.5.9
    Yoast SEO: by Team Yoast – 3.0.7
    WP Htaccess Editor: by Lukenzi – 1.3.0
    
    ### Settings ###
    
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #23 - /shop/
    Cart: #25 - /cart/
    Checkout: #27 - /checkout/
    My Account: #29 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Salient
    Version: 5.5.4
    Author URL: https://themenectar.com
    Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: salient-original/woocommerce/cart/cart-shipping.php version 2.3.0 is out of date. The core version is 2.5.0
    salient-original/woocommerce/cart/cart-totals.php
    salient-original/woocommerce/cart/cart.php
    salient-original/woocommerce/cart/shipping-calculator.php
    salient-original/woocommerce/content-product.php version 2.4.0 is out of date. The core version is 2.5.0
    salient-original/woocommerce/content-single-product.php
    salient-original/woocommerce/single-product/product-image.php
    salient-original/woocommerce/single-product/tabs/description.php
    salient-original/woocommerce/single-product/tabs/tabs.php
    
    : Learn how to update outdated templates

    [Moderator Note: No bumping, thank you.]

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    woocommerce_sessions: Table does not exist

    Disable and re-activate woocommerce. This table has not been created – your DB user may not have create permissions.

    Thread Starter DNCmaps

    (@dncmaps)

    ok so i tried deactivating and reactivating the plugin. i have updated the theme to the most recent version and the tables still haven’t created.

    Sorry to highjack – also having this problem. My hosting provider suggested using the php.ini file to use a different session file? Doesn’t seem to have worked, though.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Does the database user setup in your wp-config.php file actually have permission to create tables? If not you may have to update that user or create the tables manually.

    Thread Starter DNCmaps

    (@dncmaps)

    the DB user does yes. i would have thought it couldn’t have created the other tables otherwise.

    if i have to where do i need to go to create the tables manually?

    Hi there. I think I have fixed it. WooCommerce doesn’t actually use PHP “sessions” as such. It stores them in the database, hence the error in the backend.

    Essentially, I uploaded/installed WooCommerce to a blank installation of WP. Went into phpMyAdmin, exported the [prefix]_woocommerce_sessions table, and imported them into my live site’s database and BOOM. All sorted.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Thread Starter DNCmaps

    (@dncmaps)

    thanks for this.

    i generated the tables manually in the database and all is working now.

    cheers.

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    DNCmaps if you could find server error logs and see if there was a reason these tables were not created, I’d appreciate it!

    Thread Starter DNCmaps

    (@dncmaps)

    i shall have a look tomorrow for you.

    Thread Starter DNCmaps

    (@dncmaps)

    I didn’t see any error logs that related to the tables that weren’t created unfortunately.

    woocommerce_session manual creation helped me, too.
    Thanks guys!

    Hi guys can we have more details for dummies ?

    I have the same issue and didn’t get the solution. What is the scheme step by step.

    Thanks for you help.

    Mike Jolley posted a link. woocommerce_session table scheme is there, “and it goes like this:” ??
    CREATE TABLE {$wpdb->prefix}woocommerce_sessions (
    session_id bigint(20) NOT NULL AUTO_INCREMENT,
    session_key char(32) NOT NULL,
    session_value longtext NOT NULL,
    session_expiry bigint(20) NOT NULL,
    UNIQUE KEY session_id (session_id),
    PRIMARY KEY (session_key)
    )

    Put your prefix instead of {$wpdb->prefix}

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Add to cart not working for customers who aren't logged in’ is closed to new replies.