Labour Day - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

B2C-Commerce-Developer Questions and Answers

Question # 6

Given the following ISML example, how should a developer reference the product object in the current

iteration of thebasket?

A.

product

B.

pdict.Basket.products{loopstatus}

C.

loopstatus.product

D.

pdict.product

Full Access
Question # 7

A client has two B2C Commerce sites in the same instance: one forthe U.S. market, the other for the European market. They offer free gift wrapping on a selection of products. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.

How should a developer allow the merchant to independently adjust this number?

A.

Create a new custom preference by extending the Site Preference object type.

B.

Select the corresponding option in the system preference for Orders.

C.

Add a new Campaign using the Online Marketing section of the Business Manager.

D.

Configure a new localizable content slot with a market-specific value.

Full Access
Question # 8

Given a file in a plug-in cartridge with the following code:

‘use strict’:

Var base = module.superModule;

Function applyCustomCache (req,res,next){

res.CachePeriod = 6; //eslint-disable-line no-param-reassign

res.cachePeriodUnit = ‘hours’) //eslint-disable-line no-param-reassign

next();

}

Module.exports = base;

Module.exports.applyCustomCache = applyCustomCache;

What does this code extend?

A.

A controller

B.

A middleware script

C.

A decorator

D.

A model

Full Access
Question # 9

Business Manager has the configuration:

Active Log category is "root"

Log level of WARN

The code below is executing:

var log = Logger.getLogger("products");

Using this information, which two logs will be written?

Choose 2 answers

A.

log.warn("This is a warn message");

B.

log.error("This is an error message");

C.

log.info("This is an info message");

D.

log.debugfThis is a debug message");

Full Access
Question # 10

The developer is asked to enhance the functionality of an existing controller route by adding information to the response's viewData.

How should thedeveloper approach this task while following SFRA best practices?

A.

Replace the callback function of the existing route using superModule.

B.

Use the "extend" method of the server module for the existing route.

C.

Copy the existing route in a new cartridge and modify where necessary.

D.

Use the "append" method of the server module for the existing route.

Full Access
Question # 11

A developer has configured the following log levels for categories & sub categories as

WARN logging is enabled for 'product’ and DEBUG for "product.import"

What will be the log level used for various categories and sub-categories?

A.

WARN and ERROR are lugged for product" and all its subcategories. For thesubcategory 'product.import' DEBUG and INFO are also logoed

B.

WARN and ERROR are logged fix product' and all its subcategories. For the subcategory’’ product.import* DEBUG and INFO are not logged.

C.

WARN and FRROR ate lugged for product" and all its subcategories.

Full Access
Question # 12

A developer has custom debug statements in a script, but the messages are not showing up in the

Storefront Toolkit Request Log.

Which step needs to be completed to get the messages to appear in the Request Log?

A.

In Global preferences, check the box for Enable custom logging in Request Log.

B.

In Site Preferences, check the box for Enable custom Logging in Request Log

C.

In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files.

D.

In custom Log Settings, activate the loggin category at DEBUG level.

Full Access
Question # 13

To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token

generation in the customer address form:

<input name =”${dw.web.CSRFProtection.getTokenName()}”

value = “${dw.web.CSRFProtection.generateToken()”>

<the rest of the Form fields>

To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF

validation using one or both of these methods as applicable:

validateRequest

validateAjaxRequest

Where in the code does the developer need to add this CSRF validation check?

A.

In the controller function that displays the form

B.

In the middleware chain of the controller post route

C.

In the controller function that handles the submitted form

D.

In the model function that persists the form data

Full Access
Question # 14

A developer has a requirement to display a banner in two different category pages.

Which snippet of code should the developeradd to a template to allow the merchant to configure each independently?

A)

B)

C)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 15

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?

A.

$include(‘Page-Include’, ‘cid’,‘terms-and-conditions’)$

B.

$http(‘Content-Page’, ‘cid’, ‘terms-and-conditions’)$

C.

$httpUrl(‘Content-Show’, ‘cid’, ‘terms-and-conditions’)$

D.

$url(‘Page-Show’, ‘cid’, ‘terms-and-conditions’)$

Full Access
Question # 16

A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute?

A.

Change the "resource_id" value to: "/baskets/*/items".

B.

Change the "write_attributes" value to: "(+items)".

C.

Change the "read_attributes" value to: "(items)".

D.

Change the "methods" value to: ["get", "post"].

Full Access
Question # 17

Universal Containers calls thefollowing combination of products “The Basics” and sells the combination as a unique product ID:

  • One Model 103 container
  • Five Model 611 container
  • Tree Model 201 container

The Developer created these three products in the catalog.

What is the next stepin Business Manager to create “The Basics” as a combination?

