duanjiong2021 2015-06-16 14:13
浏览 34

一次将php购物车限制为1个卖家ID?

I have a fully functional cart, programmed with PHP that uses session cookies. My site will host items from multiple sellers and to avoid getting into PayPal parallel payments (just now) I need to be able to limit each session to items from 1 seller only per checkout. What is the best way to go about this?

I have tried counting seller IDs and running an if statement (if >1) to redirect to a slightly altered cart page requesting items from multiple sellers to be removed in order to continue.

The problem with this approach seems to be with counting the arrays (it will only count 1 id that relates to one particular item in the cart array).

Any suggestions would be greatly appreciated.

  • 写回答

1条回答 默认 最新

  • douju4594 2015-06-16 14:20
    关注

    After your client choose his first item, you may refresh the pages, displaying only the newly allowed items (the ones that are from the same sellers as the first choosen item).

    But it seems strange to force the user to do that...

    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据