doujia1163 2011-09-16 01:42
浏览 45
已采纳

多页结帐 - 传输数据

I'm doing a simple checkout in a small eshop and I'd like to give the user the option of a final review. So the flow is Basket -> Buyer information -> Order review -> Order confirmation.

Now the question is, what would be the best way to transfer the data between phase 2 and 3?

One option is to use HTML and hidden form fields. The downside is that I have to do another input check after phase 3 (since the input is modifiable by user).

Another option is to use sessions. As the order is stored in an object (Sf2 Entity), I'd have to convert it to an array and later convert it back. Also, I've read that putting too much data into session variables can have negative effect on the performance.

Third option would be storing in the db but I'd prefer not to store anything until final confirmation.

Are there any better options?

  • 写回答

4条回答 默认 最新

  • dpo60833 2011-09-16 01:58
    关注

    I think session variable should be fine here, unless you have a ton of form data. You can always remove that data after final confirmation if you worried about memory.

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

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献