CCD-102 practice question 25 of 30
A Digital Developer added a file named MyBusinessController.js in the cartridge named app_project. The project design calls for this new file to…
Full set: 206 questionsIn Salesforce B2C Commerce, the cartridge path dictates the order in which the platform searches for files like controllers, templates, and scripts. The search proceeds from left to right, and the first instance of a file found is the one that is executed. To override the MyBusinessController.js located in the clientproject cartridge, the appproject cartridge containing the new version must be listed before clientproject in the path. Option C correctly establishes this order (appproject:clientproject:...), ensuring the override occurs while still including clientproject for its other necessary functionality and the base cartridges for core features.
1. Salesforce B2C Commerce Infocenter, "Cartridges": "The order of the cartridges in the path is important. B2C Commerce searches for code and other resources in the cartridges from left to right. The first resource it finds is the one it uses... To override a resource, you place a cartridge with the new version of the resource before the cartridge with the old version." (This principle is detailed in the "Cartridge Path" section of the documentation).
2. Salesforce B2C Commerce Infocenter, "Implement a Cartridge Path": "To customize your storefront, you create a new cartridge and place it at the beginning of the cartridge path. This new cartridge can override the default functionality of the base cartridges." This document reinforces the concept that customization and overriding are achieved by placing custom cartridges at the beginning of the path.
Keep practicing
Take the free CCD-102 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCD-102 practice questions
- Question 1A developer has a sandbox with code to log a message during execution, and the following …
- Question 3Server.get(‘Show’, consentTracking.consent, cache.applyDefaultCache, function (req,res,ne…
- Question 4A developer needs to update the package.json file so that it points to the hock file for …
- Question 5A developer wants to create in Business Manager extension with the cartridge named plugin…
- Question 6A client uses tax tables in Business Manager to calculate tax. They recently started ship…
- Question 7A Digital Developer has a site export file on their computer that needs to be imported in…
