On our cPanel boxes, missing assets were serving the entire Magento page.
cPanel's defaults to ErrorDocument 404 /404.shtml
but /404.shtml
doesn't exist in Magento's document root, so the .htaccess gets executed again and redirects /404.shtml
to index.php
(using mod_rewrite).
Magento's default .htaccess should specify 404, 500, and other error handlers explicitly.
To fix this beahviour, we added the following to our .htaccess:
ErrorDocument 404 /errors/404.php
We probably should also add 500s as well:
ErrorDocument 500 /errors/500.php
Persistent shopping cart isn't necessarily just the synchronization of the shopping cart experience, it is the persistence of the logged in session, meaning you don't get logged out after some period of inactivity. This always-logged-in experience (popularized by Amazon) gives the customer personalization and allows the store owner to merchandise in a more targeted fashion.
When you are actively logged in as a registered customer you utilize the same cart session and that session is shared by all devices as the records are stored in the database and are refreshed to your logged in sessions on each page load.
Update:
Your original question was 'why does my cart persist across devices even without persistent cart turned on' - which is the question I answered. Perhaps I over-simplified the feature.
So, hopefully this is to your satisfaction - having performed a code review on persistent cart in 1.8 Alpha this is the functionality introduced:
- Adds "not [username]?" to the welcome statement, before logout link
- Adds a 'remember me' checkbox to registration forms
- Provides its own customer registration forms
- Provides its own session object
- Observes login / logout
- Provides a shim between purchase and account access if the persistent login session is being used (to prevent unauthorized purchases, for instance)
- Provides emulation of quotes, customer objects to piggyback data into the regular customer session
- Provides a
synchronizePersistentOnLogout/Login
method that seems to log all browser sessions out if the customer session logs out of one browser (would appreciate some feedback here)
All of the above is to facilitate a non-expiring customer session that gives the store manager the ability to merchandise to the customer differently based on customer segment. With Enterprise Edition Banners, Customer Segments, Promotions one could provide a completely different site experience, based on customer segments alone (geographic location, items/categories purchased, total $ spend in a calendar year, etc.) that would persist to all devices.
Best Answer
If you need data to persist with the shopping cart session, extend the shopping cart. No need to piggyback on the customer persistence.
If you need data, you can extend the following tables -
sales_flat_quote
,sales_flat_quote_item
to inject your domain-specific logic into the sales. The persistence module should resurrect the shopping cart session as per usual - only associating it to customers that have logged in / performed actions on different devices.Persistance is also limited in CE. Wishlists and more aren't available in CE, only in EE. In CE 1.6 / EE 1.11 it was unable to work with compilation. I'm not sure if this was addressed in later releases.