Every storefront and account page is a controller action that returns a page view embedding one Livewire component. Each page view starts with @extends( $ecommerceStorefrontLayout ). A view composer on ecommerce-storefront::pages.* sets $ecommerceStorefrontLayout to the storefront.layout config value, or to ecommerce-storefront::layouts.app when that value is empty.
So there are three ways to run the shop:
| Setup | storefront.layout |
Use it when |
|---|---|---|
| Standalone | ecommerce-storefront::layouts.app (default) |
You want a working shop with no layout work |
| Your Blade layout | Your layout view, for example layouts.site |
Your site has a classic @yield layout |
| Your component layout | A one-line wrapper view you create | Your site uses <x-app-layout> or <x-layouts.app> |
The layout contract
Any layout the pages extend must provide:
@yield( 'title' ): each page sets a plain-texttitlesection.@yield( 'content' ): the page body.@stack( 'head' )inside<head>: every page pushes its description, canonical URL, robots directive, Open Graph tags, and JSON-LD here (ecommerce-storefront::partials.seo). Without it, pages lose their search-engine tags.@stack( 'styles' )and@stack( 'scripts' ).@include( 'ecommerce-storefront::partials.global' ): the cart drawer, toasts, and the cart merge prompt. See The global partial.- Livewire's assets and your Vite build with the design system (see Front-End Setup), as on any Livewire page.
@apuiThemeScriptinside<head>, before your Vite entries: it applies the shopper's light or dark theme before the page paints, so the page doesn't flash the wrong theme.
When artisanpack-ui/seo is installed, the storefront hands its JSON-LD to the SEO package instead of printing it, so your layout also needs <x-seo:schema /> in <head> (the package layout includes it). See SEO.
1. Standalone layout
ecommerce-storefront::layouts.app is used unless you configure another. It is built on the design system: the sticky x-artisanpack-navbar, a plain <main>, and a footer. Header, content, and footer share one column 1232px wide, with 24px gutters (16px below 768px). It includes:
<html dir>set from the app locale (see Right-to-left languages);- "Skip to content", the first focusable element on the page, shown when it has focus;
- the header: the store's mark (the initials of
app.name) and name linking to the catalog, the store navigation (see Store navigation), the search box, and the header actions. Below 768px a menu button before the mark opens the store navigation in a drawer, the search box becomes a search icon linking to the search page, and the currency switcher moves to the footer. On a 320px screen the actions wrap instead of scrolling sideways; - the footer: the mark, name, and
storefront.tagline(when set), the Shop, Help, and Account link columns, then the copyright line, the currency switcher, and the theme toggle; - your Vite entries (see Front-End Setup),
@livewireStyles,@livewireScripts, thehead,styles, andscriptsstacks, and the global partial.
Links to routes that aren't registered (catalog, search, lookup, sign-in, account) are left out. The page title is the page's title section followed by · {app.name}.
Store navigation
The header lists "Shop all" (the catalog), then the first storefront.nav_categories top-level categories (3 by default; 0 for none). The link for the page the shopper is on is marked current: "Shop all" on the catalog, and a category on its own page or any page under it. The footer's Shop column lists "All products" and the same categories; Help has "Find an order"; Account has "Sign in" (or "Account" when signed in), "Orders", and "Addresses".
Change the header links with ap.ecommerceStorefrontLivewire.layout.navigation (a list of label, url, and current), and the footer columns with ap.ecommerceStorefrontLivewire.layout.footerLinks (key => [ 'title' => …, 'links' => [ [ 'label' => …, 'url' => … ], … ] ]):
addFilter( 'ap.ecommerceStorefrontLivewire.layout.navigation', function ( array $links ): array {
$links[] = [ 'label' => __( 'Journal' ), 'url' => url( '/journal' ), 'current' => request()->is( 'journal*' ) ];
return $links;
} );
addFilter( 'ap.ecommerceStorefrontLivewire.layout.footerLinks', function ( array $columns ): array {
$columns['help']['links'][] = [ 'label' => __( 'Shipping & returns' ), 'url' => url( '/shipping' ) ];
return $columns;
} );
Links without a label or URL are dropped, and so is a column with no links. Both filters only affect the package layout.
Checkout header
A page that sets @section( 'storefront-chrome', 'checkout' ) gets a slim secure header in place of the store header (ecommerce-storefront::partials.header.checkout: the store's mark and name, "Secure checkout" from 640px, and "Back to cart") and no store navigation or footer. The checkout page sets it. A host layout can read the same section to do the same.
Header actions
The header's action buttons run through the ap.ecommerceStorefrontLivewire.header.actions filter. Each entry is key => view name or an Htmlable. The defaults:
| Key | View | Shows |
|---|---|---|
currency |
ecommerce-storefront::partials.header.currency |
The currency switcher, only when the store sells in more than one currency |
account |
ecommerce-storefront::partials.header.account |
A user icon named "Account" for signed-in shoppers, else "Sign in" to auth.login_route |
cart |
ecommerce-storefront::partials.header.cart |
The cart button and count; opens the cart drawer |
Add, replace, or remove entries from a service provider's boot():
use Illuminate\Support\HtmlString;
addFilter( 'ap.ecommerceStorefrontLivewire.header.actions', function ( array $actions ): array {
$actions['wishlist'] = 'wishlist::header-link';
unset( $actions['currency'] );
return $actions;
} );
A view name that doesn't exist is skipped. The filter only affects the package layout. See Hooks.
To change the markup itself, publish the views and edit resources/views/vendor/ecommerce-storefront/layouts/app.blade.php, keeping the contract above.
2. Your own Blade layout
Point storefront.layout at your layout:
'storefront' => [
'layout' => 'layouts.site',
],
and make it meet the contract. A minimal example:
<!DOCTYPE html>
<html lang="{{ str_replace( '_', '-', app()->getLocale() ) }}" dir="{{ \ArtisanPackUI\EcommerceStorefrontLivewire\Support\TextDirection::for() }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield( 'title' ) · {{ config( 'app.name' ) }}</title>
@apuiThemeScript
@vite( [ 'resources/css/app.css', 'resources/js/app.js' ] )
@livewireStyles
@stack( 'head' )
@stack( 'styles' )
</head>
<body>
@include( 'partials.site-header' )
<main id="content">
@yield( 'content' )
</main>
@include( 'partials.site-footer' )
@include( 'ecommerce-storefront::partials.global' )
@livewireScripts
@stack( 'scripts' )
</body>
</html>
The install command prints the same instructions:
Storefront pages use the package layout. To use your own, set storefront.layout in the config to a layout that yields "title" and "content" and includes:
@include( 'ecommerce-storefront::partials.global' )
Add @stack( 'head' ) inside its <head> for page descriptions, canonical URLs, and structured data.
Your layout replaces the package header, so it has no search box or cart button unless you add them. The header pieces are plain views and components you can include in your own header:
@include( 'ecommerce-storefront::partials.header.search' )
@include( 'ecommerce-storefront::partials.header.currency' )
@include( 'ecommerce-storefront::partials.header.account' )
@include( 'ecommerce-storefront::partials.header.cart' )
The search partial shows the search box with live suggestions from the md breakpoint up, and a search icon linking to the search page below it, so phones keep a way to search. Use <x-artisanpack-ec-search-box /> on its own if you want only the box.
If a page shows more than one search box, give each its own input-id (the default is ecommerce-header-search). See Blade Components.
3. Component layouts
Page views use @extends, which can't extend a Blade component such as <x-app-layout> or <x-layouts.app>. Create a one-line wrapper view that does, and point storefront.layout at it. The install command prints the wrapper for a <x-layouts.app> component:
<x-layouts.app :title="$__env->yieldContent( 'title' )">@yield( 'content' ) @include( 'ecommerce-storefront::partials.global' )</x-layouts.app>
For example, with a starter kit's resources/views/components/layouts/app.blade.php, save this as resources/views/layouts/shop.blade.php:
<x-layouts.app :title="$__env->yieldContent( 'title' )">
@yield( 'content' )
@include( 'ecommerce-storefront::partials.global' )
</x-layouts.app>
and set:
'storefront' => [
'layout' => 'layouts.shop',
],
For a Breeze-style <x-app-layout>, use that tag instead and pass the title however your component accepts it.
The wrapper passes the page title to the component as its title prop and puts the page body and the global partial in its slot. Your component still has to meet the rest of the contract: @stack( 'head' ) in its <head>, the styles and scripts stacks, and Livewire's assets. Pages push onto the stacks before your component renders, so the stacks work inside a component layout.
Right-to-left languages
The standalone layout sets <html dir="rtl"> when the app locale's language is in storefront.rtl_locales (ar, he, fa, and ur by default; see Configuration). In your own layout, set dir the same way, as in the example above:
<html lang="{{ str_replace( '_', '-', app()->getLocale() ) }}" dir="{{ \ArtisanPackUI\EcommerceStorefrontLivewire\Support\TextDirection::for() }}">
The storefront's views use logical properties (start/end), so they mirror with dir.
A guest order link on your sign-in page
The host owns the sign-in screen, so the storefront can't add its "Ordered as a guest? Find your order" link there. Include it yourself:
@include( 'ecommerce-storefront::partials.order-lookup-link' )
It renders muted text with a muted design-system link, so it sits quietly under a sign-in form, and nothing at all when the order lookup route isn't registered.
The global partial
ecommerce-storefront::partials.global renders the storefront's page-wide pieces:
- the toaster (
<x-artisanpack-ec-toaster>: toasts stack at the top end from 768px and along the bottom on a phone), plus any toast flashed for this page; - the slide-out cart drawer (
cart.after_addset todraweropens it after "Add to cart"); - the cart merge prompt, shown after sign-in when the cart built as a guest and the account's cart are in different currencies (same-currency carts merge on their own).
Include it once, after the content. It is wrapped in @once, so it renders once per response even if both your layout and a page include it. Without it, "Add to cart" can't open the drawer, the header cart button has nothing to open, and toasts don't show.
Visual-editor templates
With artisanpack-ui/visual-editor and artisanpack-ui/cms-framework installed and visual_editor.templates on, the catalog, category, tag, product, search, cart, and checkout pages render through a saved visual-editor template when one exists. The template replaces only the page's content section: the page still extends your configured layout, so the header, footer, global partial, and head tags stay the same. With no saved template, pages render as usual. See Templates.

