B2C Commerce Setup11% of the exam

Cartridge path order and module.superModule

How a site's colon-separated cartridge path is searched left to right, where custom, LINK, plug-in, base and modules cartridges go, how overrides match by name and location, and how require prefixes and module.superModule resolve along the path.

Official exam objective
Given the code for a storefront site, add the correct sequence of cartridge names to the provided cartridge path.

~6 min read · 7 practice questions ·

What the exam expects

  • Register cartridges on a site as a colon-separated list and say which cartridge wins when two contain the same file.
  • Order a path given its cartridges: custom overlay, then LINK and plug-in cartridges, then app_storefront_base, with modules at the right.
  • Place an override file so it matches the original's name and relative location.
  • Pick the require prefix that resolves through the cartridge path rather than from the current cartridge.
  • Say what module.superModule returns in a controller.

Key terms: cartridge path (a site's ordered list of cartridges); overlay cartridge (an app_custom_* cartridge that overrides the base); LINK cartridge (third-party integration such as payment or tax); modules (the cartridge holding the global server module); module.superModule (the next same-named module to the right on the path).

Key facts

Where the path lives
Detail
Manage Sites > site > Settings > Cartridges
Separator
Detail
Colons between cartridge names
Precedence
Detail
Left to right; first match is used
Sharing
Detail
One cartridge can be registered to several sites
Base feature with a setting
Detail
Configure it in Business Manager before coding, for example pick up in store
LINK and plug-in slot
Detail
Between the custom cartridge and app_storefront_base
No controller found
Detail
The first pipeline on the path runs
Override rule
Detail
Same name, same relative location, cartridge further left
*/ prefix
Detail
Resolves from the beginning of the cartridge path
module.superModule
Detail
First same-named module to the right of the current cartridge
Sources for this section (6)
  • When no controller with the requested name exists anywhere on the path, what does the server execute?
  • Why should you never edit the SFRA base cartridge directly?
  • Why can a script require server with no path at all?
  • In the features page's typical stack, which layer follows the two brand cartridges?

The questions are free to read. Answers with their sources and self-grading are included with the pack.

Keep reading with the B2C Commerce Developer pack

  • Core concepts
  • Exam traps
  • Worked scenario

The pack includes:

  • All 28 lessons of the B2C Commerce Developer guide, with reading progress
  • Interactive decision walks and step-by-step sequence steppers
  • Practice exams purchase adds inline bank questions and topic practice (7 questions for this lesson)
  • An official source cited for every claim
  • An AI tutor that answers from the guide
  • Choose guide-only, practice-only, or save $4 with both

Practice for the B2C Commerce Developer exam