I was finally able to accomplish this by adding the line "session.cookie_domain = .domain.com" to php.ini (no PHP code changes to OC!). I'm using OC 126.96.36.199 and PHP5.3. My domain has SSL cert and I have one subdomain (no SSL) with which I wanted to share the cart; it works!
I had to enable php.ini support in my cPanel to get it working, as at first my server was using a global php.ini and wasn't picking up the php.ini file that I added to my server's root directory (you can verify this by running phpinfo.php).
I also got it working by adding the line "php_value session.cookie_domain .domain.com" to the bottom of my .htaccess file. But this only worked on my local install; my live/production site returned a 500 error (not sure why). Note that to get this to work with your localhost, you need to have domain extensions on your local domains. For example, I am using virtual hosts and have my websites set up as "http://website1", "http://website2", etc. But to get this directive to work (share cart with subdomains across multi-store setup), I had to change it to "http://website1.xyz" and "http://sub.website1.xyz".
- http://stackoverflow.com/questions/6449 ... subdomains
- http://stackoverflow.com/questions/7319 ... -localhost
- http://demianlabs.com/lab/post/multisit ... ual-hosts/