Question 16
A client has a requirement to allow users on the Storefornt to filter by a newly created attribute.
Which is necessary to achieve this?
Question 17
A Newsletter controller contains the following route:
Server.post('Subscribe', function (req,res,next){
var newsletterForm = server.forms.getForm('newsletter');var CustomObjectMgr = require('dw/object/CustomObjectMgr'); if(newsletterForm.valid){ try{ var CustomObject = CustomObjectMgr.createCustomObejct('NewsletterSubscription', newsletterform.email.value); CustomObject.custom.firstName = newsletterForm.fname.value; CustomObject.custom.lastName = newsletterForm.lname.value;-
} catch(e){
//Catch error here
}
}
next();
});
Assuming the Custom Object metadata exists, why does this route fail to render the newsletter template when the subscription form is correctly submitted?
Question 18
A developer is writing a server side script that needs to maintain state across calls. The persistent information needed includes these items.
* The current customer
* Whether or not the customer is authenticated
* The privacy attributes (such as tracking consent or cookie policy)
Which technique should the developer use to maintain state in an efficient and scalable manner that follows best practice?
Question 19
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?
Question 20
A merchant is selling a new product line of televisions. In order to deliver a good customer experience, the merchandising team wants the screen size to be incorporated into the search and navigation journey.
Which two things can the developer do to facilitate this for them?
Choose 2 answers
