Labour Day Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

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

Page: 1 / 10
Total 103 questions

Magento 2 Certified Associate Developer Exam Questions and Answers

Question 1

You are working on a Magento store which will be selling in two countries. Each country has its own set of payment methods.

How do you organize the project to support this requirement?

Options:

A.

Create one website, two payment scopes

B.

Create one website, one store view

C.

Create one website, two store views

D.

Create two websites, two store views

Question 2

You are implementing a custom module MyModule, which provides an implementation of \Psr\Log\LoggerInterface called \MyCompany\MyModule\Logger.

The LoggerInterface has the default preference declared in app/etc/di.xml.

Keeping upgradability in mind, how do you make \MyCompany\MyModule\Logger the default implementation of the LoggerInterface globally?

Options:

A.

Declare a new preference for the LoggerInterface in app/code/myCompany/MyModule/etc/frontend/di.xml

B.

Declare a new preference for the LoggerInterface in MyCompany/MyModule/etc/di.xml

C.

Overwrite the existing preference for the LoggerInterface in app/etc/di.xml

D.

Declare a new preference for the LoggerInterface in app/code/MyCompany/MyModule/etc/global/di.xml

Question 3

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 4

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 5

A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.

Which two actions do you take to make sure the newsletter is sent? (Choose two.)

Options:

A.

Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml

B.

Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml

C.

Make sure bin/magento cron:run is added to the system crontab

D.

Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml

Question 6

You are adding a new entry to the backend menu that appears after

Marketing > SEO & Search > Site Map

You see the existing site map menu item is declared by the node:

Question # 6

What two actions do you take to configure the new menu entry location? (Choose two.)

Options:

A.

Specify item XML in the file etc/adminhtml/menu/marketing/seo/menu.xml

B.

Specify parent=”Magento_Sitemap::catalog_sitemap”

C.

Specify parent=”Magento_Backend::marketing_seo”

D.

Specify sortOrder=”100”

Question 7

What are two functions of a resource model? (Choose two.)

Options:

A.

It executes create, retrieve, update and delete actions for an entity

B.

It loads lists of entity models

C.

It is made available in the Magento API for the purpose of data manipulation

D.

It maps an entity to one or more database rows

Question 8

You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.

What is the correct layout declaration for this?

Question # 8

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 9

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

Question # 9

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 10

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?

Options:

A.

etc/frontend/routes.xml

B.

etc/frontend/config.xml

C.

etc/config.xml

D.

etc/routes.xml

Question 11

You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process.

Keeping in mind upgradeability, how is this done?

Options:

A.

Create a before plugin for \Magento\Customer\Api\AccountManagementInterface’s authenticate method

B.

Create a mutation of a CustomerInterface object to intercept the username and password

C.

Create an event observer for the user_save_after observer

D.

Override \Magento\Customer\Controller\AccountController.php

Question 12

How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?

Question # 12

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 13

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

Question # 13

What is the required class definition for the event observer?

Question # 13

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 14

Assume that a customer’s cart only includes one downloadable product.

What effect will it cause on the quote object?

Options:

A.

The quote object will have a downloadable URL instead of an address

B.

The quote object will not have shipping address

C.

The quote object will not have any address

D.

The quote object will not have a billing address

Question 15

Magento 2’s architecture uses code to bootstrap a custom module that resides in app/code.

What two files are required to make a module usable? (Choose two.)

Options:

A.

Helper/Data.php

B.

etc/config.xml

C.

etc/module.xml

D.

registration.php

Page: 1 / 10
Total 103 questions