Support » Plugin: WooCommerce » can not add products to cart

  • Resolved Sdoupi

    (@sdoupi)


    Help asap – can not add products to cart

    If I add products it says, product added to cart, but when I hover over the cart icon or just go to the cart page, it says cart is empty, please help asap…

    I tried:
    – deleting cache of browser and plugins
    – deactivated every plugin except Woocommerce
    – deactivated Woocommerce and re-activated Woocommerce
    – roll back Woocommerce version to older version
    – re-installing wordpress latest version

Viewing 15 replies - 1 through 15 (of 67 total)
  • dubh

    (@spmcnerd)

    I’m no pro but I don’t let my cache plugin touch cart or checkout page. Most plugins will have that option to exclude.

    Sdoupi

    (@sdoupi)

    I even deactived the plugin

    Sdoupi

    (@sdoupi)

    I get this error: [Table ‘0_woocommerce_sessions’ is read only]

    Stef

    (@serafinnyc)

    @spmcnerd is right. You should never have cache applied to cart or checkout. Some hosts, like WP hosts already offering cache will omit it for you. Not sure what plugin you’re using but even they don’t always allow you to disable it on specific pages.

    Chances are you have an optimization plugin and its jQuery compression box is checked. Uncheck it and test. Alao, disble all plugins and test.

    Lastly, grab a copy of your system report and paste it here. Goto Woocommerce > Status > Get System Report

    Sdoupi

    (@sdoupi)

    I switched on debugging mode for wordpress in the wp-config file, this is what my websit says now (i added “privacy” to block some private info in this post)

    WordPress database error: [Table ‘0_woocommerce_sessions’ is read only]
    INSERT INTO 0_woocommerce_sessions (session_key, session_value, session_expiry) VALUES (‘1’, ‘a:8:{s:4:\”cart\”;s:6:\”a:0:{}\”;s:11:\”cart_totals\”;s:367:\”a:15:{s:8:\”subtotal\”;i:0;s:12:\”subtotal_tax\”;i:0;s:14:\”shipping_total\”;i:0;s:12:\”shipping_tax\”;i:0;s:14:\”shipping_taxes\”;a:0:{}s:14:\”discount_total\”;i:0;s:12:\”discount_tax\”;i:0;s:19:\”cart_contents_total\”;i:0;s:17:\”cart_contents_tax\”;i:0;s:19:\”cart_contents_taxes\”;a:0:{}s:9:\”fee_total\”;i:0;s:7:\”fee_tax\”;i:0;s:9:\”fee_taxes\”;a:0:{}s:5:\”total\”;i:0;s:9:\”total_tax\”;i:0;}\”;s:15:\”applied_coupons\”;s:6:\”a:0:{}\”;s:22:\”coupon_discount_totals\”;s:6:\”a:0:{}\”;s:26:\”coupon_discount_tax_totals\”;s:6:\”a:0:{}\”;s:21:\”removed_cart_contents\”;s:6:\”a:0:{}\”;s:8:\”customer\”;s:842:\”a:26:{s:2:\”id\”;s:1:\”1\”;s:13:\”date_modified\”;s:25:\”2019-05-21T15:26:49+00:00\”;s:8:\”postcode\”;s:7:\”privacy” GX\”;s:4:\”city\”;s:7:\”privacy”\”;s:9:\”address_1\”;s:14:\”privacy”\”;s:7:\”address\”;s:14:\”privacy”\”;s:9:\”address_2\”;s:0:\”\”;s:5:\”state\”;s:0:\”\”;s:7:\”country\”;s:2:\”privacy”\”;s:17:\”shipping_postcode\”;s:7:\”privacy” GX\”;s:13:\”shipping_city\”;s:7:\”privacy”\”;s:18:\”shipping_address_1\”;s:14:\”privacy”\”;s:16:\”shipping_address\”;s:14:\”privacy”\”;s:18:\”shipping_address_2\”;s:0:\”\”;s:14:\”shipping_state\”;s:0:\”\”;s:16:\”shipping_country\”;s:2:\”privacy”\”;s:13:\”is_vat_exempt\”;s:0:\”\”;s:19:\”calculated_shipping\”;s:0:\”\”;s:10:\”first_name\”;s:4:\”privacy”\”;s:9:\”last_name\”;s:4:\”privacy”\”;s:7:\”company\”;s:0:\”\”;s:5:\”phone\”;s:9:\””privacy”\”;s:5:\”email\”;s:15:\”privacy”\”;s:19:\”shipping_first_name\”;s:4:\”privacy”\”;s:18:\”shipping_last_name\”;s:4:\”privacy”\”;s:16:\”shipping_company\”;s:0:\”\”;}\”;s:22:\”mailchimp_landing_site\”;s:45:\”https://www.tasmim.nl/wp-admin/admin-ajax.php\”;}’, 1558969701) ON DUPLICATE KEY UPDATE session_value = VALUES(session_value), session_expiry = VALUES(session_expiry)

    • This reply was modified 9 months ago by Sdoupi.
    • This reply was modified 9 months ago by Sdoupi.
    • This reply was modified 9 months ago by Sdoupi.
    Stef

    (@serafinnyc)

    That’s great. Can you provide a System Report as well please?

    Sdoupi

    (@sdoupi)

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://www.tasmim.nl
    Site address (URL): https://www.tasmim.nl
    WC Version: 3.6.3
    Log Directory Writable: ✔
    WP Version: 5.2.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: nl_NL
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.2.18
    PHP Post Max Size: 96 MB
    PHP Time Limit: 50
    PHP Max Input Vars: 5000
    cURL Version: 7.58.0
    OpenSSL/1.1.0g
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.3.13-MariaDB-1:10.3.13+maria~bionic
    Max Upload Size: 96 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 3.6.3
    WC Database Prefix: 0_
    Totale databasegrootte: 4.49MB
    Database datagrootte: 3.65MB
    Database index grootte: 0.84MB
    0_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB
    0_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
    0_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB
    0_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
    0_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB
    0_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.02MB
    0_woocommerce_tax_rates: Data: 0.00MB + Index: 0.02MB
    0_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
    0_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
    0_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
    0_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
    0_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
    0_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
    0_woocommerce_log: Data: 0.02MB + Index: 0.02MB
    0_commentmeta: Data: 0.00MB + Index: 0.01MB
    0_comments: Data: 0.07MB + Index: 0.04MB
    0_donation: Data: 0.00MB + Index: 0.00MB
    0_failed_jobs: Data: 0.02MB + Index: 0.00MB
    0_huge_itgallery_gallerys: Data: 0.00MB + Index: 0.00MB
    0_huge_itgallery_images: Data: 0.01MB + Index: 0.00MB
    0_huge_itgallery_like_dislike: Data: 0.02MB + Index: 0.02MB
    0_huge_itgallery_params: Data: 0.02MB + Index: 0.00MB
    0_layerslider: Data: 0.00MB + Index: 0.00MB
    0_links: Data: 0.00MB + Index: 0.00MB
    0_mailchimp_carts: Data: 0.02MB + Index: 0.00MB
    0_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB
    0_nextend2_image_storage: Data: 0.02MB + Index: 0.02MB
    0_nextend2_section_storage: Data: 0.02MB + Index: 0.03MB
    0_nextend2_smartslider3_generators: Data: 0.02MB + Index: 0.00MB
    0_nextend2_smartslider3_sliders: Data: 0.02MB + Index: 0.00MB
    0_nextend2_smartslider3_sliders_xref: Data: 0.02MB + Index: 0.00MB
    0_nextend2_smartslider3_slides: Data: 0.02MB + Index: 0.00MB
    0_options: Data: 1.52MB + Index: 0.05MB
    0_postmeta: Data: 0.57MB + Index: 0.13MB
    0_posts: Data: 0.71MB + Index: 0.08MB
    0_prayers: Data: 0.00MB + Index: 0.00MB
    0_queue: Data: 0.02MB + Index: 0.00MB
    0_revslider_static_slides: Data: 0.02MB + Index: 0.00MB
    0_smush_dir_images: Data: 0.02MB + Index: 0.03MB
    0_termmeta: Data: 0.02MB + Index: 0.03MB
    0_terms: Data: 0.00MB + Index: 0.01MB
    0_term_relationships: Data: 0.00MB + Index: 0.01MB
    0_term_taxonomy: Data: 0.00MB + Index: 0.01MB
    0_usermeta: Data: 0.01MB + Index: 0.01MB
    0_users: Data: 0.00MB + Index: 0.01MB
    0_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB
    0_wc_download_log: Data: 0.02MB + Index: 0.03MB
    0_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB
    0_wc_webhooks: Data: 0.02MB + Index: 0.02MB
    0_woocommerce_termmeta: Data: 0.00MB + Index: 0.00MB
    0_wpgmza: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_categories: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_category_maps: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_circles: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_maps: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_polygon: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_polylines: Data: 0.02MB + Index: 0.00MB
    0_wpgmza_rectangles: Data: 0.02MB + Index: 0.00MB
    0_yoast_seo_links: Data: 0.02MB + Index: 0.02MB
    0_yoast_seo_meta: Data: 0.02MB + Index: 0.00MB
    
    ### Post Type Counts ###
    
    attachment: 191
    custom_css: 1
    customize_changeset: 9
    instructor: 4
    jetpack_migration: 2
    lesson: 3
    nav_menu_item: 19
    option-tree: 1
    page: 37
    post: 5
    product: 23
    revision: 389
    safecss: 1
    scheduled-action: 128
    shop_order: 31
    us_header: 1
    us_page_block: 2
    wpcf7_contact_form: 3
    wpforms: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (25) ###
    
    Advanced Custom Fields: door Elliot Condon – 5.8.0
    Akismet Anti-Spam: door Automattic – 4.1.1
    Autoptimize: door Frank Goossens (futtta) – 2.5.1
    Black Studio TinyMCE Widget: door Black Studio – 2.6.8
    Contact Form 7: door Takayuki Miyoshi – 5.1.3
    Custom Post Type UI: door WebDevStudios – 1.6.2
    WPBakery Page Builder: door Michael M - WPBakery.com – 5.7
    Maintenance: door fruitfulcode – 3.6.1
    Mega Addons For WPBakery Page Builder: door Nasir – 3.1
    Mollie Payments for WooCommerce: door Mollie – 5.1.8
    N-Themes Shortcode: door N-Themes – 1.0.1
    One.com themes and plugins: door One.com – 0.3.9
    Performance Cache: door One.com – 0.1.16
    Really Simple SSL: door Rogier Lankhorst
    Mark Wolters – 3.1.5
    
    Smart Slider 3: door Nextend – 3.3.18
    SN Facebook Like: door Mateusz Lerczak – 1.5.5
    Header Builder: door UpSolution – 2.5.1
    WooCommerce PDF Invoices & Packing Slips: door Ewout Fernhout – 2.2.12
    WooCommerce Services: door Automattic – 1.20.0
    WooCommerce: door Automattic – 3.6.3
    Yoast SEO: door Team Yoast – 11.2.1 – Niet getest met de actieve versie van WooCommerce
    WP Rollback: door Impress.org – 1.6
    Smush: door WPMU DEV – 3.2.0.1
    WP Super Cache: door Automattic – 1.6.5
    WPForms Lite: door WPForms – 1.5.2.3
    
    ### Inactive Plugins (3) ###
    
    Facebook for WooCommerce: door Facebook – 1.9.12 – Niet getest met de actieve versie van WooCommerce
    Jetpack by WordPress.com: door Automattic – 7.2.1
    SiteLock: door SiteLock – 4.0.5
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Winkelbasis: #972 - /boeken/
    Winkelmand: #973 - /winkelmand/
    Afrekenen: #974 - /afrekenen/
    Mijn account: #975 - /mijn-account/
    Algemene voorwaarden: #1305 - /algemene-voorwaarden/
    
    ### Theme ###
    
    Name: Impreza
    Version: 6.0.4
    Author URL: http://us-themes.com/
    Child Theme: ❌ – Als je wijzigingen aanbrengt in WooCommerce of in een hoofdthema dat je niet zelf gebouwd hebt
    raden we het gebruik van een child thema aan. Zie: Hoe maak je een child thema
    
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 128
    Oldest: 2019-04-30 14:30:29 +0000
    Newest: 2019-04-30 14:32:31 +0000
    
    Pending: 0
    Oldest: –
    Newest: –
    
    Canceled: 0
    Oldest: –
    Newest: –
    
    In-progress: 0
    Oldest: –
    Newest: –
    
    Failed: 0
    Oldest: –
    Newest: –
    
    
    Stef

    (@serafinnyc)

    I see the system report was held in spam. So it was delayed.

    The reason you can’t add to cart is because you need to uncheck “Minify excluded CSS and JS files?” in options of your Autoptimize plugin.

    You’ll also need to uncheck cart & checkout in option and that’ll get this initial problem squared away.

    • This reply was modified 9 months ago by Stef.
    Sdoupi

    (@sdoupi)

    It still did not solve the issue…

    Stef

    (@serafinnyc)

    It didn’t solve what issue? You have several in one post.

    Sdoupi

    (@sdoupi)

    It did not solve this issue (the reason why the cart does not work):

    WordPress database error: [Table ‘0_woocommerce_sessions’ is read only]
    INSERT INTO 0_woocommerce_sessions (session_key, session_value, session_expiry) VALUES (‘1’, ‘a:8:{s:4:\”cart\”;s:6:\”a:0:{}\”;s:11:\”cart_totals\”;s:367:\”a:15:{s:8:\”subtotal\”;i:0;s:12:\”subtotal_tax\”;i:0;s:14:\”shipping_total\”;i:0;s:12:\”shipping_tax\”;i:0;s:14:\”shipping_taxes\”;a:0:{}s:14:\”discount_total\”;i:0;s:12:\”discount_tax\”;i:0;s:19:\”cart_contents_total\”;i:0;s:17:\”cart_contents_tax\”;i:0;s:19:\”cart_contents_taxes\”;a:0:{}s:9:\”fee_total\”;i:0;s:7:\”fee_tax\”;i:0;s:9:\”fee_taxes\”;a:0:{}s:5:\”total\”;i:0;s:9:\”total_tax\”;i:0;}\”;s:15:\”applied_coupons\”;s:6:\”a:0:{}\”;s:22:\”coupon_discount_totals\”;s:6:\”a:0:{}\”;s:26:\”coupon_discount_tax_totals\”;s:6:\”a:0:{}\”;s:21:\”removed_cart_contents\”;s:6:\”a:0:{}\”;s:8:\”customer\”;s:842:\”a:26:{s:2:\”id\”;s:1:\”1\”;s:13:\”date_modified\”;s:25:\”2019-05-21T15:26:49+00:00\”;s:8:\”postcode\”;s:7:\”privacy” GX\”;s:4:\”city\”;s:7:\”privacy”\”;s:9:\”address_1\”;s:14:\”privacy”\”;s:7:\”address\”;s:14:\”privacy”\”;s:9:\”address_2\”;s:0:\”\”;s:5:\”state\”;s:0:\”\”;s:7:\”country\”;s:2:\”privacy”\”;s:17:\”shipping_postcode\”;s:7:\”privacy” GX\”;s:13:\”shipping_city\”;s:7:\”privacy”\”;s:18:\”shipping_address_1\”;s:14:\”privacy”\”;s:16:\”shipping_address\”;s:14:\”privacy”\”;s:18:\”shipping_address_2\”;s:0:\”\”;s:14:\”shipping_state\”;s:0:\”\”;s:16:\”shipping_country\”;s:2:\”privacy”\”;s:13:\”is_vat_exempt\”;s:0:\”\”;s:19:\”calculated_shipping\”;s:0:\”\”;s:10:\”first_name\”;s:4:\”privacy”\”;s:9:\”last_name\”;s:4:\”privacy”\”;s:7:\”company\”;s:0:\”\”;s:5:\”phone\”;s:9:\””privacy”\”;s:5:\”email\”;s:15:\”privacy”\”;s:19:\”shipping_first_name\”;s:4:\”privacy”\”;s:18:\”shipping_last_name\”;s:4:\”privacy”\”;s:16:\”shipping_company\”;s:0:\”\”;}\”;s:22:\”mailchimp_landing_site\”;s:45:\”https://www.tasmim.nl/wp-admin/admin-ajax.php\”;}’, 1558969701) ON DUPLICATE KEY UPDATE session_value = VALUES(session_value), session_expiry = VALUES(session_expiry)

    • This reply was modified 9 months ago by Sdoupi.
    Sdoupi

    (@sdoupi)

    This is what the debug mode is telling me

    WordPress databasefout: [Table ‘0_woocommerce_sessions’ is read only]
    INSERT INTO 0_woocommerce_sessions (session_key, session_value, session_expiry) VALUES (‘1’, ‘a:8:{s:4:\”cart\”;s:6:\”a:0:{}\”;s:11:\”cart_totals\”;s:367:\”a:15:{s:8:\”subtotal\”;i:0;s:12:\”subtotal_tax\”;i:0;s:14:\”shipping_total\”;i:0;s:12:\”shipping_tax\”;i:0;s:14:\”shipping_taxes\”;a:0:{}s:14:\”discount_total\”;i:0;s:12:\”discount_tax\”;i:0;s:19:\”cart_contents_total\”;i:0;s:17:\”cart_contents_tax\”;i:0;s:19:\”cart_contents_taxes\”;a:0:{}s:9:\”fee_total\”;i:0;s:7:\”fee_tax\”;i:0;s:9:\”fee_taxes\”;a:0:{}s:5:\”total\”;i:0;s:9:\”total_tax\”;i:0;}\”;s:15:\”applied_coupons\”;s:6:\”a:0:{}\”;s:22:\”coupon_discount_totals\”;s:6:\”a:0:{}\”;s:26:\”coupon_discount_tax_totals\”;s:6:\”a:0:{}\”;s:21:\”removed_cart_contents\”;s:6:\”a:0:{}\”;s:8:\”customer\”;s:842:\”a:26:{s:2:\”id\”;s:1:\”1\”;s:13:\”date_modified\”;s:25:\”2019-05-21T15:26:49+00:00\”;s:8:\”postcode\”;s:7:\” \”;s:4:\”city\”;s:7:\”\”;s:9:\”address_1\”;s:14:\”\”;s:7:\”address\”;s:14:\”\”;s:9:\”address_2\”;s:0:\”\”;s:5:\”state\”;s:0:\”\”;s:7:\”country\”;s:2:\”\”;s:17:\”shipping_postcode\”;s:7:\” \”;s:13:\”shipping_city\”;s:7:\”\”;s:18:\”shipping_address_1\”;s:14:\”\”;s:16:\”shipping_address\”;s:14:\”\”;s:18:\”shipping_address_2\”;s:0:\”\”;s:14:\”shipping_state\”;s:0:\”\”;s:16:\”shipping_country\”;s:2:\”\”;s:13:\”is_vat_exempt\”;s:0:\”\”;s:19:\”calculated_shipping\”;s:0:\”\”;s:10:\”first_name\”;s:4:\”Test\”;s:9:\”last_name\”;s:4:\”Test\”;s:7:\”company\”;s:0:\”\”;s:5:\”phone\”;s:9:\”\”;s:5:\”email\”;s:15:\”\”;s:19:\”shipping_first_name\”;s:4:\”Test\”;s:18:\”shipping_last_name\”;s:4:\”Test\”;s:16:\”shipping_company\”;s:0:\”\”;}\”;s:22:\”mailchimp_landing_site\”;s:45:\”https://www.tasmim.nl/wp-admin/admin-ajax.php\”;}’, 1558988610) ON DUPLICATE KEY UPDATE session_value = VALUES(session_value), session_expiry = VALUES(session_expiry)

    Stef

    (@serafinnyc)

    That’s because neither one has to do with the other. I don’t know how we went from “can’t add to cart” to a complete read only. What did you do in the time you posted your initial request to getting this error? Exactly laid out.

    Stef

    (@serafinnyc)

    Turn off debug mode and work on one problem at a time.

    Sdoupi

    (@sdoupi)

    1. This morning suddenly the website was out, I could not enter it from the frontend or backend. The errormessage was can’t connect with database connection (something like that)
    2. I contacted my hosting company and they fixed it (I do not know how)
    3. But then I entered my backend and came across the [Table ‘0_woocommerce_sessions’ is read only] error (which I assume is connected to the cart) and I came across against another error message [Table ‘0_nextend2_section_storage’ is read only] but that was connected to the plugin Smart Slider 3 according to my host and they were right, when I removed the Smart Slider it went gone
    4. Now I am here, stuck, do not know what to do, and very few people know what to do

    • This reply was modified 9 months ago by Sdoupi.
Viewing 15 replies - 1 through 15 (of 67 total)
  • The topic ‘can not add products to cart’ is closed to new replies.