Winter Special Flat 65% Limited Time Discount offer - Ends in 0d 00h 00m 00s - Coupon code: suredis

Magento Magento-2-Certified-Associate-Developer Magento 2 Certified Associate Developer Exam Exam Practice Test

Magento 2 Certified Associate Developer Exam Questions and Answers

Question 1

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

Options:

A.

Edit order

B.

Refund

C.

Reorder

D.

Invoice

Question 2

You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.

In which file will the event observer be declared?

Options:

A.

etc/frontend.xml

B.

etc/events.xml

C.

etc/config.xml

D.

etc/frontend/events.xml

Question 3

Your module adds a new controller class which will return a JSON response.

What will be the return type of the execute method?

Options:

A.

You should implement a new API endpoint instead of returning JSON from a controller

B.

The string value of \Zend_Json::encode()

C.

An instance of \Magento\Framework\Controller\Result\Json

D.

No return needed, an object that can be converted to JSON must be set as the Response body

Question 4

A merchant tasks you to keep sales managers out of the system configuration backend pages.

How do you do that using the admin interface?

Options:

A.

You remove access to the restricted pages from each user’s ACL settings

B.

You create a role with limited permissions and assign all sales manager users to the new role

C.

This is not possible in a native Magento instance and requires customization

D.

You create a role with access to the system configuration pages and assign it to all users except the sales managers

Question 5

You want to remove a column introduced by a third-party extension via declarative schema.

How do you do that?

Options:

A.

Create the etc/db_schema.xml file and specify disable=”true” on the column

B.

Modify the original etc/db_schema.xml file and remove the column from there

C.

Create a SchemaPatch file and remove the column programmatically

D.

Copy the etc/db_schema.xml file into your module and remove the column from your copy

Question 6

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?

Options:

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

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?

Options:

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

Question 8

You are creating a new page layout for your custom module.

What is the primary difference between container and block elements?

Options:

A.

They extend different abstract classes

B.

A container’s children are rendered automatically

C.

Only containers can be removed by name or alias

D.

A block’s position within the layout can be altered

Question 9

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?

Options:

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

Question 10

You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a reference. In the file you see the node:

What is the result of specifying resource=”Magento_Catalog::catalog”?

Options:

A.

The menu item will only be visible to users who are assigned to a role with access to the matching ACL resource

B.

The menu item will only be visible if the class method specified by the resource returns a true value

C.

The last selected menu item for a user is stored in the DB so the previously visited page can be restored on the next login

D.

The resource is used to locate the correct translation for the attributes listed in title=”…”

Question 11

Which two tasks are supported by Magento CLI? (Choose two.)

Options:

A.

Customer password reset

B.

Clearing cache

C.

Codebase deployment from developer machine to staging server

D.

Administrator account creation

Question 12

A module declares the route:

What is the layout handle of the storefront path /custom/feature/?

Options:

A.

mymodule_feature

B.

custom_feature

C.

mymodule_feature_index

D.

custom_feature_index

Question 13

What will be the result of calling the save() method on a collection instance?

Options:

A.

It will save all items with one INSERT … ON DUPLICATE KEY UPDATE query

B.

It will loop over all items and call save () on each one

C.

It will save the select query execution result into the cache

D.

It will save the select query to the cache

Question 14

You have configured an event observer to watch the checkout_submit_all_after event using this XML:

What is the required class definition for the event observer?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 15

You are writing a customization for the customer module. You need to make sure the configuration files from your module are loaded after the customer module’s configuration.

Where should the dependency be declared?

Options:

A.

composer.json

B.

etc/module.xml

C.

etc/config.xml

D.

etc/di.xml