How does Magento achieve multi-domain checkout in one single cart? - magento

One of the great features of Magento is the ability to have several domains but with the ability to have the shopping cart contents consistent across each website. Thus reducing the need for customers to repeat the checkout process for each domain.
My question is how is this achieved from a programmer's point of view? How is the session/cookie/whatever it is able to work across different domains?
Thank you

From what I understand they put a little bit of code on the end of the URL when you jump from domain to domain telling you what your session ID is so that it can copy the information over to the new cookie that you are using.

Related

Magento 2 - Transfer cart items from API to web store

I am creating a complex shopping configurator app that allows a user to customize and visualize a product which consists of multiple store items. Once they confirm their purchase, I iterate and add all of the selected products to a guest cart using the .../rest/V1/guest-carts API endpoint.
I would now like to forward the user to the store checkout to continue the purchasing process from the web store, e.g. https://store.url/checkout/cart. Of course, that basket needs to be populated with the items that were added via the API. I've looked through the documentation but not been able to find
anything relevant but I wonder if I can pass over the store_id or the quote_id and the relevant products be inserted accordingly?
Not sure if this is still relevant for you but, I was also working on a similar problem and came across this plugin for Magento 2. Basically what this plugin does is use a customer's token and a quote_id and creates a temporary session on the Magento2 Store and then redirect the user to the checkout page. This was a starting point for me, as I had to customize this plugin further to suit my requirements.
Hope this helps.

One website multiple stores in magento

Please help me on this.
How can i create mutiple stores in with a single installation of magento. It's not like what you are thinking.
Suppose my website is www.pstall.com, In the tech store it will be
tech.pstall.com or the flower shop it will be flower.pstall.com with
the help of sub domain. The shops order will be in their store's
admin. they will not share any data but they will share customer's
login. So that a customer can log in every store with same id and
pass. I will use a static page for the mother store. So that customer ca n easily visit the stores. The sub stores
will be children. The stores won;t share any data even admin. Just
customer information and login.
Please help me how can i do that. Thanks in advance
Try this..
Creating multiple store in a single website
You can do it in several ways:
create many websites
create many stores on one website (then you will have store switcher)
create many store views (then you will have Language switcher)
you don't have any restrictions here, but just need to set Base Url for each website/store/store view.
I would like to recommend you a #1 way and create websites. as later you maybe would like to show some of sites in 2 languages
here I did the same:
http://innativelife.com/
http://body.innativelife.com/
http://soul.innativelife.com/
and also some store can have dedicated domain
http://www.rastrat.net/
but will be placed on same admin
the only issue is that Magento CE not support admin separation per store. which mean - each admin will see data from all stores. But I know how to resolve it ;)
In Magento Multistore are created with
--one website and many stores or
--Multiple websites with each having one or more then one store.
Setup will depend on what all you want to share and what you do not want to share.
Domains can be subdomains(store1.site.com) or same domain(site.com/store1) or totally different individual domains.
To share customer across stores you need to create one website but mulitple stores within that website.

One Magento, One Catalog, Multple Domains, Multi Language, Shared Shopping Cart, SSL on Checkout

This is what I’m trying to achieve on our dedicated server (Direct Admin):
1 Magento (1.6.2.0)
1 catalog
3 domains
domain.nl (is main and has the magento files)
domain.de (is domain alias, not Virtual Host, has no files at all)
domain.se (is domain alias, not Virtual Host, has no files at all)
3 languages
Dutch
German
Swedish
Shared Shopping Cart
SSL on Chekout
Let’s say a Dutch visitor is typing “product X” in Google and finds his product on our German site (domain.de). He adds it to the cart and likes to continue in Dutch. So he clicks the Dutch flag and should be able to checkout on domain.nl.
I tried a couple of things with the language. One way I had 3 websites, 1 for each domain and all with 3 stores, one for each language. So 9 stores and views in total. This was the only way I could get the flags showing. But most of the time the flag image was not showing because the code of the view had to be the 2 letter country code, which can only used once. And when I changed language (thus domain), the cart was not shared.
The other way I had 1 Website with 3 stores, one store and view for each language/domain. But in this case the language selector (flags) where not showing at all.
I’ve been reading allot about this. But all the (mostly old) topics or article I found are about a single subject and so different from each other that I cannot combine them into one.
Thanks for any help!!
Cheers,
Robert
I have played with this concept a bit and I believe this is how you would do it. Under Magento Admin->System->Manage Stores you would set up the following.
One Website (most likely Main Website)
One Store
Three Store Views (One for each language)
Then you will swing into System->Configuration. Select each specific language in the "Current Configuration Scope" then change General->Web->Unsecure->Base URL and General->Web->Secure->Base URL to the URL you want to use for each store. i.e. Your German configuration should not use the Website Setting and should be set to domain.de instead.
For each of your virtual hosts, configure them to all point to your single Magento install. When they come in with the specific URL Magento should route them to the proper language version and, if they select a flag, it should change to the other URL for that language.
Give this a try and let me know what your results are. I have only lightly played with this and have referenced these topics. I agree with you that this is an area that sometimes has too many ways it can be configured and not enough recommended ways.
http://www.magentocommerce.com/boards/viewthread/227246/
http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/navigation/multiple-website-setup

Shared shopping cart between subsites

I'm trying to get a fully functionally Magento 1.6.1.0 installation with 3 sub-sites and a main site (configured each as store inside Magento), that share of course the clients information across the all the stores.
The problem is that I can't seems to be able to have a persistent shopping cart across the all stores, allowing the customers to get products from a sub-site then another and so on without having to pay each time the shipping fees for what is at the end only 1 order.
I've followed several different tutorials that claimed to be able to achieve that but none of them worked as expected, and also none of them specified to which version of Magento they where supposed to work.
Any tip is welcome, thanks to everyone.

Have Magento respond to several domains with the same store

I would like to have my magento install respond to two different domains, e.g.
a.mydomain.com and
b.anotherdomain.com
I need magento to respond with the same store, showing the same customers, the same catalog, same prices, etc.
The difference, of course, is that when the store is accessed through a.mydomain.com all the links and urls should use this domain as baseurl, and when it is accessed through b.anotherdomain.com all links and urls should use b.anotherdomain.com as baseurl.
Is there any way to do so? All the documentation I've found so far deal with having different stores on the same magento instance, while what I need here is to have the same store respond to two different URLs.
Thank you!
Everything I know of Magento says it was designed to prevent exactly this from happening so as not to be penalised by search engines for duplicate content.
You can, however, have multiple stores that share customers and catalog and products and prices and so on, but represent a separate domain each. In System > Manage Stores add several Stores for a single website and use the same root category for them all. Then in System > Configuration > Web assign the various domains.
easy enough, just set them both to use the same store code (or just default)
have a look in index.php
you can set the $mageRunCode to be whatever you want, you don't have to use the server environment variables method they have there, look at earlier versions of Magento to see the index.php file there.
see this old article of ours
http://www.edmondscommerce.co.uk/magento/magento-multistore-setup-in-a-nutshell/

Resources