A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purpose is to display updated information to the user when the request is completed, without otherwise modifying the appearance of the current page.
According to SFRA practices, which method best supports this objective?
A developer is working on a new feature that requires the use of a custom script. What is the first step the developer should take?
A client that sells sport shoes wants to allow its customers to filter products based on the intended activity (such as tennis, jogging, basketball, etc.), but this particular information is not present in the current catalog.
Which two actions does a developer need to perform in a B2C Commerce instance to allow this to happen?
Given a site called RefArch with the settings shown, what must be done for RefArch to use the same customer list as RefArchGlobal?
There is a business requirement that a custom controller in app_custom_my_cartridges invokes the calculateTax function of the dw.order.calculateTax hook that is defined in app_storefront_base. How can the developer implement this call?
Which method should a developer use to create a service instance that will call a remote web service?
A developer is asked to improve a page ' s maintainability by reducing its code repetition.
Which technique should the developer implement to achieve this?
A controller route in the SFRA base looks as follows:
server.get( ' Show ' ,consentTracking.consent,cache.applyDefaultCache,
function(req,res,next) {
...base code omitted on purpose...
next();
},
pageMetaData.computedPageMetaData
);
In order to extend this route usingprepend(), what should the developer consider?
A new product has been added to the Storefront catalog that is assigned to a site.
Which configuration does a developer need to ensure to have a new product visible in the Storefront?
Given a job step configured in the steptype.json that calls a script module, a developer needs to add a custom status code " NO_FILES_FOUND " in the script. The status does not represent an error condition.
Which code snippet completes this requirement?
A developer is tasked with creating a new payment method in Business Manager. What is the first step the developer should take?
There is a business requirement to allow a third-party warehouse management system to update the MySample.com storefront product inventory in real time. The architect decided that this is most easily accomplished by using the Open Commerce API (OCAPI). The developer needs to test the OCAPI settings in their sandbox. Assume the client ID for testing is " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " . What is the correct OCAPI setting for this?
A merchant uploads an image using the Content Image Upload module of Business Manager.
Which module can the merchant use to display the image on the Storefront?
A developer is inspecting the weekly service status report for a critical internally-hosted web service and notices there are too many instances of unavailability.
Which solution can reduce service unavailability?
Given a B2C Commerce client with these specifics:
Sells in two different countries: US and IN
Uses only the English language
A developer has a requirement to add a new field to the IN registration form that must not appear in the US one.
Which path should be created to accomplish this requirement?
A developer wants to create a Business Manager extension with the cartridge named plugin_bm_extension.
Which two steps should the developer take for the extension option to show up in Business Manager?
A developer is asked to create a new service instance that will call a remote web service.
Which method should the developer use to create the service instance?
A developer has a sandbox with code to log a message during execution, and the following code:
varLogger=require( ' dw/system/Logger ' );
Logger.info(message);
After the code executes, the developer does not see any log file with the message in the WebDAV folder.
What could the developer do to correct this issue?
A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in order to decide whether to render a template or redirect the user to a different page.
According to SFRA best practices, what is the correct approach to improve code reusability in this scenario?
A client has a requirement to allow users on the Storefront to filter by a newly created attribute.
After creating the search refinement, what else is necessary to achieve this?
A developer uses hooks for an extension point. Which is true for running multiple hooks for an extension point?
Given a NewsletterSubscription custom object that has a key attribute named email of type String, what is the correct syntax to create the NewsletterSubscription custom object?
Business Manager has the configuration:
• Active Log category is " root "
• Log level of INFO
The code below executes.
varlog=Logger.getLogger( " products " , " export " );
log.info( " This is important information " );
Using this information, what is the beginning of the filename in which the log will be written?
What is the expected result when the code segment executes with the logger configuration?
A developer needs to display a products list of their " Women Dresses " category in a new web application, independent of their main B2C Commerce site. This custom listing page needs to be styled differently from the existing one, as per marketing requirements. Which B2C Commerce tool should the developer use to collect the necessary information?
A retailer notices that the Account Addresses page is showing the wrong shopper ' s address.
Which tool should the developer start with to identify the issue?
A Storefront is designed so that multiple pages share a common header and footer layout.
Which ISML tag should a developer use on the templates for these pages to avoid code repetition in the most effective way?
A merchant wants to obtain an export file that contains all the products assigned to their Storefront catalog. They do not know how to achieve this easily without manual processing, so asked their developer to help generate this. The merchant ' s instance setup is as follows:
• They have one Master catalog and one Storefront catalog.
• Some, but not all, of the products in the Master catalog are assigned to categories within the Storefront catalog.
Which method allows the developer to generate the export for the merchant?
Given the requirements:
• To integrate with an external web service using HTTP requests.
• To create a service for this purpose with the Service framework using the LocalServiceRegistry class.
• To test the service before the external service provider makes the API available.
Which solution allows the developer to satisfy the requirements?
The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible.
Why might the categories not be visible?
A developer has these requirements for out-of-stock products:
• Save the SKUs of the out-of-stock products that the customer is interested in.
• Save the customer email regardless if the customer is a guest or registered.
• Email the customer when the product is back-in-stock.
Which step should the developer perform as part of the solution to achieve the requirements?
A developer wants to configure multiple products that should only be sold as a group. It should not be possible for buyers to buy these products individually. How should the developer configure the products?
A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an unlimited number of these digital vouchers, this item should be available to sell at all times.
How can a developer use Business Manager to ensure that the gift vouchers are always available?
What is the result when the code segment executes with the logger configuration?
An instance has custom logging enabled. The log reaches the file size limit.
What happens in this situation?
Which line of code should a developer add for custom category debug logging?
A client has two B2C Commerce sites in the same instance: one for the U.S. market, the other for the European market. They offer free gift wrapping on a selection of products. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.
How should a developer allow the merchant to independently adjust this number?
A developer is given the requirement to add a step to the existing business logic of the registration process.
How should the developer modify the route that handles the customer registration?
A client that sells to multiple countries in Europe needs to disable Apple Pay for Denmark.
Which Business Manager module is used to achieve this requirement?
A developer has custom debug statements in a script, but the messages are not showing up in the Storefront Toolkit Request Log.
Which step needs to be completed to get the messages to appear in the Request Log?
A custom cartridge that seemed to be performing well in a sandbox has been installed in production. The production instance is showing increased page load times that seem to be related to the new custom code. What can a developer do to quickly track down the potential problem?
A client sells its product in single-brand stores as well as in multi-brand stores. When shown in the store locator list, the client wants the single-brand stores to have a particular background color to highlight them.
Which Business Manager action should be completed to allow the developer to apply different styling to the single-brand stores?
How might a developer resolve the issue of low-stock items appearing at the top of search results?
Given a template rendered by a controller with caching and a remote include without caching, which situation applies?
A developer working on a multi-country site is asked to store country-specific data that drives the creation of a country selector. Examples of the data stored are:
• Pricebook to be used
• Image URL for country flag
The data used in staging also applies in production, but only for this site.
Which approach should the developer take to implement these requirements?
Given the SFRA Controller below:
01varserver=require( ' server ' );
02varcache=require( ' */cartridge/scripts/middleware/cache ' );
03
04server.get( ' Show ' ,cache.applyDefaultCache,function(req,res,next) {
05viewData={name: ' my string ' };
06res.render( ' /pages/mypage ' ,viewData);
07next();
08});
09
10module.exports=server.exports();
Why would a JavaScript debugger, that is stopped at line 06, fail to show the viewData variable in the inspection tool?