{% extends "base.html" %} {% block title %}查看購物車{% endblock %} {% block content %}
{% for message in messages %}
{{ message }}
{% endfor %}

歡迎光臨迷你小電商

{% if user.socialaccount_set.all.0.extra_data.name %} {{user.socialaccount_set.all.0.extra_data.name}}
{% else %} Welcome: {{ user.username }} {% endif %}

我的購物車

{% for item in cart %} {% if forloop.first %} {% endif %}
{% if forloop.last %}
產品名稱 單價 數量 小計 刪除
{{ item.product.name }} {{ item.product.price }} {{ item.quantity }} {{ item.total_price }}
{% endif %} {% empty %} 購物車是空的 {% endfor %}
{% endblock %}