Monday, March 26, 2012

Shopping Cart

Hi all,
I am creating a shopping cart. I began by using a datatable stored in a session variable. But then I was told that it was not a good idea(too much overhead). So here are my questions. Is using a database the best way to go for a shopping cart? If so, how would I erase the data once the user leaves the site? Somewhere in session_end() perhaps?

Any help you can give me on this is greatly appreciated.Download, install and analyse the free Asp.Net Commerce Starter Kit found under the Tab 'Starter Kits' above. It contains all the functionality you need.
Hello, please check these good links:

1-Building an ASP.NET Shopping Cart Using DataTables
2-Easy ASP.NET Shopping Cart
3-Shopping Cart

Good Luck.
OK. I've got the database working as a shopping cart. The only fault now is that the carts remain in memory forever. I would like to erase them when the session ends. So my question is, is it possible to erase the data from global.asax in session_end()? I read somewhere that you can't use mappath in gloabal.asax. I would need that to access the db.

Thanks.
I don't know if you can do this but can you clear the Dataset in the Session_End() in the Global.asax
Like I said, the free Asp.Net Commerce Starter Kit has all the functionality you need. I.e. a stored procedure clearing "Abandoned" shopping carts from databas at a regular basis. Session_End is not reliable.
Thanks adec, but I am not currently on a machine that can run the starter kit.
oops, i meant can't. sorry

To all concerned,

I struggled for hours figuring out one piece after another, and always coming back to the forums searching for solutions to whatever the current problem was at the time. Always I found good answers to those problems and slowly my site began to take shape. I really am glad that I hadn't seen the eCommerce Startup Kit sooner. If I had just jumped right into something so complex and big I wouldn't have a clue as to what might be going on when I encountered problems customizing and whatnot, so a really big THANKS to all of you out there answering these posts! Keep up the good work!

AK


hi AK

just a question, if you made your shopping cart from the 0 of can you tell me then where to start cuz i'm just learning about VWD and i can't get started but my boss is getting unpatiant (??sorry if that's not the word) about it (that i'm still looking to get started) so if you could help me on the way that would help me very much.

hope you consider helping me, if you can't not a problem.

thanx

sarah


Did you try the links that Haidar posted?

NC...


yep but that are payable applications and it has to be free

Hi Sarah,

I wound up scrapping the proto-cart that I had come up with because the Startup Kit cart hooked neatly into the PayPal API wheras my cart would have taken tons of work to get to that point. I would suggest using the existing cart and modifying to your needs.

Sorry I can't be more help!

Adam


thanx for your answer Adam, i tried the paypal thing but because i don't know anything about the programming in vb i don't know what to change in the existing files that's why i wanted to start from 0, so i could learn the basics.

i'm gonna try to find a book in the library later today but i'm afraid that there aren't that much dutch resources for it :(


postergirl:

yep but that are payable applications and it has to be free

What do you mean by that? At least one of them was CodeProject, which I know that the code is open source and free.

NC...

0 comments:

Post a Comment