1

I am building a magento site with 1 website and 2 stores and 1 store view for each store.

Each store will sell different products. When customers buy a product from store A, and go to store B buy another product, then they checkout, we want the cart to show the product from store A and store B.

Is it possible with magento without hacking/overriding the core files?

1

Without hacking core files, yes...without rewriting core files, I don't think so.
This is not a built in feature of Magento.
I was able to implement what you are asking for here, almost 2 years ago.
I'm not sure that it works on newer magento versions but you can give it a try:
http://marius-strajeru.blogspot.ro/2013/01/share-cart-between-websites.html.
The idea is to modify the method that stores and retrieves the cart id from the session (Mage_Checkout_Model_Session::_getQuoteIdKey), and the method that verifies the store views that can share the cart (Mage_Sales_Model_Quote::getSharedStoreIds).
Full code and explanations are provided in the link posted above.
It's kind of long to replicate it in here.

  • im not sharing the cart between website but stores instead, the stores are still on the same website. – Doni Wibowo Oct 6 '14 at 6:47
  • 2
    For 2 store views under the same website it should work out of the box...I think. – Marius Oct 6 '14 at 7:03
  • yes it works but there is one issue. when viewing the cart, all files has the same base url. when viewing the cart from domain.com/storeA/ all products have same domain.com/storeA/ including the products that came from storeB. – Doni Wibowo Oct 6 '14 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.