Hello everyone,
We are running into a pretty serious issue with add to cart and multistore functionality. We have created a custom frontend for our client that does not use magento, but we use magento for backend management and for checkout.
Our frontend (and magento setup) has multiple different stores with different products. But the setup we use for adding to cart is not working for any site besides the first one we setup.
Currently we are using this code to generate our add to cart url. $locStr = Mage::helper('checkout/cart')->getAddUrl($event); This is set as the form submit action from a custom front facing php file. For sites other than site 1 the form submit just refreshes the page (it doesn't work), but for products in site 1 this code works fine.
If we click to go to the shopping cart after the add to cart fails it shows an error:
This is on the checkout/cart/ page. Also it shows the store id is the one associated with site 1 instead of the site the product is actually on.
So I think the error is I'm not correctly routing the store that the customer should be accessing to the checkout/cart/ page but I have no idea how I would do this. I'm also curious that the getAddUrl code does not correctly associate the product to the correct store.
I'm out of ideas and options and we are running close to the release date. Let me know if you have any ideas
To answer my own question.
What we had to do is set System > Configuration > Web > URL Options, change Add Store Code to URLs to "Yes". Then we were able to initialize the Mage::app() to the right store code and the add to cart url then correctly routes to the site that has the product.
Hey All,
I am having a very similar issue. I have setup the multi store using the symlink method and everything is working fine BUT the cart and session on the new store. for the life me i can't figure out why the session is not working. I have tried changing the Session Cookie Management but it doesn't work whatever the settings. Any ideas?
Main Site
public_html/app
public_html/example
public_html/includes
public_html/lib
public_html/media
public_html/skin
public_html/var
public_html/js
Symlinks
public_html/adinawatches.com/app
public_html/adinawatches.com/includes
public_html/adinawatches.com/lib
public_html/adinawatches.com/media
public_html/adinawatches.com/skin
public_html/adinawatches.com/var
public_html/adinawatches.com/js