{% extends "base.html" %} {% load static erp_tags bunny_images %} {% block title %}{{ product.title }} — Product{% endblock %} {% block chat_context %} {% endblock %} {% block content %} {# Product Header #}
{# Left: Images #}
{% if primary_image %} {% bunny_image_url primary_image.cf_image_id 'public' as primary_image_url %} {{ product.title }} {% else %}
{% endif %} {% if images|length > 1 %}
{% for img in images %} {% bunny_image_url img.cf_image_id 'thumbnail' as img_thumb_url %} {% bunny_image_url img.cf_image_id 'public' as img_full_url %} {{ img.alt_text }} {% endfor %}
{% endif %}
{# Right: Product Info #}
{{ product.title }}
{% if product.brand %}

{{ product.brand.title }}

{% endif %}
{% if product.is_active %} Active {% else %} Inactive {% endif %}

SKU

{{ product.part_number|default:"—" }}

Type

{{ product.get_product_type_display }}

MPN

{{ product.mpn|default:"—" }}

{# Pricing (from default variant) #} {% if default_variant %}

Retail Price

{{ default_variant.retail_price|money }}

Wholesale

{{ default_variant.wholesale_price|money }}

Stock

{% if default_variant.stock > 0 %} {{ default_variant.stock }} in stock {% else %} Out of stock {% endif %}

{% endif %}
{# Tabbed Detail Sections #}
{# Details Tab #}
Description
{{ product.description|default:"No description" }}
Categories
{% for pc in categories %} {{ pc.category.title }} {% empty %} None {% endfor %}
Dimensions
{% if product.item_length or product.item_width or product.item_height %}

Product

{{ product.item_length|floatformat:1|default:"—" }} x {{ product.item_width|floatformat:1|default:"—" }} x {{ product.item_height|floatformat:1|default:"—" }} {{ product.item_dimension_uom|default:"in" }}

{% endif %} {% if product.shipping_length or product.shipping_width or product.shipping_height %}

Shipping

{{ product.shipping_length|floatformat:1|default:"—" }} x {{ product.shipping_width|floatformat:1|default:"—" }} x {{ product.shipping_height|floatformat:1|default:"—" }} {{ product.shipping_dimension_uom|default:"in" }}

{% endif %} {% if product.item_weight or product.shipping_weight %}

Weight

{% if product.item_weight %}{{ product.item_weight|floatformat:1 }} {{ product.item_weight_uom|default:"lb" }}{% endif %} {% if product.shipping_weight %}{% if product.item_weight %} · {% endif %}Ship: {{ product.shipping_weight|floatformat:1 }} {{ product.shipping_weight_uom|default:"lb" }}{% endif %}

{% endif %} {% if not product.item_length and not product.shipping_length and not product.item_weight and not product.shipping_weight %}

No dimension data

{% endif %}
{# Variants Tab #}
{% for v in variants %} {% empty %} {% endfor %}
SKU Name Retail Wholesale Stock Status
{{ v.sku }} {{ v.name|default:"Default" }} {{ v.retail_price|money }} {{ v.wholesale_price|money }} {{ v.stock|default:0 }} {% if v.is_active %}Active{% else %}Inactive{% endif %}
No variants
{# Pricing Tab #}
{% for pli in price_list_items %} {% empty %} {% endfor %}
Price List Variant Price Min Qty
{{ pli.price_list.name }} {{ pli.variant.sku }} {{ pli.price|money }} {{ pli.min_qty }}
No pricing data
{# Stock Tab #}
{% for ws in warehouse_stock %} {% empty %} {% endfor %}
Warehouse Variant On Hand Reserved Available Bin
{{ ws.warehouse.name }} {{ ws.variant.sku }} {{ ws.quantity }} {{ ws.reserved_qty }} {{ ws.available_qty }} {{ ws.bin_location|default:"—" }}
No stock data
{# Documents Tab #}
{% for doc in documents %} {% empty %} {% endfor %}
Title Type Action
{{ doc.title }} {{ doc.get_document_type_display }} {% if doc.r2_url %} Download {% endif %}
No documents
{% endblock %}