Zen Cart upgrades, particularly 1.3.9, often have changes to how Zen Cart handles sessions. This can cause login issues, add to cart issues, and problems to any other functionality that relies on sessions.
The two most common issues are with adding to cart and logging in. With adding to the cart, even when you click add to cart, the shopping cart still shows it is empty. If you check ADMIN->TOOLS->WHO’S ONLINE you’ll see a new session being created every time. If this is not happening, then sessions probably aren’t the issue. The same thing will happen when trying to login or register, a new session will be created each time but you will not be able to login.
- First, clear your browsers cache, then restart your browser and try again. If this resolved your issue, the problem may only affect those users who have stored data in their browsers from before the upgrade. In time this will sort itself out. However, if on the same browser you continue to have the issue or it happens intermittently, continue reading.
- Next, you should make sure the issue isn’t related to any particular module. Common culprits of session issues can be SEO URLs modules like Simple SEO URLs, Magic SEO URLs, or Ultimate SEO URLs. Try disabling the module, and repeat step 1 above. If this solves the issue, try upgrading to the latest version of the module and trying again. If the latest version doesn’t work, disable the module and contact the author.
- Check ADMIN->CONFIGURATION->SESSIONS->SESSIONS DIRECTORY and make sure the path is correct and matches what you see in your configure.php files.
- In your configure.php files, set the cache methods to “db” and “database”.
- Try overriding the cookie path by uploading the following file to /includes/extra_configures/
- If using Simple SEO URLs, open .htaccess and change
RewriteRule ^(.+) index.php/$1 [E=VAR1:$1,QSA,L]
RewriteRule ^(.+) index.php/$1 [E=VAR1:$1,QSA,L,PT]
- This is not a solution, but was noticed in an upgrade performed on a client’s website by a third party. We found that issue could be resolved by changing ADMIN->CONFIGURATION->SESSIONS->RECREATE SESSION to “False”. Normally this should be set to “True” and may mean that the session files were not properly upgraded. In this case, carefully recheck your upgrade.
Regardless of which solution you try, always repeat step 1 after each step. Hopefully one of these will resolve the problem.
If you happen to find another common source for this issue, please post your resolution and we’ll add it to the tutorial.