feat: add color, discount price, and new item attributes to catalog and update UI
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
All checks were successful
Build and Push Docker Image / build (push) Successful in 25s
- Introduced `Color` model with admin and added a color field to items - Added `discount_price` and `is_new` fields to the `Item` model with necessary migrations - Updated pricing logic to display original and discount prices in templates - Enhanced product detail and item card templates with color swatches and metadata - Added sidebar sections for sales and new items with paginated mini-cards - Updated styles to support discount pricing, swatches, and sidebar mini-cards - Extended catalog views to filter by sales or new items and updated filtering logic
This commit is contained in:
@@ -48,7 +48,14 @@
|
||||
<h2 class="item-card-title">{{ item.name }}</h2>
|
||||
</a>
|
||||
<div class="item-card-footer">
|
||||
<span class="item-card-price">{{ item.price }} руб.</span>
|
||||
<div class="item-card-price-block">
|
||||
<span class="item-card-price{% if item.has_discount %} item-card-price--discount{% endif %}">
|
||||
{{ item.display_price }} руб.
|
||||
</span>
|
||||
{% if item.has_discount %}
|
||||
<span class="item-card-price-original">{{ item.price }} руб.</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<span class="item-card-availability {% if item.is_available %}available{% else %}unavailable{% endif %}">
|
||||
{% if item.is_available %}В наличии{% else %}Нет в наличии{% endif %}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user