A.

In the Product Bundles module, create a bundle named “The Basics”.

B.

In the Products module, create a product named “The Basics” and add the products to the Product Bundles tab.

C.

In the Products module, create a product named “The Basics” and add the products to the Product Sets tab.

D.

In the Product Sets module, create a product set named “The Basics”.

Full Access
Question # 18

A developer has the following files in template/resources:

account.proierties

weight.unit=kilos

account_en.propierties

weight.unit=stones

account_en_US.propierties

weight.unit= pounds

Using the default locale configuration, what is the current outcome of the page that renders the

account.isml template snippet below when visiting the Sofrefront with the English for Canada(en_CA) locale=

Your parcel weighs 10 ${Resource.msg(‘weight.unit’,’account’)}

A.

Your parcel weighs 10 stones.

B.

Your parcel weighs 10 pounds.

C.

Your parcel weighs 10 undefined.

D.

Your parcel weighs 10 kilos

Full Access
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?

A.

Create a service and implement the mockfull callback and a sitepreference to enable or disable the

mock response.

B.

Create a service and implement the mockFill callback and set the service mode tomock.

C.

Create a service and a Sitepreference that induce the service to respond witch a mock response

using a conditional.

D.

Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one

Full Access
Question # 20

A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

A.

Change the URI to /dw/shop/v18_3/products/creative-zen-v.

B.

Change the HTTP method to PUT.

C.

Change the HTTP method to GET.

D.

Include an authentication token in the request.

Full Access
Question # 21

A Digital Developer selects “Show Orderable Products Only” in the Search > Search Preferences Business Manager module.

Which business goal does this accomplish?

A.

Exclude products from search results ifAvailable to Sell (ATS) = 0.

B.

Exclude back-ordered products from showing on the website.

C.

Block displaying the product detail page if Available to Sell (ATS) = 0.

D.

Exclude pre-order products from search results.

Full Access
Question # 22

A Digital Developer must give users the ability to choose an occasion (holiday, birthday, anniversary, etc.) for which gifts are currently being selected. Thedata 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

Full Access
Question # 23

A client has three different sites with three locales. Two of the sites share a library and one site has a private library.

What does the shared library allowin this context?

A.

Sharing content slots between sites

B.

Sharing content assets among locales

C.

A Sharing content assets between sites

D.

Sharing content slots among locales

Full Access
Question # 24

A Digital Developer is tasked with setting up a new Digital Server Connection using UX Studio in their sandbox.

Which three items are required to accomplish this task? (Choose three.)

A.

Instance Version

B.

Instance Hostname

C.

Business Manager Username

D.

Keystore Password

E.

Business Manager Password

Full Access
Question # 25

A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used inthe application and notices that there are too many instances of unavailability.

Which two solutions are possible options to reduce the unavailability of the service? (Choose two.)

A.

Modify the code that makes the request to the external service to be wrapped in a try / catch block.

B.

Change the code that makes the request to set the throwOnError attribute, of the service, to be true.

C.

Increase the web service time out.

D.

Update the external service to have a faster response time.

Full Access
Question # 26

A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on thepipeline dictionary with the name myProduct.

Which code sample will achieve this?

A.

ISML.renderTemlpate ( "helloworld.isml", { "myProduct": "product" });

B.

ISML.renderTemlpate ( "helloworld.isml", { "product": myProduct });

C.

ISML.renderTemlpate ( "helloworld.isml", { product: myProduct });

D.

ISML.renderTemlpate ( "helloworld.isml", { myProduct: product });

Full Access
Question # 27

A developer working on a simple web service integration is asked toadd 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’)

Full Access
Question # 28

A client has a requirement to render different content on the homepage based on if the customer is logged in or guest 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.

Set the Content Slot configuration so it is based on the system customer group registered, versus unregistered.

C.

Set the Content Asset configuration for a customer that is a registered, versus unregistered, user.

D.

Add specific custom messages in Page Designer for a customer that is a registered, versus unregistered, user.

Full Access
Question # 29

A developer cannot create a custom object in Business Manager because the attributes do not show. The developer can view the object but not the attributes.

Whichaction should the developer take to resolve the problem?

A.

Change the data type of the attributes.

B Create an Attnbute Group with the desired attributes in it.

B.

Set the attributes to site-specific replicable.

Full Access
Question # 30

A merchant asks a developer to create a CachePartition for the home page, so that when the home page

is edited, only the home page is cleaned.

Given the above requirement, where should the developer create that partition in Business Manager?

A.

Administration > Sites > Manage Sites > Site > Cache

B.

Operations > Site > Manage Sites > Cache

C.

Operations > Cache > Site

D.

Site > Site Preferences > Cache

Full Access