[Sep 04, 2021] Magento-2-Associate-Developer Ultimate Study Guide - iPassleader
Ultimate Guide to Prepare Magento-2-Associate-Developer Certification Exam for Magento Certified Developer in 2021
NEW QUESTION 47
During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in
the file etc/adminhtml/system.xml:
What is the consequence of the attribute showInStore being set to 0?
- A. The input field will be disabled if a store view scope is selected in the system configuration
- B. The input field will only be visible if a website's default store scope is selected in the system configuration
- C. The input field will not be visible if a store view scope is selected in the system configuration
- D. The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a
$scopeType argument of 'store'.
Answer: C
Explanation:
Explanation/Reference: https://www.mageplaza.com/magento-2-module-development/create-system-xml-configuration-
magento-2.html
NEW QUESTION 48
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 49
A third-party module uses a layout update that changes the template path for a core block from product/ view/addto/compare.phtml of the Magento_Catalog module to custom/view/addto/ compare.phtmlof your custom module. The merchant has a customized version of this template in their custom theme.
What is a consequence of this setup?
- A. If another module is installed which also customizes the same core template, the templates will be rendered sequentially
- B. If the custom module is removed, the custom template will no longer apply
- C. This setup will throw an IllegalStateException
- D. If a preference for the core block is set, the template will no longer apply
Answer: B
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/259547/how-to-a-third-party-module-uses-a-layout- update-that-changes-the-template-path
NEW QUESTION 50
You are creating a new page layout for your custom module.
What is the primary difference between container and block elements?
- A. A block's position within the layout can be altered
- B. They extend different abstract classes
- C. Only containers can be removed by name or alias
- D. A container's children are rendered automatically
Answer: D
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/256478/what-is-the-functional-difference-of-block- container-in-magento-2
NEW QUESTION 51
What order operation is available in the My Account section in the storefront?
- A. Edit order
- B. Reorder
- C. Invoice
- D. Refund
Answer: C
Explanation:
Explanation
Explanation/Reference: https://docs.magento.com/m2/ce/user_guide/sales/order-processing.html
NEW QUESTION 52
What happens when a category's is_anchor attribute is set to 1?
- A. Products without a specified category will be associated with this category
- B. The category will always be visible in the menu
- C. The customer will see all products from all children of the category
- D. This is the default category for a website
Answer: C
NEW QUESTION 53
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
Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html
NEW QUESTION 54
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?
- A. This is out-of-the box functionality
- B. By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout functionality to use that new attribute
- C. By altering the customer_entity table, adding the field billing_address2, and customizing both My Account and Checkout functionality to use that new field
- D. By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
Answer: A
NEW QUESTION 55
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?
- A. \Magento\Catalog\Api\Data\ProductInterface
- B. \Magento\Catalog\Model\Product
- C. \Magento\Catalog\Model\ProductBuilder
- D. \Magento\Catalog\Api\Data\ProductInterfaceFactory
Answer: D
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/102922/programmatically-create-a-simple-product-
in-magento-2
NEW QUESTION 56
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.)
- A. etc/config.xml
- B. registration.php
- C. etc/module.xml
- D. Helper/Data.php
Answer: B,C
Explanation:
Explanation/Reference: https://inchoo.net/magento-2/how-to-create-a-basic-module-in-magento-2/
NEW QUESTION 57
What are two functions of a resource model? (Choose two.)
- A. It loads lists of entity models
- B. It is made available in the Magento API for the purpose of data manipulation
- C. It executes create, retrieve, update and delete actions for an entity
- D. It maps an entity to one or more database rows
Answer: A,D
NEW QUESTION 58
In a custom module you are adding a new field to the store configuration. The field will set the value for the configuration path mycompany/mymodule/myoption.
How do you supply the default value for that configuration option?
- A. In the system/mycompany/group/mymodule/field/myoption node in the etc/system.xml file
- B. In the system/section/group/field/value node in the etc/adminhtml/system.xml file
- C. In the config/default/mycompany/mymodule/myoption node in the etc/config.xml file
- D. In the menu/default/section/group/field node in the file etc/adminhtml/menu.xml
Answer: C
NEW QUESTION 59
How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive?
- A. Option A
- B. Option D
- C. Option B
- D. Option C
Answer: A
NEW QUESTION 60
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 61
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 attributive value
- D. Using custom options, with rings as bundle products
Answer: A
NEW QUESTION 62
The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in a grid.
You created a controller for this grid \MyCompany\MyModule\Controller\Adminhtml\CustomEntity\Index Which two actions are required to make the new page accessible at the
https://your.store.base.url/admin/my_module/custom_entity URL? (Choose two.)
- A. Register my_module route in MyCompany/MyModule/etc/adminhtml/routes.xml
- B. Specify the my_module/custom_entity URL using a @route annotation in the action controller execute() method
- C. Create a new menu item in MyCompany/MyModule/etc/adminhtml/menu.xml
- D. Register my_module route for the AdminRouter in MyCompany/MyModule/etc/adminhtml/di.xml
Answer: A,C
NEW QUESTION 63
In layout files you can change al element's order on a page. This can be done using one of the following:
* <move> instruction
* before and after element attributes?
How are two methods different?
- A. The move instruction allows altering an element's parent node
- B. They are the same, both provide access to the same functionality
- C. Elements are renamed by default when using the move instruction
- D. Before and after attributes can only be used with referenceContainer and referenceBlock
Answer: D
Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html
NEW QUESTION 64
The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in a grid.
You created a controller for this grid \MyCompany\MyModule\Controller\Adminhtml\CustomEntity\Index Which two actions are required to make the new page accessible at the https://your.store.base.url/admin/ my_module/custom_entity URL? (Choose two.)
- A. Register my_module route in MyCompany/MyModule/etc/adminhtml/routes.xml
- B. Specify the my_module/custom_entity URL using a @route annotation in the action controller execute() method
- C. Create a new menu item in MyCompany/MyModule/etc/adminhtml/menu.xml
- D. Register my_module route for the AdminRouter in MyCompany/MyModule/etc/adminhtml/di.xml
Answer: A,B
NEW QUESTION 65
You have loaded an instance of Magento\Catalog\Model\Productin the $productvariable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10,
$12, $12, $15.
What will be the result of the $product->getFinalPrice()call?
- A. [10, 12, 15]
- B. 0
- C. 1
- D. [10, 12, 12, 15]
Answer: C
NEW QUESTION 66
What scopes are available for customer attributes?
- A. Global only
- B. Website only
- C. Global and Website
- D. Global, Website and Store
Answer: A
Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/258212/which-entity-allows-scoped-attributes
NEW QUESTION 67
A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added.
How do you specify the class that will process the uploaded file?
- A. <source_model>\Magento\Config\Model\Config\Source\File</source_model>
- B. <backend_model>\Magento\Config\Model\Config\Backend\File</backend_model>
- C. <upload_model>\Magento\Config\Model\Config\Upload\File</upload_model>
- D. <frontend_model>\Magento\Config\Model\Config\Frontend\File</frontend_model>
Answer: B
NEW QUESTION 68
What is the connection between product attribute sets and categories?
- A. Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
- B. Categories have no connection to product attribute sets, and any product can be assigned to any category
- C. Each category is linked to a single product attribute set, and only products from that category's set or any of its parent categories'
- D. Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
Answer: A
Explanation:
Explanation/Reference: https://www.cloudways.com/blog/configuring-product-attribute-sets-in-magento/
NEW QUESTION 69
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. In the browser, open the admin User Roles page. Choose a role and inspect the tree of available resources
- B. Inspect the output of the CLI command bin/magento admin:role:resources - all
- C. Inspect the response of a GET request to the webapi endpoint
- D. Write a plugin for the class \Magento\Framework\Acl\LoaderInterface::populateAcl() and echo out the loaded roles
Answer: C
Explanation:
http://example.com/rest/V1/acl/resources
NEW QUESTION 70
You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the doSomething method. The aroundDoSomething plugin method is called successfully, but the original doSomething method is no longer being executed as expected.
What is causing this?
- A. The plugin implementation is skipping the execution of its callable argument
- B. The plugin implementation returned something other than its callable argument
- C. The sort order of the plugin is too high and supersedes the priority of the intercepted method
- D. The plugin implementation overlooked using the AbstractPlugin parent class
Answer: A
Explanation:
Explanation/Reference: https://github.com/magento/magento2/issues/11699
NEW QUESTION 71
......
Magento Certified Developer Fundamentals-Magento-2-Associate-Developer Exam-Practice-Dumps: https://www.ipassleader.com/Magento/Magento-2-Associate-Developer-practice-exam-dumps.html