0

We have following situation on Magento 1.9.2.2 installation (ultimo theme) with multistore setup as websites in subfolders, e.g. domain.com/en-ca, etc..

Add to cart works when on the default website (domain.com) but not when using a website in the subfolder, e.g. domain.com/en-ca/

-Add to cart works when a user is logged in. -Same problem on staging and live domain (same hosting environment) -Share customer accounts set to global.

No erros are reported in system log. Cookie setting as follows:

  • Cookie Lifetime: 86400
  • Cookie Path: /
  • Cookie domain: staging.domain.com
  • Http only: yes Cookie restriction mode: No

Frontend session cookies are carried over when trying to add something to the cart, but cart remains empty. If leaving Cookie Path and Cookie domain field empty: Cookie is set in path /en-ca when checking browser dev tools.

Form-key validation should not cause this because it works on default website? I suspect it is due to the multi-store setup as it works on default site. However, all else on multistore seems to work.

0

I was able to solve it. The exception.log file gave the answer.

The error was: 'Zend_Cache_Exception' with message 'cache_dir "tmp/" must be a directory' in /xxx/xxx/magento_staging/lib/Zend/Cache.php:209

Found the answer to this issue here: https://stackoverflow.com/questions/16031456/message-cache-dir-must-be-a-directory

Then modified file.php in lib/Zend/Cache/Backend/ on line 98 from

 protected $_options = array(
        'cache_dir' => '/tmp',

to

 protected $_options = array(
        'cache_dir' => '/your/path/magento_staging/tmp',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.