Full Magento-2-Associate-Developer Practice Test and 105 unique questions with explanations waiting just for you!
Magento Certified Developer Dumps Magento-2-Associate-Developer Exam for Full Questions - Exam Study Guide
NEW QUESTION 25
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?
- A.

- B.

- C.

- D.

Answer: B
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/219813/magento2-how-to-add-custom-block-on- product-page
NEW QUESTION 26
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 of the second product with quantity 2
- C. As one line item which lists both configurable products with quantity 1 each
- D. As one line item of the first product with quantity 2
Answer: C
Explanation:
Explanation/Reference: https://firebearstudio.com/blog/the-complete-guide-to-magento-2-configurable-products.html
NEW QUESTION 27
You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?
- A. Using custom options, with rings as simple products
- B. Using categories, with each ring size as a separate product
- C. Using configurable products, with ring size as an attribute value
- D. Using custom options, with rings as bundle products
Answer: C
NEW QUESTION 28
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/config.xml
- B. etc/frontend/config.xml
- C. etc/routes.xml
- D. etc/frontend/routes.xml
Answer: D
NEW QUESTION 29
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/register.js
- B. https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
- C. https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
- D. https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
Answer: D
NEW QUESTION 30
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?
- A. Create a mutation of a CustomerInterface object to intercept the username and password
- B. Create an event observer for the user_save_after observer
- C. Override \Magento\Customer\Controller\AccountController.php
- D. Create a before plugin for \Magento\Customer\Api\AccountManagementInterface's authenticate method
Answer: B
NEW QUESTION 31
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?
- A. etc/config.xml
- B. etc/frontend/events.xml
- C. etc/events.xml
- D. etc/frontend.xml
Answer: B
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/128548/trigger-event-after-an-order-has-been-
created-saved/128565
NEW QUESTION 32
You want to remove a column introduced by a third-party extension via declarative schema.
How do you do that?
- A. Copy the etc/db_schema.xml file into your module and remove the column from your copy
- B. Modify the original etc/db_schema.xml file and remove the column from there
- C. Create the etc/db_schema.xml file and specify disable="true" on the column
- D. Create a SchemaPatch file and remove the column programmatically
Answer: A
NEW QUESTION 33
You added a plugin declaration to MyCompany/MyModule/etc/di.xml:
What will be the effect of this declaration?
- A. An exception because of the syntax error in the declaration
- B. An exception because plugins must not be applied to the interfaces
- C. The plugin will be applied to all implementors of the ActionInterface
- D. The plugin will be ignored because ActionInterface will never be instantiated directly
Answer: A
Explanation:
Explanation
NEW QUESTION 34
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?
- A. Option D
- B. Option B
- C. Option A
- D. Option C
Answer: B
NEW QUESTION 35
A merchant is interested in setting different prices for the same products in different storescopes.
What do you reply to this inquiry?
- A. The prices can only be scoped per websiteor globally
- B. The price scope can be set to storebut this will lead to performance degradation of category pages
- C. The prices do not support scopes
- D. The prices can be scoped per store
Answer: A
Explanation:
Explanation/Reference: https://www.quora.com/How-can-I-set-up-different-prices-for-the-same-product-per-Magento-s- Store-View-Im-using-Magento-2-2
NEW QUESTION 36
The module MyCompany_MyModule provides custom admin interface pages.
Access to these pages should only be granted to specific users.
You add the required configuration to the module's acl.xml file, but the setting does not seem to work as expected.
How do you visually check if Magento evaluates your ACL resource as expected?
- A. Inspect the response of a GET request to the webapi endpoint http://example.com/rest/V1/acl/resources
- B. In the browser, open the admin User Roles page. Choose a role and inspect the tree of available resources
- C. Inspect the output of the CLI command bin/magento admin:role:resources - all
- D. Write a plugin for the class \Magento\Framework\Acl\LoaderInterface::populateAcl() and echo out the loaded roles
Answer: A
NEW QUESTION 37
Assume that $collection is a new instance of a class that extends
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids.
How do you select a list of records from the database where the record ids are in the $ids list?
- A. $collection->in($ids);
- B. $collection->addFieldToFilter('record_id',['in'=>$ids]);
- C. $collection->filterIn($ids);
- D.

Answer: B
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/121040/how-to-get-product-collections-by-set-of-ids- in-magento-2
NEW QUESTION 38
How do you add a new link into the My Account sidebar?
- A. By creating a new UI component
- B. By adding the new section into the customer_account table in the database
- C. By creating a child of the My Account UI component
- D. By using a layout update
Answer: B
NEW QUESTION 39
What order operation is available in the My Account section in the storefront?
- A. Edit order
- B. Reorder
- C. Invoice
- D. Refund
Answer: B
NEW QUESTION 40
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 store views
- B. Create one website, two payment scopes
- C. Create two websites, two store views
- D. Create one website, one store view
Answer: B
Explanation:
Explanation
NEW QUESTION 41
You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?
- A. Clean the <magento_root>/generated/ folder
- B. Clean the page cache
- C. Clean the config cache
- D. Deploy static content
Answer: B
NEW QUESTION 42
You added a plugin declaration to MyCompany/MyModule/etc/di.xml:
What will be the effect of this declaration?
- A. An exception because of the syntax error in the declaration
- B. An exception because plugins must not be applied to the interfaces
- C. The plugin will be applied to all implementors of the ActionInterface
- D. The plugin will be ignored because ActionInterface will never be instantiated directly
Answer: A
NEW QUESTION 43
......
Authentic Best resources for Magento-2-Associate-Developer Online Practice Exam: https://www.itpassleader.com/Magento/Magento-2-Associate-Developer-dumps-pass-exam.html