{% extends "base.html" %} {% block title %}{{ product.name }} - 太白购物商城{% endblock %} {% block head %} {% endblock %} {% block content %}
{% if images %} {% if images|length > 1 %}
{% for image in images %}
{{ product.name }}
{% endfor %}
{% endif %} {% else %}
{% endif %}

{{ product.name }}

{% if product.brand %}

品牌:{{ product.brand }}

{% endif %}
¥{{ "%.2f"|format(product.price) }} {% if product.original_price and product.original_price > product.price %} ¥{{ "%.2f"|format(product.original_price) }} 省{{ "%.0f"|format(((product.original_price - product.price) / product.original_price * 100)) }}% {% endif %}
销量:{{ product.sales_count }} | 浏览:{{ product.view_count }}
{% if inventory_list and inventory_list|length > 1 %}
选择规格:
{% set spec_groups = {} %} {% for sku in inventory_list %} {% if sku.spec_combination %} {% for spec_name, spec_value in sku.spec_combination.items() %} {% if spec_name not in spec_groups %} {% set _ = spec_groups.update({spec_name: []}) %} {% endif %} {% if spec_value not in spec_groups[spec_name] %} {% set _ = spec_groups[spec_name].append(spec_value) %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% for spec_name, spec_values in spec_groups.items() %}
{% for spec_value in spec_values %} {% endfor %}
{% endfor %}
{% endif %}
库存: {% if inventory_list %} {{ inventory_list[0].stock if inventory_list|length == 1 else '请选择规格' }} {% else %} 暂无库存 {% endif %}
{% if product.weight %}
重量:{{ product.weight }}kg
{% endif %}
服务承诺:
  • 正品保证
  • 7天无理由退换
  • 全国包邮
  • 售后服务
{% if product.description %}
{{ product.description|replace('\n', '
')|safe }}
{% else %}

暂无详细描述

{% endif %}
{% if product.brand %} {% endif %} {% if product.weight %} {% endif %} {% if inventory_list %} {% endif %}
商品名称 {{ product.name }}
商品品牌 {{ product.brand }}
商品分类 {{ product.category.name }}
商品重量 {{ product.weight }}kg
上架时间 {{ product.created_at.strftime('%Y-%m-%d') }}
库存信息 {% if inventory_list|length == 1 %} {{ inventory_list[0].stock }}件 {% else %} 多规格商品,请选择具体规格查看库存 {% endif %}
点击标签页加载评价
{% if recommended_products %}

相关推荐


{% for rec_product in recommended_products %} {% endfor %}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}