Re: problem with simple shopping cart

2009-02-09 Thread lnysrogh
I'm also getting an Index Error, "list index out of range" for the "request.session['cart'][1] += 1" line. I can't figure out what's wrong. On Feb 9, 3:02 am, lnysrogh wrote: > Thank you so much. That helped a lot. Such a simple mistake. > > I've got some other questions

Re: problem with simple shopping cart

2009-02-08 Thread lnysrogh
Thank you so much. That helped a lot. Such a simple mistake. I've got some other questions now. My "add to cart" code: def add(request, product_id): added = (Product.objects.get(id=product_id), 1) # '1' is quantity request.session.set_test_cookie() if

Re: problem with simple shopping cart

2009-02-02 Thread Andrew Ingram
lnysrogh wrote: > Hello. I'm new to Django (and web development in general), and this is > my first post here. Hope someone can help me. > > I'm trying to build a shopping cart, and my idea is to store the > product information (id and quantity) in a session when I add the > product to the

problem with simple shopping cart

2009-02-02 Thread lnysrogh
Hello. I'm new to Django (and web development in general), and this is my first post here. Hope someone can help me. I'm trying to build a shopping cart, and my idea is to store the product information (id and quantity) in a session when I add the product to the shopping cart, and retrieve it to