feat: скидки на товары и редактирование промокодов в админке

Цена со скидкой и срок акции на товаре; отображение в каталоге и корзине. Улучшенный UI промокодов с редактированием.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 14:08:03 +03:00
parent db4bc9bfe1
commit 9b688b2af4
12 changed files with 378 additions and 47 deletions
+8 -1
View File
@@ -29,7 +29,14 @@
<% } %>
<a href="/product/<%= item.slug %>"><%= item.name %></a>
</td>
<td><%= formatPrice(item.price_cents) %></td>
<td>
<% if (item.on_sale) { %>
<span class="price-block__old"><%= formatPrice(item.price_cents) %></span>
<%= formatPrice(item.effective_price_cents) %>
<% } else { %>
<%= formatPrice(item.effective_price_cents) %>
<% } %>
</td>
<td>
<input type="number" name="items[<%= item.id %>]" value="<%= item.quantity %>" min="0" max="<%= item.stock %>" class="input input--qty">
</td>