donglong1465 2014-02-20 05:44
浏览 42
已采纳

在子域中的多个商店中共享opencart登录会话

I have a opencart site with muti store installed. There are around 4 stores installed in sub domains using the multi store feature

mystore.com
a.mystore.com
b.mystore.com
c.mystore.com

the problem is when a user logins to any store and if he is moving to a different store, the user needs to login again. I find this annoying for users.

Is there a way to share the login session across all the subdoamins so when a users logins to any store he will be logged to all the other stores automatically?

I need only share only the login, not the cart.

any help will be appreciated.

  • 写回答

2条回答 默认 最新

  • douxianji6104 2014-02-20 06:00
    关注

    To achieve this type of structure, You need to work as API structure. Follow steps,

    1) Create one token on login and store this token over session/memcache server

    2) Store this token in your cookie

    3) Pass this token on every call of your domain. Fetch from cookie and pass to your website

    4) Your website will identify this token with your session server. If found then it's logged in

    Hope that helps !!!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?