try this works definitely, but its better to overwrite model file.
thanks to this post.
Single Cart multiple websites in Magento
I've made it different way and it works: I have single installation with multple domains and store and single SSL
I have main web site where i have all products from my other websites and it set with SSL.
1. Share customers account between multi-store:
You can configure this feature here: System -> Configuration -> Customer Configuration -> Share Customer Accounts ->Global
2.Share the cart content between Magento multi-store websites:
Magento uses separate cart sessions for each store. To use one website on the checkout session you need to modify the Mage_Checkout_Model_Session
class.
Copy this file: app/code/core/Mage/Checkout/Model/Session.php
to: app/code/local/Mage/Checkout/Model/Session.php
.
After that add the following source code to the class:
class Mage_Checkout_Model_Session extends Mage_Core_Model_Session_Abstract
{
const CHECKOUT_STORE_ID = 1;
public function getCheckoutStoreId()
{
return self::CHECKOUT_STORE_ID;
}
Change CHECKOUT_STORE_ID
value 1
to your Magento store ID with all products and SSL.
Next, find all such elements in the file:
Mage::app()->getStore()
and change them to:
Mage::app()->getStore($this->getCheckoutStoreId())
And that is it!
Clear Magento cache and check your store. Now your Magento will use one cart for different multi-domain stores websites.
There are 3 limitations of this solution:
- All prices in the cart will be from the store you selected (using
CHECKOUT_STORE_ID
). So if you have different prices for different
stores it will not work in the cart.
- The currency in the cart will be the same as in the store you selected.
- The link for editing items in the cart will will not redirect customer to original cart website.