Magento 客户关联网站
我安装的 magento 设置为全球共享客户帐户。因此任何客户都可以登录任何 magento 网站。 但我希望他们在登录后重定向到他们的“关联网站”。
我重写了 AccountController 并重写了登录流程,并让 _loginPostRedirect() 函数处理重定向。他们可能是一个更好的方法来做到这一点,但它“有效”。
问题是他们被重定向后没有登录。 据我所知,会话中的某种匿名用户会跟踪您所在的网站。这也是您登录后登录的地方。
我想重置/更新或做一些事情让magento 在其关联的网站上登录客户。
我还查看了 Mage/Customer/Model/Session.php 并将 website_id 硬编码在我认为负责此操作的地方,但没有效果。
欢迎任何提示/答案。
My installation of magento is set to share customer accounts global. So any customer can log in to any magento-website.
But I want them to be redirected to their "associated-website" after they loggged in.
I override the AccountController and override the Login-flow and let the _loginPostRedirect() function deal with the redirect. Their may be a better way to do this but it "works".
The problem is that they are not logged in after they've been redirected.
As far as I know it is some sort of anonymous user in the session that keeps track of what site your on. And it is also the place you will be logged in to after you've logged in.
I want to reset/update or do something to get magento to sign in the customer on their associated website insted.
I've also looked at the Mage/Customer/Model/Session.php and hardcoded the website_id on places I've thought were in charge of this without effect.
Any hint/answer is welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决我的问题的方法:)。
这个
线程讨论了它并提到了解决该问题的扩展。
万一其他人想知道。
/G
I found a solution to my problem :).
This
thread talks about it and mention an extension that solves the problem.
In case someone else is wondering.
/G