Saturday, March 24, 2012

Shopping Cart Query

I have a link here on my products page

<a href="http://links.10026.com/?link=cart.asp?productid=1">A nice pair of shoes</a>

This works fine. It transfers to the cart.asp page showing cart.asp?productid=1 in the address bar. However how do I display the data on the new page. Do I do it by putting labels on the cart.asp page or something else

Also in order to transfer the information from the products page to the cart.asp page do I need to do something to the listed data or the id's in order for it to be recognised and transferred.

I'd really appreciate any help.

Thanks

I did not implement any shopping cart myself but read some articles about how to do it.

Shopping carts are better implemented using sessions. You can have two pages like AddToCart.asp and ShowCart.asp. The link you specified can refer to addtocart.asp. Then in addtocart.asp, you can take the Request.QueryString and add the passed on ID to the session variable and then redirect to the ShowCart,asp. There you just retrieve the Product ids from the session variable, retrieve their data from your database where you store your product details and show them


You can find a link for shoppingcart in the

http://samples.gotdotnet.com/quickstart/aspplus/

and clickAn E-Commerce Storefront

Hope this help you

Ganesh@.nilgris


seannie:

I have a link here on my products page

<a href="http://links.10026.com/?link=cart.asp?productid=1">A nice pair of shoes</a>

This works fine. It transfers to the cart.asp page showing cart.asp?productid=1 in the address bar. However how do I display the data on the new page. Do I do it by putting labels on the cart.asp page or something else

Also in order to transfer the information from the products page to the cart.asp page do I need to do something to the listed data or the id's in order for it to be recognised and transferred.

I'd really appreciate any help.

Thanks

The best thing to do with shopping cart is to start with a complete version, so try the link below and go to the Commerce Starter kit it is the second to the last and click on the white paper you will find most of the code you need. And yes you have to use session and it can get complicated but the Commerce Starter Kit should get you started. Hope this helps.

http://www.asp.net/downloads/default11.aspx?tabid=62

0 comments:

Post a Comment