Question 56

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 57

    A developer is implementing new Page Designer content on a merchant's Storefront and adds the line below to the setupContentSearchfunction in the searchHelpers.jsfile.
    apiContentSearchModel.setFilteredByFolder(false);
    What does this achieve?
  • Question 58

    A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions.
    Which link function generates the correct link?
  • Question 59

    A Digital Developer is working on a multi-site realm. A new site requires a different layout for the account landing page. The business logic and data model remain the same. The existing code is in AccountCoatrol.-s and accountlanding.isul in the app_at storefront cartridge The app_3torefront cartridge contains code for all other business functions. The cartridge path for the new site is currently int_cybersource:
    mc_];aypal:app_storefront.
    The Developer creates a new cartridge named app_newsire that contains only the accountlanding.isml template for the new site.
    Which modification should be made to the new cartridge path?
  • Question 60

    A Digital Developer has detected storefront pages being rendered with an error message. After inspecting the log files, the Developer discovered that an enforced quota is being exceeded.
    What action should the Developer take to stop the quota violation?