From 095d91bc683c468a1ecae66330a3710a2bef8f72 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Fri, 15 May 2026 14:14:17 -0400 Subject: [PATCH] feat: sort dropdown on tag detail + filtered shop home (MPS-24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Six sort options on category/tag pages, controlled by ?sort=: newest Newest first (default — created_timestamp desc) oldest Oldest first (created_timestamp asc) price_asc Price low → high (price_in_cents asc) price_desc Price high → low (price_in_cents desc) title Alphabetical A→Z (lowercased title) popular Most popular (28d) (PageSession views with visible_ms ≥ 7s) Rendered as a + + + + + {% endif %}
{% for product in grid_products %} diff --git a/make_post_sell/templates/shop_tag.j2 b/make_post_sell/templates/shop_tag.j2 index 4132228..61195d4 100644 --- a/make_post_sell/templates/shop_tag.j2 +++ b/make_post_sell/templates/shop_tag.j2 @@ -22,6 +22,18 @@ {% endif %} +{# Sort dropdown — capability-driven: works as a plain GET form + without JS, auto-submits on change with JS. #} +
+ + + +
+
{% for product in products %} {% if product.is_ready %} diff --git a/make_post_sell/views/shop.py b/make_post_sell/views/shop.py index 4abec1a..51fc472 100644 --- a/make_post_sell/views/shop.py +++ b/make_post_sell/views/shop.py @@ -217,6 +217,86 @@ def get_shop_from_matchdict(request, prefetched_shop=None): return get_shop_by_id(request.dbsession, request.matchdict["shop_id"]) +# MPS-24: sort options surfaced as a