Sequencing custom, LINK, plugin and base cartridges in an SFRA stack
Key Takeaway
Order the cartridge path as custom, then LINK, then plugin, with app_storefront_base last. B2C Commerce searches the path left to right, so a cartridge placed after base can't override base files.
In SFRA, a storefront is built as a stack of cartridges. The app_storefront_base cartridge sits at the bottom, and plugin, LINK, and custom cartridges are layered over it. Each site's cartridge path lists those cartridges in order. B2C Commerce searches the path from left to right, so the order decides whose code actually runs.
Cartridges and the SFRA stack
A storefront needs at least one cartridge, but it usually has several.
An SFRA stack has four layers. The table lists them from the top of the stack down to the bottom.
| Layer | What it holds |
|---|---|
| Custom cartridges | Your brand and site customizations |
| LINK cartridges | Third-party integrations from LINK partners, such as PayPal and Bazaarvoice |
| Plugin cartridges | Optional features, such as Apple Pay, gift registry, and product compare |
Base cartridge (app_storefront_base) | Only the core functionality common to most sites |