Viewing 15 replies - 1 through 15 (of 54 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Cookies are not being set after adding to cart. This could be caused by:

    – server config
    – server caching (varnish)

    Which host? You may want to check with them.

    Logged in users get the WP logged in cookie which your caching rules probably account for.

    Thread Starter simon m123

    (@simon-m123)

    Thanks Mike, its with 123reg, I will check with them

    Thread Starter simon m123

    (@simon-m123)

    I’ve checked with 123reg about server config and server caching, they said that the caching wasnt handled on the server but could be due to caching plugins we are using (W3 Total Cache) or could be due to code in .htaccess file. the code he suggested i remove was between two of these – ## EXPIRES CACHING ## and is as follows:
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType text/css “access plus 1 month”
    ExpiresByType application/pdf “access plus 1 month”
    ExpiresByType text/x-javascript “access plus 1 month”
    ExpiresByType application/x-shockwave-flash “access plus 1 month”
    ExpiresByType image/x-icon “access plus 1 month”
    ExpiresDefault “access plus 2 days”

    removing this hasnt made any difference to the add to cart issue, and the W3 total cache plugin has been deactivated for a week or more now.
    123reg customer support asked for recommended server settings for woocommerce to see if the server config was causing the issue, here is an extract from the support chat session:
    Danny: (12:19): I have checked your hosting package and cURL and SOAP are enabled. You are using PHP version 5.6 and MySQL 5.1.73.
    Danny: (12:20): Please allow me a few more moments to check fsockopen.
    Danny: (12:22): fsockopen is also enabled.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Enable w3 total cache again, disable the caching rules in its settings completely, then deactivate it. w3 can leave remnants of itself behind, such as in your wp-content directory.

    Thread Starter simon m123

    (@simon-m123)

    Thanks Mike but this doesn’t seem to have any effect.

    Thread Starter simon m123

    (@simon-m123)

    Do you think it would be worth re-installing woocommerce?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I don’t think that will make a difference. Do you have any caching files in wp-content directory?

    Thread Starter simon m123

    (@simon-m123)

    There is a cache folder in wp-content directory, with a blogs.php file and index.html file, and the following folders: config, db, minify, object, page_enhanced and tmp

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I’d delete that. What other files are in wp-content? Have you cleared the rules from htaccess, and WP_CACHE from the wp-config.php file?

    Thread Starter simon m123

    (@simon-m123)

    Delete the whole cache folder and its contents?

    I removed the lines from htaccess that i mentioned earlier, see below:
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType text/css “access plus 1 month”
    ExpiresByType application/pdf “access plus 1 month”
    ExpiresByType text/x-javascript “access plus 1 month”
    ExpiresByType application/x-shockwave-flash “access plus 1 month”
    ExpiresByType image/x-icon “access plus 1 month”
    ExpiresDefault “access plus 2 days”

    Ill have a look at wp-config now

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Yes, remove the cache folder as its no longer needed.

    Thread Starter simon m123

    (@simon-m123)

    Ok, will do. I cant see anything like WP_CACHE in wp-config.php

    Thread Starter simon m123

    (@simon-m123)

    Ive deleted the cache folder, the cart problem is still there. Not sure if this makes any difference, but this site runs on a multisite installation. Woocommerce is networked active, it does work on one of the other sites on the network. The layout is a bit messed up but you can see it working on https://www.bath-king.co.uk

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Woocommerce is networked active

    That may actually be related. WC doesn’t work across the network – it needs to be activated per site.

    Thread Starter simon m123

    (@simon-m123)

    Is there a way of installing it per site? as far as i can tell, plugins on multisite set up are all installed through the main network wp admin

Viewing 15 replies - 1 through 15 (of 54 total)
  • The topic ‘add to cart problem’ is closed to new replies.