Open Source client-side Shopping Cart - jQuery/Coo

2019-04-17 09:54发布

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?

2条回答
来,给爷笑一个
2楼-- · 2019-04-17 10:19

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.

查看更多
时光不老,我们不散
3楼-- · 2019-04-17 10:21

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.

查看更多
登录 后发表回答