Group cart overview by market, show market name on cards
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 52s

A page can have multiple markets — the overview now groups cart items
by market_place_id instead of page. Each card shows the market name
as heading with the page title below it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-19 12:41:28 +00:00
parent 17ab7f09c7
commit f299805c22
2 changed files with 57 additions and 25 deletions

View File

@@ -33,7 +33,7 @@
{% if grp.cart_items or grp.calendar_entries %}
{% if grp.post %}
{# Page cart card #}
{# Market / page cart card #}
<a
href="{{ cart_url('/' + grp.post.slug + '/') }}"
class="block rounded-2xl border border-stone-200 bg-white shadow-sm hover:shadow-md hover:border-stone-300 transition p-4 sm:p-5"
@@ -53,8 +53,15 @@
<div class="flex-1 min-w-0">
<h3 class="text-base sm:text-lg font-semibold text-stone-900 truncate">
{{ grp.post.title }}
{% if grp.market_place %}
{{ grp.market_place.name }}
{% else %}
{{ grp.post.title }}
{% endif %}
</h3>
{% if grp.market_place %}
<p class="text-xs text-stone-500 truncate">{{ grp.post.title }}</p>
{% endif %}
<div class="mt-1 flex flex-wrap gap-2 text-xs text-stone-600">
{% if grp.product_count > 0 %}