New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free and Premium Magento Magento-2-Certified-Associate-Developer Dumps Questions Answers

Magento 2 Certified Associate Developer Exam Questions and Answers

Question 1

How do you obtain customer information in a JavaScript module?

Options:

A.

Magento does not expose customer information in JavaScript for security reasons

B.

By sending an AJAX request to the url: /customer/account/info/?json=1

C.

By using customerData.get(‘customer’) call, where customerData is an instance of Magento_Customer/js/customer-data

D.

Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem(‘customer’)

Buy Now
Question 2

A merchant sells shoes with multiple variations such as a color and size. A shoe is represented by a configurable product. There are seven different colors and four sizes.

What is the minimal amount of simple products that represent a combination of color and size needs to be created in order to make a shoe salable?

Options:

A.

Each color and size must have at least one representation, so a minimum of seven products is needed

B.

One simple product that represents a combination of color and size is enough

C.

A product may be purchased even without any combination available. The color and size may be adjusted during order fulfillment

D.

A simple product for every combination must be created

Question 3

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 4

A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.

You decided to implement an observer for customer_save_after_data_object event.

In which file do you declare the observer?

Options:

A.

etc/webapi_rest/events.xml

B.

etc/adminhtml/events.xml

C.

etc/webapi/rest_events.xml

D.

etc/events.xml

Question 5

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 6

A Magento industry partner shipping provider has tasked you to build their integration module called MyCompany_ShippingProvider.

Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?

Options:

A.

Magento\Config\Model\Config\Option\Yesno

B.

Magento\Config\Model\Config\Source\Yesno

C.

Magento\Config\Model\Config\Frontend\Yesno

D.

Magento\Config\Model\Config\Backend\Yesno

Question 7

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

Options:

A.

Edit order

B.

Refund

C.

Reorder

D.

Invoice

Question 8

You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database.

What do you inject into a constructor to represent each product you create?

Options:

A.

\Magento\Catalog\Model\Product

B.

\Magento\Catalog\Api\Data\ProductInterfaceFactory

C.

\Magento\Catalog\Api\Data\ProductInterface

D.

\Magento\Catalog\Model\ProductBuilder

Question 9

You are adding a new menu item to the admin backend which will link to a custom backend page.

The declaration of the route:

What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?

Options:

A.

action=”adminhtml/mycompany/mymodule/”

B.

action=”admin/mycompany/mymodule/”

C.

It is not possible without extending the adminhtml route in routes.xml

D.

action=”mycompany/mymodule/”

Question 10

A client has asked you to include category url keys in product URLs.

How is this done?

Options:

A.

Create an observer for controller_action_postdispatch_catalog_product_view

B.

This is not possible because products can belong to multiple categories

C.

Set the configuration value of catalog/seo/product_use_categories to Yes

D.

Create an after plugin on \Magento\UrlRewrite\Controller\Router::generateRewrite

Question 11

You are working on a custom web API endpoint and have configured it in etc/webapi.xml. This config is cached as part of the config_webservice cache type.

Keeping performance in mind, how do you refresh the cached version of this config using Magento CLI?

Options:

A.

cache:clean config_webservice

B.

cache:refresh config_webservice

C.

cache:flush

D.

cache:purge

Question 12

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 13

What is a valid use case for an around plugin?

Options:

A.

The execution of the pluginized method must be suppressed

B.

The arguments of the before plugins must be modified

C.

The arguments of the after plugins must be modified

D.

The execution of the before and after plugins must be suppressed

Question 14

You have created a new section in system configuration under the Catalog tab:

How do you restrict an access to the section using Magento ACL?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 15

While reviewing a layout file named sales_order_view.xml you notice the element

What is the purpose of this element?

Options:

A.

Replaces the customer_account handle with sales_order_view

B.

Nothing, this element has been deprecated

C.

Adds the customer_account handle to the page’s handles list

D.

Updates the current page handle to customer_account