cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to add product to cart on magento website in subfolder

SOLVED

Not able to add product to cart on magento website in subfolder

I've been searching all over to find a solution to our issue. We are running a magento marketplace (1.9.2.2) with multiple magento websites as subfolders:
domain.com/website1
domain.com/website2
etc..
Each website has a store view.

Issue: I can add products to the cart in the default website (domain.com), but adding products from the magento websites/stores running in the subfolder, does not work. The message: The cart is empty....

Checked:
- system.log file (no error as far as I can tell)
- cookies are set (tried all kinds of configurations), currently life set to 3600 (tested 86400), other options are default settings (empty), but tried also with setting various cookie domains, -> no effect
- customer data shared globally
- prices set per website
- products released for all websites/stores
Followed this tutorial for multi store setup:

https://www.hostknox.com/tutorials/magento/multistore

 

I really run out of any ideas why it does not work.
What could prevent adding products to the cart if the website/store is in a subfolder?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Not able to add product to cart on magento website in subfolder

Resolved thes in the meantime. Found the culprit after checking the exception.log file whre this error was shown: '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 about the error here: https://stackoverflow.com/questions/16031456/message-cache-dir-must-be-a-directory

It seems that due to the subfolder configuration, the path in file.php in lib/Zend/Cache/Backend/ on line 98 needs to be adapted. Like so:

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

 

View solution in original post

1 REPLY 1

Re: Not able to add product to cart on magento website in subfolder

Resolved thes in the meantime. Found the culprit after checking the exception.log file whre this error was shown: '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 about the error here: https://stackoverflow.com/questions/16031456/message-cache-dir-must-be-a-directory

It seems that due to the subfolder configuration, the path in file.php in lib/Zend/Cache/Backend/ on line 98 needs to be adapted. Like so:

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