Magento magento-2-certified-associate-developer practice test

Exam Question & Answers


Question 1

A client has asked you to include category url keys in product URLs.
How is this done?

  • 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
Answer:

D

Discussions

Question 2

Magento allows you to specify custom values per store for product attributes created in the admin
panel.
Which architectural pattern makes it possible?

  • A. Store Manager
  • B. Extension Attribute
  • C. Entity Attribute Value
  • D. Dependency Injection
Answer:

B

Discussions

Question 3

What is the relationship between products and categories in Magento?

  • A. Products may be assigned to zero or more categories
  • B. Product to category relation is dynamically defined by Catalog Product Rules
  • C. Each product belongs to zero or one category
  • D. Each product always belongs to one category
Answer:

A

Discussions

Question 4

There are two different configurable products which both share one variation. The shared variation is
represented by the same simple product.
A customer added both configurables to the cart with the same selected variation?
How will they be displayed?

  • A. As two separate line items with quantity 1 each
  • B. As one line item which lists both configurable products with quantity 1 each
  • C. As one line item of the first product with quantity 2
  • D. As one line item of the second product with quantity 2
Answer:

B

Discussions

Question 5

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?

  • 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
Answer:

A

Discussions

Question 6

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

  • 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
Answer:

B,D

Discussions

Question 7

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?

  • 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=”…”
Answer:

A

Discussions

Question 8

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, Magentos 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
Answer:

A

Discussions

Question 9

How do you add a new link into the My Account sidebar?

  • A. By creating a new UI component
  • B. By creating a child of the My Account UI component
  • C. By adding the new section into the customer_account table in the database
  • D. By using a layout update
Answer:

C

Discussions

Question 10

Assume that a customers cart only includes one downloadable product.
What effect will it cause on the quote object?

  • 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
Answer:

B

Discussions
To page 2