PhoenixKitEcommerce.Web.Components.ShopLayouts (PhoenixKitEcommerce v0.2.0)

Copy Markdown View Source

Shared layout wrapper for the shop storefront public pages.

shop_layout/1 renders every storefront page — catalog, category, product, cart, checkout, confirmation — inside core's PhoenixKitWeb.Components.LayoutWrapper.app_layout, which resolves the host application's configured layouts_module. The storefront therefore always looks like part of the host site, for guests and authenticated users alike.

History: until 2026-08 this module dispatched between three layouts — a self-contained shop_public_layout for guest catalog pages (which bypassed the host layout entirely), the admin dashboard layout for any authenticated visitor, and app_layout for guest cart/checkout. The first two paths were the subject of a host-app bug report (the storefront did not look like the host site) and were removed; the in-page category/filter sidebar that the dashboard layout used to carry now renders in the page templates for everyone.

Summary

Functions

Top-level layout wrapper for shop storefront pages.

Functions

shop_layout(assigns)

Top-level layout wrapper for shop storefront pages.

Always renders through core's LayoutWrapper.app_layout, honouring the host's layouts_module configuration.

Attributes

  • flash (:map) (required)
  • phoenix_kit_current_scope (:any) - Defaults to nil.
  • url_path (:string) - Defaults to nil.
  • current_locale (:string) - Defaults to nil.
  • page_title (:string) - Defaults to nil.

Slots

  • inner_block (required)