From 9ee0c9110622e5e4078f1ee48d6d8bc8af1a71c0 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 11 Feb 2026 00:30:02 +0000 Subject: [PATCH] fix: use url_for for cart/product URLs to include page/market slugs market_url() generates URLs without the // prefix, causing 405 on POST /cart. url_for() auto-injects the slugs via url_defaults. Co-Authored-By: Claude Opus 4.6 --- shared_lib | 2 +- templates/_types/product/_cart.html | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/shared_lib b/shared_lib index 37ceb37..a28424c 160000 --- a/shared_lib +++ b/shared_lib @@ -1 +1 @@ -Subproject commit 37ceb37b82d0f5285b6240f1152ed10d1dbfe35d +Subproject commit a28424c07c80895518212a8960f1991d439edaab diff --git a/templates/_types/product/_cart.html b/templates/_types/product/_cart.html index 0351de7..3bde81b 100644 --- a/templates/_types/product/_cart.html +++ b/templates/_types/product/_cart.html @@ -7,9 +7,9 @@ {% if not quantity %}
@@ -80,9 +80,9 @@ @@ -139,7 +139,7 @@

- {% set href=market_url('/product/' + p.slug + '/') %} + {% set href=url_for('market.product.product_detail', slug=p.slug) %} Quantity @@ -212,9 +212,9 @@ {{ item.quantity }}