SFRA is designed around cartridge-based extension rather than direct modification of the base storefront code. When a developer needs to add another step to an existing registration workflow, the route should beextendedfrom a custom cartridge so that the standard implementation remains intact.
Salesforce ' s SFRA customization guidance describesmodule.superModule,server.extend,server.append,server.prepend, and route replacement as the supported mechanisms for customizing functionality from another cartridge. The exact technique depends on whether the additional operation must execute before, after, or instead of existing behavior.
Option A implies modifying the original controller directly, which is undesirable because upgrades or cartridge replacement can overwrite the changes. Option B copies base code, creating duplication and making later maintenance significantly harder.
Extending the route preserves the original implementation and keeps merchant-specific logic isolated in the custom cartridge. For a simple additional step that should execute after the existing route,server.append()is often appropriate; for access behavior or a fundamentally changed workflow, Salesforce recommends the corresponding supported extension/replacement pattern.
Study Guide reference:Application Development — SFRA controller extension, custom cartridges,module.superModule, route customization, and upgrade-safe development.
===============