Page 1 of 1

Share login sessions in sub domains - multi store

Posted: Wed Feb 19, 2014 2:17 am
by livewire
Hi

I have created 4 stores in subdomains using the multi store feature. But the problem is if a user needs to purchase something from my main website to the 1st multi store, he needs to login again. The log process needs to be done on each and every subdomain.

isnt it possible to make the users 1 time and be logged in on all the sub domains? rather than asking them to login multiple times?

any help will be highly appreciated!

Re: Share login sessions in sub domains - multi store

Posted: Fri Feb 21, 2014 8:25 pm
by livewire
Any help on this please?

Re: Share login sessions in sub domains - multi store

Posted: Sun Mar 06, 2016 7:43 pm
by saliverdim
help me please.
open new other domain and config sameone with default but not share cart and all info :(

enable session admincp :(

can you help me ?

Re: Share login sessions in sub domains - multi store

Posted: Fri May 20, 2016 9:20 pm
by donisleno
Very Easy Solution,

1. OPEN FILE: system/library/session.php
2. FIND LINE: session_set_cookie_params(0, '/');
3. APPEND : session_set_cookie_params(0, '/','**.DOMAIN.COM**);

Make sure to include the period **"."** before DOMAIN.COM

That's it... Now login sessions started on **www.domain.com** is shared with **www.sub.domain.com**

Re: Share login sessions in sub domains - multi store

Posted: Fri Jun 03, 2016 7:18 pm
by saudashfaq
@donisleno
solution is not working ........... is there something still missing?

Re: Share login sessions in sub domains - multi store

Posted: Sun Jul 31, 2016 4:35 am
by saliverdim
donisleno wrote:Very Easy Solution,

1. OPEN FILE: system/library/session.php
2. FIND LINE: session_set_cookie_params(0, '/');
3. APPEND : session_set_cookie_params(0, '/','**.DOMAIN.COM**);

Make sure to include the period **"."** before DOMAIN.COM

That's it... Now login sessions started on **www.domain.com** is shared with **www.sub.domain.com**
hi,

I wait for 1 year.thanks but I cant do it becouse my website total 3 and no subdomain other domain and other hosting.
openbasedir no permission for me.

now,

I want to share customer cart and login only. :( be couse database the same all my website and opencart 2 admin panel session share on.and created stores add link everything setting OK.but doesn't work share cart or logins :(( try 4 openacrt version but doesn't work.try journal 2 thame 10 version but doesn't work.

with session.php and Can I? please help me ?

opencarrt version : 2.0.3.1
journal 2.7.0

Re: Share login sessions in sub domains - multi store

Posted: Tue Aug 02, 2016 2:41 am
by straightlight
saliverdim wrote:
donisleno wrote:Very Easy Solution,

1. OPEN FILE: system/library/session.php
2. FIND LINE: session_set_cookie_params(0, '/');
3. APPEND : session_set_cookie_params(0, '/','**.DOMAIN.COM**);

Make sure to include the period **"."** before DOMAIN.COM

That's it... Now login sessions started on **www.domain.com** is shared with **www.sub.domain.com**
hi,

I wait for 1 year.thanks but I cant do it becouse my website total 3 and no subdomain other domain and other hosting.
openbasedir no permission for me.

now,

I want to share customer cart and login only. :( be couse database the same all my website and opencart 2 admin panel session share on.and created stores add link everything setting OK.but doesn't work share cart or logins :(( try 4 openacrt version but doesn't work.try journal 2 thame 10 version but doesn't work.

with session.php and Can I? please help me ?

opencarrt version : 2.0.3.1
journal 2.7.0
One question I would have is why would you want to share the login along with the cart?

Re: Share login sessions in sub domains - multi store

Posted: Thu Aug 04, 2016 6:21 am
by saliverdim
I Have same one database 3 stores.
but login 1.stores after jump 2.store but logout (for customer)

help me ?

Re: Share login sessions in sub domains - multi store

Posted: Fri Aug 12, 2016 3:01 am
by saliverdim
please help me ?

Re: Share login sessions in sub domains - multi store

Posted: Sun Dec 10, 2017 5:10 pm
by steven09176
It worked to me in opencart 2.3.0.2 by the steps below
1. OPEN FILE: system/library/session.php
2. FIND LINE: session_set_cookie_params(0, '/');
3. APPEND : session_set_cookie_params(0, '/','.your DOMAIN');
4. Clear caches from the browser

Re: Share login sessions in sub domains - multi store

Posted: Sun Dec 10, 2017 11:16 pm
by straightlight
Take note that the solution above will not be resolved for domains using SSL since SSL does not rely on cookies.

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 6:32 am
by victorj
straightlight wrote:
Tue Aug 02, 2016 2:41 am
[quote="One question I would have is why would you want to share the login along with the cart?
The question is not why would you but why not share common log in and share a shopping cart.
I can think of many reasons to do so.
imagine a large shop with multiple categories and loads of products,
create a miltistore shop with unigue domain names reprecenting product in particular caregories, customers can jump beteween shops order different products form "different shops" and through a shared checkout only once.

it would give a great seo advantage increase sales and all from within 1 singel admin interface.

Food for thought.

if anyone would create a mod that would do that and he/she would ask a € 100 for that mod i would gladly pay that.

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 6:38 am
by straightlight
victorj wrote:
Tue Dec 12, 2017 6:32 am
straightlight wrote:
Tue Aug 02, 2016 2:41 am
[quote="One question I would have is why would you want to share the login along with the cart?
The question is not why would you but why not share common log in and share a shopping cart.
I can think of many reasons to do so.
imagine a large shop with multiple categories and loads of products,
create a miltistore shop with unigue domain names reprecenting product in particular caregories, customers can jump beteween shops order different products form "different shops" and through a shared checkout only once.

it would give a great seo advantage increase sales and all from within 1 singel admin interface.

Food for thought.

if anyone would create a mod that would do that and he/she would ask a € 100 for that mod i would gladly pay that.
It is great, indeed, to share new or existing ideas. Although, on what has been explained above, what happens when the cart needs to load the content and that the product ID being added to the cart is not among the stores that the customer did add previously? For instance, he remains on the last selected store but the product ID is owned by another store. How would all the stores be reunited together from the store if the order processing mechanism can only process one store - including the payment provider?

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 6:43 am
by victorj
That is the question, trying to solve that for some time now.
fixed it for a subdomain multistore running ssl, but not multistore with unique domain names, and that what i want.

in holland there is 1 large extreem sucesfull company who did accomplish that, they have a multistore shop with over 300 domains all working as 1 singel shop and as far as i know they are the only one who did this

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 6:46 am
by straightlight
There might also be a reason why they might be the only one who did accomplished it. It might be due to budgetary reasons and also based on a payment provider that may allow multiple stores to be processed with the orders. ;)

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 6:57 am
by victorj
Its the way they work with multidomain cookie, payment provider is no problem, i can connect as many store as i like as with all payment processors here in holland.

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 7:07 am
by straightlight
Unless using an extension for your payments, the Opencart extension payment files from the core only provides the current and selected store in order to process an order no matter which one of them you choose to use when installing the payment extension from the admin.

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 7:14 am
by victorj
Would you like to discuss this in a private manar, so i can show you what i accompished in a sub domain multistore and how payment processing is done over here.
Im higly interested in this and wiling to pay.
if so just check my signature, easy to reach by mail.

Re: Share login sessions in sub domains - multi store

Posted: Tue Dec 12, 2017 7:15 am
by straightlight
PM sent.