11.11 Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

Magento-2-Certified-Associate-Developer Exam Dumps - Magento 2 Certified Associate Developer Exam

Question # 4

In layout files you can change al element’s order on a page. This can be done using one of the following:

  • instruction
  • before and after element attributes?

How are two methods different?

A.

They are the same, both provide access to the same functionality

B.

Elements are renamed by default when using the move instruction

C.

The move instruction allows altering an element’s parent node

D.

Before and after attributes can only be used with referenceContainer and referenceBlock

Full Access
Question # 5

What order operation is available in the My Account section in the storefront?

A.

Edit order

B.

Refund

C.

Reorder

D.

Invoice

Full Access
Question # 6

You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.

What two elements automatically render their children? (Choose two.)

A.

B.

C.

D.

Full Access
Question # 7

You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.

How do you do that?

A.

Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade

B.

Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade

C.

Run a command: bin/magento setup:db-schema:upgrade

D.

Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade

Full Access
Question # 8

In a code review of a merchant’s site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called.

What risk does this pose, and how can it be mitigated?

A.

There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed.

B.

Event observers are fired in alphabetical order of the observer name. There is no risk here.

C.

Magento only supports one observer per event. These observers will need to be combined into a single point of customization.

D.

Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins

Full Access
Question # 9

A module you are developing requires the addition of new routes that should be accessible in the store front.

Where do you define your module’s frontName?

A.

etc/frontend/routes.xml

B.

etc/frontend/config.xml

C.

etc/config.xml

D.

etc/routes.xml

Full Access
Question # 10

You need to find all orders in the processing state. You have written the code:

When you run the code, you get the following exception:

How do you resolve the exception?

A.

Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface

B.

Use dependency injection to load an instance of the SearchCriteria class

C.

Change the getList parameter to: $searchCriteriaBuilder->addFilter(‘state’, ‘processing’)->create()

D.

Clear generated code to get a new version of SearchCriteriaBuilder

Full Access
Question # 11

In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.

What is the public URL for this file?

A.

https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js

B.

https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js

C.

https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js

D.

https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js

Full Access
Question # 12

The constructor function for \Magento\Catalog\Model\Category contains this excerpt:

With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?

A.

If no $storeManager is provided, Magento’s code generator creates a shell concrete class based on \Magento\Store\Model\StoreManagerInterface

B.

Magento finds all classes that implement \Magento\Store\Model\StoreManagerInterface (ordered alphabetically) and injects the first class.

C.

Magento looks to the di.xml files in the entire system for a preference node for \Magento\Store\Model\StoreManagerInterface. This class is constructed and injected

D.

Magento throws an exception because you cannot instantiate an interface

Full Access
Question # 13

You have been asked to display details from the customer’s latest order on the customer’s account dashboard (customer/account/). You create a new custom template to show the information.

How do you obtain an order repository so you can fetch an order?

A.

Create a view model and specify an OrderRepositoryInterface argument in the _construct method

B.

In your template, add the following:$orderRepository=ObjectManager::getInstance()->get(OrderRepositoryInterface::class);

C.

In your block, add a method with the following:return ObjectManager::getInstance()->get(OrderRepositoryInterface::class);

D.

In your template, add the following:$orderRepository = new OrderRepository();

Full Access
Question # 14

Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

A.

Language

B.

Area

C.

Store View

D.

Store

E.

Website

Full Access
Question # 15

How can you render a text on a page using only layout xml?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access