Open Source client-side Shopping Cart - jQuery/Cookies

随声附和 提交于 2019-12-06 16:16:42

问题


I am looking to implement something that appears to have "shopping cart" functionality, but is completely on the client-side. I can do this using jQuery and cookies (and I event found this Smart Cart 2 plugin for helping with a large part of it), but before I build it - Does anyone know of an existing solution that is completely client-side, and uses javascript (preferrably jQuery) and cookies?

Also, other than the small percentage of users whose browsers don't support javascript and/or cookies, does anyone see a major problem with this approach?


回答1:


simpleCart(js) works quite nicely for light-weight, client-side shopping carts. Obviously manually fill orders to make sure correct funds are deposited for each order.




回答2:


I see security issues with this. Putting something completely on the client-side and then storing it in cookies basically means you are giving complete control of the process to the user. They can edit every single part of the transaction. They can map your jquery ajax calls, etc, and edit them, or even play them out of order.

For example,

instead of 1) put item in cart 2) subtotal 3)charge 4)checkout they could call 1) subtotal 2) charge 3) item in cart 4) checkout.

In any event, anything you implement I'd probably take a good look at to see the security features implemented.



来源:https://stackoverflow.com/questions/5399600/open-source-client-side-shopping-cart-jquery-cookies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!