Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
multiple domain multiple store single checkout
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

I have set up the multiple store on multiple domain but I am having some issues with the checkout.  When using the store switcher it adds the SID in the url which is bad but I am willing to deal with that for now until everything is up and running correctly.  When it adds the SID it shares the cart fine but for some reason it does not always pass the SID. 

My setup is i have three stores inside of one mall.  It is setup exactly like the magento multistore demo. The main mall that holds all products and three other individual stores.  So the domain setup would be mall.com with the three stores store1.com, store2.com, and store3.com

One thing i did notice when i turned off the passing of the SID in the url the cart did not share between stores.  But if i login to store1.com and put something in my cart and switch to store2.com then nothing is in the cart.  When i login under my account to store2.com suddenly the cart has the item from store1.com in the cart.  So in order for it to work across all the stores I would have to login to each store separately then it would share the cart.  But that is annoying especially for a customer.

So there are two problems if one is solved then i don’t have to worry about the other:
1) I was thinking maybe there is a way to login to one store and have it login in to all stores
2) A way to fix the passing of the SID to pass the SID everytime the domain name is changed...which to my understanding is the way it is suppose to work but it doesn’t

Thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
J.T.
Mentor
 
Avatar
Total Posts:  1620
Joined:  2008-08-07
 

The fact sessions are tied to a single domain and hence don’t work across domains is a security feature. So indeed, you can log in to one domain but not to more than one by just logging in to that first one. It’s a feature. Sessions aren’t meant to work across domains. Subdomains, yes, but not domains. So you can have stores share the same cart, all on the same domain, but not multiple domains share the same cart on a different, or any of the many domains.

 Signature 

It takes two to tango, so don’t blame Magento right away if things go tits-up!

Mage Quick FAQ
Q. Installation problems with localhost/xamp/wamp/whatever and/or missing php extensions, help!
A. Get Zend Server - Community Edition is free and will make things a lot easier on you now and when deploying to production

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

I have seen posts from people saying it is possible to have multiple domains and to share a cart

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

http://www.magentocommerce.com/boards/viewthread/3874/
on this thread the 3rd post moshe says:

All stores in same website share customer information, shopping cart, and all connected information.

Different stores in the same website can be on different domains.
HTTP and HTTPS for the same store can be on different domains. Magento will transfer session information as URL query parameter.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

I am now trying to set up a magento multiple store mall using subdomains instead but still having no luck...The problem I am having is getting the cart to be shared between stores...when i log in to one account and switch stores it does not keep me logged in...i followed this guide on this thread on how to set it up http://www.magentocommerce.com/boards/viewthread/38627/

JT you seem to know what you are talking about...any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
eiocreative
Jr. Member
 
Total Posts:  21
Joined:  2009-01-24
 

Pierceaxiom: Disable all caching and see if it’s working then! I have located the issue to having cache turned on means the URL switcher isn’t being passed to the function that appends the SID to the URLS.

They get ignored…

public function getSessionIdForHost($urlHost)

Located on Line 345 of

Mage\Core\Model\Session\Abstract.php

If you output the vairable $urlHost with caching off you will see all the URLs the page is using are listed and then the SID is applied to the required external links. When caching turned on only 1 url was being listed and therefore the SID was not dynamically added.

I am looking now to tell the switcher block to never cache..

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

Hey eiocreative,
thank you for your response...it seemed like i was only in that problem...i actually do not have it set up with subdomains anymore...just different domains but either way it was not working

i did what you suggested and turned off the cache and now it is passing the SID in url again which is great (bad for security purposes but necessary) becasue now it works...only problem left is that it only works using the store switcher...it does not work on the footer links or any other links on one store that lead to another...any ideas there?

again thanks for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
Radek_PL
Jr. Member
 
Total Posts:  5
Joined:  2009-03-11
 

Just an idea as I haven’t got any magento runnining at this moment...I guess the store switcher should be using some URL strings to switch beetween stores. If you find out these URLs and use them for other switching links too (like tabs or buttons, etc.), then this would work like the switcher itself - session would be transferred.

Am I logically right? Hope so smile

Please write if this is correct or you find a solution!

regards,
Radek

 
Magento Community Magento Community
Magento Community
Magento Community
 
Pierceaxiom
Member
 
Total Posts:  31
Joined:  2009-07-02
 

yes i did get this to work...what i did was i looked at how the store switcher worked and noticed that it uses getHomeURL()

this is the key to making it work...the getHomeURL() returns a string of all the urls for each store and its adds the SID for all urls (except the one you are on)...so i just set up an array and used them as the links

if anyone wants help with that, i will be happy to help

There is just one more problem i am having that i don’t think i can get around...Because the SID is being passed to each store when i log out of a store it logs out everywhere...great thats what i needed but the problem is...if i logged out at store2.com and i then go to store1.com and log in it will log me in but it sends me back to store2.com...this is caused by the cookies...so not sure what to do about that

 
Magento Community Magento Community
Magento Community
Magento Community
 
Radek_PL
Jr. Member
 
Total Posts:  5
Joined:  2009-03-11
 

I’m glad I had a good idea grin
Anyway would be nice to have this sorted by some Magento profs in the future, to keep the security…

Thx:)

 
Magento Community Magento Community
Magento Community
Magento Community
 
nar
Jr. Member
 
Total Posts:  28
Joined:  2009-02-19
 

I have one website with two stores and one store view each.  Each store view has a different theme and product selection and each store is on a different subdomain.

For example:

lights.mystore.com
tools.mystore.com

both redirecting to

https://www.mystore.com

for checkout.

When checking out, the theme of the store is passed beautifully to the main domain http://www.mystore.com.

The problem is that I can only switch between stores using the magento store switcher.  If I simply type the domain of the other store, it does not change theme or products.  Rather, it just stays the same, but with the wrong domain in the browser.

This makes it impossible for me to submit products from both stores to product search engines.

What I need is to be able to have the theme and product called correctly for each product url.  I understand this could be done by enabling “Add Store Code to Urls” in configuration.  However, this is not very search engine friendly.

I gather this has something to do with cookies and session handling.  Can anyone please give me some tips?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattbeck
Jr. Member
 
Total Posts:  5
Joined:  2009-01-13
 

Did you ever get this going?

We have a similar problem with cookies.

We have two stores on different domains and we’re trying to get them to share a checkout.

We have the main domain (domain1) setup as one store and an additional domain (domain2) set up as another.

we are using the secure url from the main domain for checkout.

If someone comes to the site from domain1 they can use the store switcher to jump between stores and add items to the cart from both and checkout fine.

If someone comes to domain2, adds an item in that store to their cart they can’t then proceed to checkout because there is no session setup on domain1 (where the checkout is actually going to take place).

The cart on domain2 still gets the item, and if the user then navigates to domain1 (doesn’t need to do anything but load a page there) they would be able to checkout (from either cart).

I’ve tried passing the SID as a hidden input in the cart form and in the action url, neither one works.

I tried manually changing the action url on the cart form to point to checkout on domain1 from domain2, but without a pre-existing session this fails too (actually this throws you to the ‘enable cookies’ page).

I tried loading a page on domain1 in an offscreen iframe to see if that would establish a valid session but it doesn’t seem to.

Any suggestions?

Help please!

Thanks,

Matt

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
275571 users|1264 users currently online|346207 forum posts