[Q39-Q56] Get 100% Passing Success With True Magento-2-Associate-Developer Exam! [Sep-2021]

Share

Get 100% Passing Success With True Magento-2-Associate-Developer Exam! [Sep-2021] 

Magento Magento-2-Associate-Developer PDF Questions - Exceptional Practice To Magento 2 Certified Associate Developer Exam

NEW QUESTION 39
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 40
How do you add a foreign key to an existing table created by another module?

  • A. Create etc/db_schema.xml file with the table node and constraint child node
  • B. Create the etc/db_constraints.xml file and specify foreign key there in the constraint node
  • C. Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration>
  • D. This can only be done with raw SQL in a Schema Patch file

Answer: C

 

NEW QUESTION 41
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 an event observer for the user_save_after observer
  • B. Create a before plugin for \Magento\Customer\Api\AccountManagementInterface's authenticate method
  • C. Create a mutation of a CustomerInterface object to intercept the username and password
  • D. Override \Magento\Customer\Controller\AccountController.php

Answer: B

 

NEW QUESTION 42
You have created a new section in system configuration under the Catalog tab:

How do you restrict an access to the section using Magento ACL?

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

Answer: B

 

NEW QUESTION 43
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, Magento's code generator creates a shell concrete class based on
    \Magento\Store\Model\StoreManagerInterface
  • B. Magento throws an exception because you cannot instantiate an interface
  • 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 finds all classes that implement \Magento\Store\Model\StoreManagerInterface (ordered
    alphabetically) and injects the first class.

Answer: A

 

NEW QUESTION 44
You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml Which two actions are required to ensure the new plugin will execute last? (Choose two.)

  • A. Configure plugin sequencing for both plugins in MyCompany_Magic's etc/plugin_sequence.xml file
  • B. Include a sortOrder="20" on the new plugin in MyCompany_Magic's etc/di.xml file
  • C. Add MyCompany_Admission as a dependency in MyCompany_Magic's etc/module.xml file
  • D. Set a sortOrder="10" for MyCompany_Admission's plugin in MyCompany_Magic's etc/di.xml

Answer: C,D

 

NEW QUESTION 45
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/Reference: https://docs.magento.com/m2/ce/user_guide/sales/order-processing.html

 

NEW QUESTION 46
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 47
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. 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 48
You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with:

What does this accomplish?

  • A. All store front pages are no longer cacheable
  • B. FPC will cache the block content for all cacheable pages
  • C. FPC will be bypassed for this block and all other page content will be cached
  • D. The block will be loaded on the store front using AJAX

Answer: A

 

NEW QUESTION 49
How do you obtain customer information in a JavaScript module?

  • A. Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem
    ('customer')
  • B. By using customerData.get('customer') call, where customerData is an instance of Magento_Customer/js/
    customer-data
  • C. Magento does not expose customer information in JavaScript for security reasons
  • D. By sending an AJAX request to the url: /customer/account/info/?json=1

Answer: B

Explanation:
Explanation/Reference: https://belvg.com/blog/customer-data-management-in-magento-2.html

 

NEW QUESTION 50
Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom.
What file contains the controller class for the frontend path /mymodule/custom?

  • A. Controller/MyModule/Custom/Index.php
  • B. Controller/Custom.php
  • C. Controller/Custom/Index.php
  • D. Controller/Frontend/MyModule/Custom.php

Answer: C

 

NEW QUESTION 51
Where do you change the frontName for the admin router?

  • A. app/etc/local.xml
  • B. app/etc/env.php
  • C. app/etc/config.xml
  • D. composer.json

Answer: B

 

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

Explanation:
Explanation/Reference: https://www.magestore.com/magento-2-tutorial/3464-2/

 

NEW QUESTION 53
A custom module must make changes to the schema following each setup:upgraderun. This must be done
after all other module's schema updates have been applied.
How is this accomplished?

  • A. Update the module's setup_priorityin etc/modules.xml
  • B. Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData
  • C. Create a Recurringclass which implements InstallSchemaInterface
  • D. Create an UpgradeSchemaAfterclass which implements InstallSchemaInterface

Answer: C

Explanation:
Explanation/Reference: https://www.pierrefay.com/magento2-training/install-upgrade-setup.html

 

NEW QUESTION 54
You got a notification about error that occurred on a production environment. The merchant gave you the error
identifier.
How do you find the error message based on the identifier?

  • A. An error message is written to the database table error_log with an error_idfield matching the
    identifier
  • B. A file with a name matching the identifier is written to the var/reportfolder
  • C. An error is written to the var/log/exception.logfile including the identifier
  • D. The error is sent to the pre-configured error email with the identifier in the subject

Answer: D

 

NEW QUESTION 55
A merchant tasks you to keep sales managers out of the system configuration backend pages.
How do you do that using the admin interface?

  • A. You create a role with limited permissions and assign all sales manager users to the new role
  • B. You remove access to the restricted pages from each user's ACL settings
  • C. You create a role with access to the system configuration pages and assign it to all users except the sales managers
  • D. This is not possible in a native Magento instance and requires customization

Answer: A

 

NEW QUESTION 56
......

Magento-2-Associate-Developer dumps - Pass4cram - 100% Passing Guarantee: https://www.pass4cram.com/Magento-2-Associate-Developer_free-download.html