添加到购物车 [英] Add to cart

查看:135
本文介绍了添加到购物车的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生
我想让购物车全部准备就绪,但是:how我要在数据列表控件中填充所选产品的方法应该是在网格视图中填充UserCart.aspx?

Hello sir
I want to make Shopping cart all ready i started but :ho w to fill my selected product in datalist control should be fill in grid view my UserCart.aspx ?

推荐答案

这实际上取决于您的数据库架构.如果您是通过会话变量维护购物车的,请在数据库中查询产品,并将产品密钥保存在该变量上.
It really depends on your database schema. If you''re maintaining the cart via a session variable, then query your database for the products and save the product key on that variable


此处是购物车的完整实现,请使用看:

http://www.beansoftware.com/asp.net-tutorials/developing-shopping- cart.aspx [ ^ ]

我希望这会对您的应用程序有所帮​​助. :rose:
Here is a complete implementation of Shopping cart, have a look :

http://www.beansoftware.com/asp.net-tutorials/developing-shopping-cart.aspx[^]

I hope this will help you in your application. :rose:


您的问题不是很清楚,但是您基本上可以通过两种方式实现此目的,即客户端还是服务器端.

客户端需要一个数组或类似的数组来存储产品ID和信息的列表,如果需要持久性购物车,服务器端可能会使用会话对象或数据库中的表.

实施购物车的网络上有很多示例,所以我建议您搜索google.

http://lmgtfy.com/?q=asp.net+shopping+cart+tutorial [^ ]

然后,您需要显示购物车,方法是绑定到数据库查询或您创建的对象,或者通过手动迭代数组和进行gridview更新.
Your question is not very clear, but you can basically achieve this in 2 ways, client side or server side.

Client side needs a array or similar that stores a list of the product ids and info, the server side might use a session object, or a table in the database if you want persistent shopping carts.

There are many examples on the net of implementing carts, so i suggest you search google.

http://lmgtfy.com/?q=asp.net+shopping+cart+tutorial[^]

You need to then display the shopping cart, by binding to a db query or the object you created, or by manual iteration of the array and gridview updating.


这篇关于添加到购物车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