Use cart_url/page_cart_url for checkout action instead of url_for

The checkout form action used url_for('cart_global.checkout') which
only resolves inside the cart app. Replace with cart_url() and
page_cart_url() Jinja globals that work across all apps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-15 10:22:22 +00:00
parent 5877a7702f
commit d1621b8e70

View File

@@ -103,7 +103,7 @@
{% if g.user %}
<form
method="post"
action="{{ url_for('page_cart.page_checkout')|host if page_post is defined and page_post else url_for('cart_global.checkout')|host }}"
action="{{ page_cart_url(page_post.slug, '/checkout/') if page_post is defined and page_post else cart_url('/checkout/') }}"
class="w-full"
>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">