fix: add trailing slashes to cart URLs in product templates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 23:55:01 +00:00
parent 0c9b8d6aa2
commit 37ceb37b82

View File

@@ -7,9 +7,9 @@
{% if not quantity %} {% if not quantity %}
<form <form
action="{{ market_url('/product/' + slug + '/cart') }}" action="{{ market_url('/product/' + slug + '/cart/') }}"
method="post" method="post"
hx-post="{{ market_url('/product/' + slug + '/cart') }}" hx-post="{{ market_url('/product/' + slug + '/cart/') }}"
hx-target="#cart-mini" hx-target="#cart-mini"
hx-swap="outerHTML" hx-swap="outerHTML"
class="rounded flex items-center" class="rounded flex items-center"
@@ -38,9 +38,9 @@
<div class="rounded flex items-center gap-2"> <div class="rounded flex items-center gap-2">
<!-- minus --> <!-- minus -->
<form <form
action="{{ market_url('/product/' + slug + '/cart') }}" action="{{ market_url('/product/' + slug + '/cart/') }}"
method="post" method="post"
hx-post="{{ market_url('/product/' + slug + '/cart') }}" hx-post="{{ market_url('/product/' + slug + '/cart/') }}"
hx-target="#cart-mini" hx-target="#cart-mini"
hx-swap="outerHTML" hx-swap="outerHTML"
> >
@@ -80,9 +80,9 @@
<!-- plus --> <!-- plus -->
<form <form
action="{{ market_url('/product/' + slug + '/cart') }}" action="{{ market_url('/product/' + slug + '/cart/') }}"
method="post" method="post"
hx-post="{{ market_url('/product/' + slug + '/cart') }}" hx-post="{{ market_url('/product/' + slug + '/cart/') }}"
hx-target="#cart-mini" hx-target="#cart-mini"
hx-swap="outerHTML" hx-swap="outerHTML"
> >
@@ -189,9 +189,9 @@
<div class="flex items-center gap-2 text-xs sm:text-sm text-stone-700"> <div class="flex items-center gap-2 text-xs sm:text-sm text-stone-700">
<span class="text-[0.65rem] sm:text-xs uppercase tracking-wide text-stone-500">Quantity</span> <span class="text-[0.65rem] sm:text-xs uppercase tracking-wide text-stone-500">Quantity</span>
<form <form
action="{{ market_url('/product/' + p.slug + '/cart') }}" action="{{ market_url('/product/' + p.slug + '/cart/') }}"
method="post" method="post"
hx-post="{{ market_url('/product/' + p.slug + '/cart') }}" hx-post="{{ market_url('/product/' + p.slug + '/cart/') }}"
hx-target="#cart-mini" hx-target="#cart-mini"
hx-swap="outerHTML" hx-swap="outerHTML"
> >
@@ -212,9 +212,9 @@
{{ item.quantity }} {{ item.quantity }}
</span> </span>
<form <form
action="{{ market_url('/product/' + p.slug + '/cart') }}" action="{{ market_url('/product/' + p.slug + '/cart/') }}"
method="post" method="post"
hx-post="{{ market_url('/product/' + p.slug + '/cart') }}" hx-post="{{ market_url('/product/' + p.slug + '/cart/') }}"
hx-target="#cart-mini" hx-target="#cart-mini"
hx-swap="outerHTML" hx-swap="outerHTML"
> >