Magento 客户关联网站

发布于 2024-12-14 19:09:49 字数 390 浏览 1 评论 0原文

我安装的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

厌倦 2024-12-21 19:09:49

我找到了解决我的问题的方法:)。

这个
线程讨论了它并提到了解决该问题的扩展。

万一其他人想知道。

/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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文