Closed gbozee closed 10 years ago
Hi and thanks for your comment.
When you use {% get_cart as cart %}
the {{ cart }}
variable is only available inside your current template block.
This would not work:
{% extends 'base.html' %}
{% load carton_tags %}
{% get_cart as cart %}
{% block main_content %}
{{ cart }}
{% endblock %}
This should be fine:
{% extends 'base.html' %}
{% load carton_tags %}
{% block main_content %}
{% get_cart as cart %}
{{ cart }}
{% endblock %}
Thanks for the update. Working now
I can't get the get_tag tag to display my stored cart items. I use django-debug-toolbar and can actually see that the items are actually saved. Here is my template
and here is my view function
django-debug-toolbar shows this after adding items to the cart Variable Value u'CART' {u'1': {u'price': u'400', u'product_pk': 1, u'quantity': 2}, u'5': {u'price': u'800', u'product_pk': 5, u'quantity': 1}}
Any help would be appreciated