not sure if i've totally missed the point of the correct way to do this. because i couldn't get the django-cart project to do what i wanted (and more because there is a note on the page explaining its got bugs and that i should have been able to fix them but not detailing said bugs) i decided to write my own cart. and called it basket ;)
the basket works and is super simple. its built to create html for submission to google checkout. which works. the code that generates the html follows. {% for purchase in all_purchases %} <!--<input type="hidden" name="merchant_item_id" value="{{ purchase.part_no }}" />--> <input type="hidden" name="item_name_{{ forloop.counter }}" value="{{ purchase.prod_category }}" /> <input type="hidden" name="item_description_{{ forloop.counter }}" value="{{ purchase.description }}" /> <input type="hidden" name="item_quantity_{{ forloop.counter }}" value="{{ purchase.quantity }}" /> <input type="hidden" name="item_price_{{ forloop.counter }}" value="{{ purchase.pricenet }}" /> <input type="hidden" name="item_currency_{{ forloop.counter }}" value="GBP"/> {% if forloop.last %} <p>end of loopsssssss</p> {% endif %} {% endfor %} consider this situation though. the shipping option is a fixed cost per item, which google doesnt allow you to configure in their options exactly as the client wants it. so you think it'd be easy to just wait for the last item in the basket, then sum the number of items (forloop.counter) and multiply it by the flat rate. but i dont think im supposed to do maths in the template am i? so my alternative is to do the maths based on the number of items in the basket at creation of the dict in the view. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.