integrate R module and add url editor ui
Replaces hardcoded paths with R module throughout: - Shop components: layout nav, cart, product links - Controllers: cart, checkout, contact, seo, order lookup - Shop pages: collection, product, search, checkout success, etc. - Site context: nav item url resolution Admin URL management: - Settings page: prefix editor with validation feedback - Page renderer: url_editor component for page URLs - CSS for url editor styling Test updates for cache isolation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,13 +41,13 @@ defmodule BerrypodWeb.CartController do
|
||||
conn
|
||||
|> Cart.put_in_session(cart)
|
||||
|> put_flash(:info, "Added to basket")
|
||||
|> redirect(to: ~p"/cart")
|
||||
|> redirect(to: R.cart())
|
||||
end
|
||||
|
||||
def add(conn, _params) do
|
||||
conn
|
||||
|> put_flash(:error, "Could not add item to basket")
|
||||
|> redirect(to: ~p"/cart")
|
||||
|> redirect(to: R.cart())
|
||||
end
|
||||
|
||||
@doc """
|
||||
@@ -60,7 +60,7 @@ defmodule BerrypodWeb.CartController do
|
||||
conn
|
||||
|> Cart.put_in_session(cart)
|
||||
|> put_flash(:info, "Removed from basket")
|
||||
|> redirect(to: ~p"/cart")
|
||||
|> redirect(to: R.cart())
|
||||
end
|
||||
|
||||
@doc """
|
||||
@@ -73,7 +73,7 @@ defmodule BerrypodWeb.CartController do
|
||||
|
||||
conn
|
||||
|> Cart.put_in_session(cart)
|
||||
|> redirect(to: ~p"/cart")
|
||||
|> redirect(to: R.cart())
|
||||
end
|
||||
|
||||
@doc """
|
||||
@@ -82,11 +82,11 @@ defmodule BerrypodWeb.CartController do
|
||||
def update_country(conn, %{"country" => code}) when is_binary(code) and code != "" do
|
||||
conn
|
||||
|> put_session("country_code", code)
|
||||
|> redirect(to: ~p"/cart")
|
||||
|> redirect(to: R.cart())
|
||||
end
|
||||
|
||||
def update_country(conn, _params) do
|
||||
redirect(conn, to: ~p"/cart")
|
||||
redirect(conn, to: R.cart())
|
||||
end
|
||||
|
||||
defp parse_quantity(str) when is_binary(str) do
|
||||
|
||||
Reference in New Issue
Block a user