Web 应用程序中的一个帐户、多个用户、多个购物车
我收到了一个有点不寻常的交易网站请求(imo)。
我必须实现为同一用户拥有多个购物车的可能性。这些实际上是购物车,而不是订单模板。
IE:具有多个部门在同一帐户下订购的商店,但不同的人仅针对特定部门下订单。
每个帐户拥有多个用户并不是一种选择,因为这会涉及商店所有者和管理员的“太多”管理。
以前有人必须处理过这个问题吗? 到目前为止的选项是为购物车提供名称,并在登录后提供一个下拉列表或类似的内容,以选择带有某种“忙碌标志”的购物车,以便在另一个会话中使用该购物车时锁定该购物车。
I received a somewhat unusual request (imo) for a transactional web site.
I have to implement the possibility of having multiple shopping cart for the same user. Those really are shopping carts, not order templates.
I.E: A store with several departments ordering under the same account, but with a different person placing orders for a specific department only.
Having more than one user per account is not an option since it would involve 'too much' management from the stores owner and the admins.
Anyone had to deal with this before?
The option so far is to have names for shopping cart, and a dropdown list or something alike after login to choose the cart with some kind of 'busy flag' to lock the cart if it's in use in another session.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这确实是一个奇怪的要求。如果所有不同的部门都使用单独的帐户,这些帐户属于组织的某个公共组,那么这会更有意义。无论如何,对于这种情况,您所描述的内容可能没问题。您可以有一个购物车,但添加到其中的所有商品都可以具有某种用于划分的
dept
属性。我的一个建议是,不要让用户在登录后选择组/部门,而是让该部门成为登录参数的必需部分。这样,您可以立即知道并通知用户其他人已经使用该部门的同一帐户登录。这是相当严格的,但有时最好让用户提前知道,而不是让他们选择项目,然后了解特定部门。购物车已锁定!只是我的2分钱...
This is indeed a strange request. It would make much more sense if all the different departments used separate accounts, which belonged to some common group for the org. Anyhow, for this case something along the lines of what you described is probably fine. You could have a single shopping cart, but all the items added to it could have some sort of
dept
attribute that is used to demarcate.One suggestion I have is that instead of having the user select the group/department after login, you make the department a required part of the login params. That way, you can know and inform the user right away is someone else is already logged in with the same account for that dept. It's pretty restrictive, but sometimes it's better to let the user know ahead of time rather than have them select items and then learn that the particular dept. cart is locked! Just my 2 cents...