This repository has been archived on 2024-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
arka-mvp/templates/cart.html
2022-09-15 22:25:55 +03:00

31 lines
1.2 KiB
HTML

{% extends 'base.html' %}
{% block title %} Корзина {% endblock %}
{% block styles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/catalog-style.css' %}">
{% endblock %}
{% block content %}
<h1> Ваша корзина </h1>
{% if user %}
{% if cart_objects %}
{% for ojb in cart_objects %}
{# 'item_count', 'prod', 'prod__prod_name', 'prod__prod_price', 'prod__prod_available', 'prod__prod_photo', 'prod__category__cat_name' #}
<a class="product" href="/catalog/{{ obj.1 }}/" style="text-decoration: none">
<img src="/static/images/{% if obj.5 %}no-photo.webp{% else %}products/{{ obj.5 }}{% endif %}" alt="photo">
<div>
<div> {{ ojb.0 }}шт </div>
<div><strong> {{ ojb.2 }} </strong></div>
<div> {{ ojb.3 }} доступно </div>
</div>
</a>
{% endfor %}
{% else %}
<h3 style="text-align: center">Корзина пуста!</h3>
{% endif %}
{% else %}
нужно войти...
{% endif %}
{% endblock %}