Magento Magento-2-Associate-Developer Dumps Updated [Nov-2021] Get 100% Real Exam Questions! [Q31-Q50]

Share

[Nov-2021] Pass Magento Magento-2-Associate-Developer Exam in First Attempt Guaranteed!

Full Magento-2-Associate-Developer Practice Test and 105 unique questions with explanations waiting just for you, get it now!

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

  • A.
  • B.
  • C.
  • D.

Answer: C

 

NEW QUESTION 32
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. Option
    https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
  • B. Option
    https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
  • C. Option
    https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
  • D. Option
    https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js

Answer: C

 

NEW QUESTION 33
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 34
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

Explanation:
Explanation
https://magento.stackexchange.com/questions/173286/magento2-how-to-create-admin-page-with-configuration-f

 

NEW QUESTION 35
You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different depending on the selected language.
Keeping simplicity in mind, how do you add this attribute?

  • A. Add a new column to the catalog_product_entitytable using declarative schema
  • B. Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported languages
  • C. Use the admin panel to create a new extension attribute
  • D. Use a Data Patch to create a new EAV attribute

Answer: C

Explanation:
Explanation/Reference:

 

NEW QUESTION 36
You are building a report using complex SQL aggregations to locate the required data.
In what type of class do you put these SQL statements?

  • A. Resource model
  • B. Model
  • C. Helper
  • D. Repository

Answer: B

 

NEW QUESTION 37
You have created a module controller that responds to the following URL: /mycompany/product/load/id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)

  • A. \Magento\Catalog\Model\ResourceModel\Product::load($productModel, $id)
  • B. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id)
  • C. \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)
  • D. \Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id)

Answer: B,D

 

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

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C

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: C

 

NEW QUESTION 40
How do you persist an entity to the database?

  • A. Calling the store() method on the entity's model
  • B. Calling the persist() method on the entity's repository
  • C. Calling the save() method on the entity's repository
  • D. Calling the update() method on the entity's collection

Answer: C

 

NEW QUESTION 41
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 field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a $scopeType argument of 'store'.
  • C. The input field will only be visible if a website's default store scope is selected in the system configuration
  • D. The input field will not be visible if a store view scope is selected in the system configuration

Answer: D

 

NEW QUESTION 42
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

Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-instructions.html

 

NEW QUESTION 43
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

 

NEW QUESTION 44
How many shipping addresses may be selected for an order during the checkout process?

  • A. One shipping address per line item is possible
  • B. One shipping addresses per unit of quantity is possible
  • C. Only one shipping address per order is possible
  • D. One shipping address per product type is possible

Answer: C

 

NEW QUESTION 45
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 if the class method specified by the resource returns a true value
  • B. The menu item will only be visible to users who are assigned to a role with access to the matching ACL resource
  • C. The resource is used to locate the correct translation for the attributes listed in title="..."
  • D. 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

Answer: B

 

NEW QUESTION 46
You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.
What two elements automatically render their children? (Choose two.)

  • A. <block class="\Magento\Framework\View\Element\Template" name="shop.info.details"/>
  • B. <block class="\Magento\Framework\View\Element\AbstractBlock" name="shop.info.details"/>
  • C. <container name="shop.info.details"/>
  • D. <block class="\Magento\Framework\View\Element\Text\ListText" name="shop.info.details"/>

Answer: A,C

 

NEW QUESTION 47
Which two tasks are supported by Magento CLI? (Choose two.)

  • A. Customer password reset
  • B. Clearing cache
  • C. Administrator account creation
  • D. Codebase deployment from developer machine to staging server

Answer: B,D

 

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
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 50
......

Get Latest Magento-2-Associate-Developer Dumps Exam Questions in here: https://www.trainingdumps.com/Magento-2-Associate-Developer_exam-valid-dumps.html