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. > &

Re: problem with simple shopping cart

2009-02-08 Thread lnysrogh
cart = Product.objects.get(id=item) return render_to_response('cart.html', {'cart': cart}) else: return HttpResponse('Nenhum produto') I get this: "int() argument must be a string or a number, not 'tuple'

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