Showing posts with label incoming. Show all posts
Showing posts with label incoming. Show all posts

Tuesday, March 13, 2012

Stuck working on ecommerce carthelp plz?

I'm working on an ecommerce site with asp.net and I am currently focusing on the cart page. I have an incoming prodId and Qnty (quantity). These values are stored to an array (the reason for this is so that I can leave the cart page and come back and have all the cart items still available).

Then I set up a table for design elements. And in this table I add an inner-table. This inner table is where I assemble the Product Information. Since the array can have 1 to many items in it, this has proven tricky.

I made a loop to run as long as the array provides prodId's and in this loop I create a new Row on this inner-table. These rows have the product info for each product. There is the product name, price, quantity, removal box.

I add the controls to the table and it all works great with one entry in the array.
If there are multiple entries in the array, its no go. I am figuring this is because there is only one of each product info variable...and the loop creates rows with reference to these variables.

I am kinda stuck and wondering if anyone has any suggestions or other ways of going about this.

One idea that I have been wondering is the possibility of creating a variable whose name includes another variable?

In other words, create:

Dim prodLink0 as new hyperlink
(WHERE the 0 is the value of a variable, such as Y)

Dim prodLink1 as new hyperlink
(WHERE the 1 is the value of a variable, such as Y)

Dim prodLink2 as new hyperlink
(WHERE the 2 is the value of a variable, such as Y)

If I could do this...then I'de be able to make individual variables for each table row.

Any help would be so helpful.
Thanks a ton in advance.i recommend visiting these websites for better info on shopping carts:

1- http://www.quantumsoftware.com.au/OnlineLearning/Programming/DotNet/ASP/ShoppingCart.aspx

2-
http://www.codeproject.com/useritems/shopcart.asp

3-
http://www.sitepoint.com/article/1055

best of luck.