ExamGecko
Ask Question

Salesforce Certified B2C Commerce Developer Practice Test - Questions Answers, Page 7

List of questions

Question 61

Report
Export
Collapse

In Log Center, a developer notes a number of Cross Site Request Forgery (CSRF) log entries. The developer knows that this happens when a CSRF token is either not found or is invalid, and is working to remedy the situation as soon as possible.

Which two courses of action might solve the problem? (Choose two.)

Extend the CSRF token validity to avoid timeouts
Extend the CSRF token validity to avoid timeouts
Delete the existing CSRF whitelists in Business Manager
Delete the existing CSRF whitelists in Business Manager
Add the token in the ISML template
Add the token in the ISML template
Add csrfProtection.generateToken as a middleware step in the controller
Add csrfProtection.generateToken as a middleware step in the controller
Suggested answer: A, B
asked 23/09/2024
Oky ramadhani
42 questions

Question 62

Report
Export
Collapse

A developer needs to update the package.json file so that it points to the hook file for a cartridge, using the hooks keyword.

Which snippets works correctly when added to the file?

{"hooks": "./scripts/hooks.json"}
{"hooks": "./scripts/hooks.json"}
{hooks: ./cartridge/scripts/hooks.json}
{hooks: ./cartridge/scripts/hooks.json}
{hooks: ./scripts/hooks.json}
{hooks: ./scripts/hooks.json}
{"hooks": "./cartridge/scripts/hooks.json"}
{"hooks": "./cartridge/scripts/hooks.json"}
Suggested answer: D

Explanation:

Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fsfra%2Fb2c_sfra_hooks.html

asked 23/09/2024
Alvin Thomas
46 questions

Question 63

Report
Export
Collapse

A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.

Which snippet of code should be used?

Logger.warn('The current product is ${myProduct.getID()} with name ${myProduct.getName()}');
Logger.warn('The current product is ${myProduct.getID()} with name ${myProduct.getName()}');
Logger.warn('The current product is {0} with name {1}', myProduct.getID(), myProduct.getName());
Logger.warn('The current product is {0} with name {1}', myProduct.getID(), myProduct.getName());
Logger.warn('The current product is %s with name %s').context(myProduct.getID(), myProduct.getName());
Logger.warn('The current product is %s with name %s').context(myProduct.getID(), myProduct.getName());
Logger.warn('The current product is {0} with name {1}'}.context(myProduct.getID(), myProduct.getName());
Logger.warn('The current product is {0} with name {1}'}.context(myProduct.getID(), myProduct.getName());
Suggested answer: B
asked 23/09/2024
annalise ramdin
36 questions

Question 64

Report
Export
Collapse

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?

The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject('NewsletterSubscription' 'email' newsletterForm.email.value);
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject('NewsletterSubscription' 'email' newsletterForm.email.value);
The code shown needs to be wrapped in a try/catch block
The code shown needs to be wrapped in a try/catch block
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value 'NewsletterSubscription');
The code shown is the wrong syntax. The correct syntax is:var CustomObject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value 'NewsletterSubscription');
The code shown needs to be wrapped in a transaction.
The code shown needs to be wrapped in a transaction.
Suggested answer: A
asked 23/09/2024
Junan Kuah
36 questions

Question 65

Report
Export
Collapse

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?

Pipeline Profiler
Pipeline Profiler
Code Profiler
Code Profiler
Reports and Dashboards module
Reports and Dashboards module
Storefront Toolkit
Storefront Toolkit
Suggested answer: B
asked 23/09/2024
John Doe
36 questions

Question 66

Report
Export
Collapse

A developer is implementing new Page Designer content on a merchant's Storefront and adds the line below to the setupContentSearch function in the searchHelpers.js file.

apiContentSearchModel.setFilteredByFolder(false);

What does this achieve?

Filters Page Designer search results into folders
Filters Page Designer search results into folders
Prevents Page Designer pages from being searchable
Prevents Page Designer pages from being searchable
Allows Page Designer pages and components to be searchable
Allows Page Designer pages and components to be searchable
Allows filtering Page Designer pages by folder
Allows filtering Page Designer pages by folder
Suggested answer: D
asked 23/09/2024
Ahmed Alghadeer
31 questions

Question 67

Report
Export
Collapse

Consider the following information:

A merchant has this three-tier category structure setup in the Storefront catalog.

- New Arrivals > Women > Clothing

The category named Clothing has all the clothing items for Women and is merchandised. A Search Refinement named Newness is correctly configured for the Clothing category.

When a merchandiser views the Clothing category, the Search Refinement appears and works as expected. However, the merchandiser does not see the Search Refinement when searching for Clothing via the Storefront search.

What is the reason?

The Search Refinement definition is not set up for the New Arrivals category
The Search Refinement definition is not set up for the New Arrivals category
There are conflicting Search Refinement definitions for Clothing and one of its parent categories
There are conflicting Search Refinement definitions for Clothing and one of its parent categories
The Search Refinement definition is not set up for the Women category
The Search Refinement definition is not set up for the Women category
The Search Refinement definition is not set up for the Root category
The Search Refinement definition is not set up for the Root category
Suggested answer: A
asked 23/09/2024
Arushi Rastogi
29 questions

Question 68

Report
Export
Collapse

Given the requirement to add caching to an existing page while adhering to SFRA best practices, which code snippet should be used?

server.get('Show', cache.applyDefaultCache, function (req, res, next) {// code});
server.get('Show', cache.applyDefaultCache, function (req, res, next) {// code});
<iscache varyby="price_promotion" type="relative" status="on"/>
<iscache varyby="price_promotion" type="relative" status="on"/>
server.get('Show', function (req, res, next) {//code}).applyDefaultCache();
server.get('Show', function (req, res, next) {//code}).applyDefaultCache();
<iscache type="relative" hour="24"/>
<iscache type="relative" hour="24"/>
Suggested answer: A

Explanation:

Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fsfrajsdoc%2Fjs%2Fserver%2Fapp_storefront_base_cartridge_controllers_Page.js.html

asked 23/09/2024
Shaun Kilmartin
26 questions

Question 69

Report
Export
Collapse

Given the SFRA Controller below:

Salesforce Certified B2C Commerce Developer image Question 69 59879 09232024001900000000

Why would a JavaScript debugger, that is stopped at line 06, fail to show the viewData variable in the inspection tool?

viewData is declared but not assigned
viewData is declared but not assigned
viewData is assigned but not declared
viewData is assigned but not declared
viewData is a B2C Script reserved name
viewData is a B2C Script reserved name
cache.applyDefaultCache is not a valid middleware
cache.applyDefaultCache is not a valid middleware
Suggested answer: B
asked 23/09/2024
P B
41 questions

Question 70

Report
Export
Collapse

Which three configurations does a developer need to ensure to have a new product visible in the Storefront? (Choose three.)

The Storefront catalog that contains the product is assigned to a site
The Storefront catalog that contains the product is assigned to a site
The product has a price
The product has a price
The product has a master product
The product has a master product
The product is online and searchable
The product is online and searchable
The search index is built
The search index is built
Suggested answer: A, B, C

Explanation:

Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fproducts%2Fb2c_products.html

asked 23/09/2024
Armindo Malafaia Neto
35 questions
Total 209 questions
Go to page: of 21
Search

Related questions