|
Hi there, I was wondering if anyone could direct me to a link/source that provides script for a shopping cart model, possibly similar to the one offered by this site (i'm not a coadtoad plus member). I'm using VB and asp.net with an sql database, and I'm just looking for some helpful sources before I get started on building a shopping cart function for my site. Thanks !
|
|
|
I noticed you didn't have any replies. While I can't speak for everyone, I can give you my reasons for not jumping in with an answer:
1) The question is very general. You can find hundreds of links to ASP.NET shopping carts with a simple Google Search.
2) I've never used any off-the-shelf package for this. Every eCommerce system I've ever worked on was unique to the company, and so I wrote unique software.
3) Writing a truly robust eCommerce system is HARD. There is an enormous number of things to contemplate. While I am happy and willing to answer specific questions, an open-ended discussion of the intricacies of eCommerce is outside the scope of an online forum dicussion.
Good luck with your application. As you proceed, if you have specific questions, please post them!
|
|
|
|
|
I've been using this site http://www.sitepoint.com/article/ne...rt-datatables/2
as a starting point to help me build this shopping cart.. I've ran into a problem. I can successfully add one row to the shopping cart, but when I go back to attempt to add a second row, it simply overwrites the first and displays only one row with the last product I added to the cart. I think it may have something to do with storing the data table in the session. Maybe you will be able to see something I'm overlooking.
If Not IsPostBack Then
makeCart()
End If
'check if the customer is adding something to the cart or just browsing
Dim AddCheck As Integer = CType(Session.Item("CallAdd"), Integer)
If AddCheck = 1 Then
Dim part As Integer = CType(Session.Item("partAdd"), Integer)
Dim quant As Integer = CType(Session.Item("quanadd"), Integer)
objDT = Session("Cart")
Dim Product = part
objDR = objDT.NewRow
objDR("Quantity") = quant
objDR("Product") = Product
objDR("Cost") = 69
objDT.Rows.Add(objDR)
Session("Cart") = objDT
shopGrid.DataSource = objDT
shopGrid.DataBind()
AddCheck = 0
End If
End Sub
Private Sub makeCart()
objDT = New System.Data.DataTable("Cart")
objDT.Columns.Add("ID", GetType(Integer))
objDT.Columns("ID").AutoIncrement = True
objDT.Columns("ID").AutoIncrementSeed = 1
objDT.Columns.Add("Quantity", GetType(Integer))
objDT.Columns.Add("Product", GetType(String))
objDT.Columns.Add("Cost", GetType(Decimal))
Session("Cart") = objDT
End Sub
|
|
|
|
|
|
|
|