Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

B2C-Commerce-Developer Practice Test


Page 2 out of 45 Pages

A Digital Developer must give users the ability to choose an occasion (holiday, birthday, anniversary, etc.) for which gifts are currently being selected. The data needs to be persistent throughout the current shopping experience. Which data store variable is appropriate, assuming there is no need to store the selection in any system or custom objects?


A.

Request scope variable


B.

Page scope variable


C.

Session scope variable


D.

Content slot variable





C.
  

Session scope variable



Server.get(‘Show’, consentTracking.consent, cache.applyDefaultCache, function (req,res,next){
Var Site = require(‘dw/system/Syte”);
Var pageMetaHelpter = require(‘*/cartridge/scripts/helpers/pageMetaHelper’);
pageMetaHelpter.setPageMetaTags(req.pageMetaData, Site.current);
res.render(‘/home/homePage’);
Missing code here
}, pageMetadata.computedPageMetadata);The controller endpoint code snippet above does not work.
Which line of code should the developer use to replace line 6 and correct the problem?


A.

next();


B.

return res;C. res.next();


C.

req.next();





A.
  

next();



A developer needs to update the package.json file so that it points to the hock file for a cartridge, using
the hooks keyword. Which snippets work correctly when added to the file?:


A.

{ “hooks”: “./cartridge/scripts/hooks.json” }


B.

{ “hooks”: “./scripts/hooks.json” }


C.

{ hooks: “./cartridge/scripts/hooks.json” }


D.

{ hooks: ./scripts/hooks.json }





A.
  

{ “hooks”: “./cartridge/scripts/hooks.json” }



What happens if the log file size limit is reached in custom logging?


A.

Logging is suspended for the day.


B.

Logging is suspended for two hours.


C.

The log file is deleted and recreated from scratch.


D.

The log file rolls over and the last used log is overwritten.





C.
  

The log file is deleted and recreated from scratch.



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.debug(‘Unexpected service response’)


C.

Logger.error(‘Unexpected service response’)


D.

Logger.warn(‘Unexpected service response’)





D.
  

Logger.warn(‘Unexpected service response’)




Page 2 out of 45 Pages
Previous