Universal Containers wants to add a model field to each product. Products will have locale-specific model values. How should the Digital Developer implement the requirement?
A. Utilize resource bundles for translatable values.
B. Set the model field as a localizable attribute.
C. Store translated model values in different fields; one field for each locale.
D. Add model to a new custom object with localizable attributes.
Universal Containers requires that a new order comments attribute is added to the existing SiteGenesis checkout flow. This new attribute needs to be included as part of the standard order export. Aside from updating the HTML markup and form definition, which option contains all necessary steps to achieve this task?
A. Option A
B. Option B
C. Option C
D. Option D
A NewsletterSubscription custom object exists that has a key attribute named email of type String and the following script code. var CustomObject = dw.object.CustomObjectMgr.createCustomObject (`NewsletterSubscription' newsletterForm.email.value); However, the NewsletterSubscription custom object is not persisted. What is a possible reason?
A. The code shown is the wrong syntax. The correct syntax is: var CustomObject = dw.object.CustomObjectMgr.createCustomObject (`NewsletterSubscription' `email' newsletterForm.email.value);
B. The code shown needs to be wrapped in a try/catch block
C. The code shown is the wrong syntax. The correct syntax is: var CustomObject = dw.object.CustomObjectMgr.createCustomObject (newsletterForm.email.value `NewsletterSubscription');
D. The code shown needs to be wrapped in a transaction.
Given the SFRA Controller below:
Why would a JavaScript debugger, that is stopped at line 06, fail to show the viewData variable in the inspection tool?
A. viewData is declared but not assigned
B. viewData is assigned but not declared
C. viewData is a B2C Script reserved name
D. cache.applyDefaultCache is not a valid middleware
The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible. What are two possible reasons? (Choose two.)
A. The category does not contain available products
B. The category is not sorted
C. The category is offline
D. The Storefront catalog is offline
A developer working on a simple web service integration is asked to add appropriate logging to allow future troubleshooting.
According to logging best practices, which code should the developer write to log when an operation succeeds, but has an unexpected outcome that may produce side effects?
A. Logger.info(`Unexpected service response.')
B. Logger.warn(`Unexpected service response.')
C. Logger.error(`Unexpected service response.')
D. Logger.debug(`Unexpected service response.')
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. Replace the existing routes by creating a controller in separate new cartridge
B. Use the superModule property in the existing routes to extend their functionality
C. Append a new function to all the existing routes with the server module
D. Define a new middleware function and use it in the existing routes
A developer works on a multisite realm. A new site requires a different layout for the account landing page, but the business logic and data model remain the same.
1.
The existing code is in landing.isml and AccountControl.js in the app_custom_mystore cartridge.
2.
The app_custom_mystore cartridge contains any custom code for all other business functions.
3.
The cartridge path for the existing site is int_cybersource:int_paypal:app_custom_mystore:app_storefront_base.
The developer creates a new cartridge named app_custom_newproject that contains only the landing.isml template for the new site. Following best practices, which modification should be made to the new cartridge path?
A. Set the cartridge path so that app_custom_newproject is before app_custom_mystore.
B. Set the cartridge path so that app_custom_newproject is between app_custom_mystore and app_storefront_base.
C. Set the cartridge path so that app_custom_mystore is before int_cybersource.
D. Set the cartridge path so that app_custom_newproject is in the farthest right position.
A client has a requirement to render different content on the homepage based on if the customer is logged in or quest user. What should a developer implement to achieve this requirement?
A. Write specific custom code in the Content Asset for a customer that is a registered, versus unregistered, user.
B. Add specific custom messages in Page Designer for a customer that is a registered, versus unregistered, user.
C. Set the Content Slot configuration so it is based on the system customer group registered, versus unregistered.
D. Set the Content Asset configuration for a customer that is a registered, versus unregistered, user.
What is accomplished by the code below?
A. Performs a local include from the Account-Header endpoint.
B. Performs a remote include from the Account-Header endpoint.
C. Creates a link to the Account-Header endpoint that allows mobile navigation.
D. Performs a call to the Account-Header endpoint to allow mobile navigation.