100% Pass Top-selling Magento-2-Associate-Developer Exams - New 2021 Magento Pratice Exam [Q28-Q44]

Share

100% Pass Top-selling Magento-2-Associate-Developer Exams - New 2021 Magento  Pratice Exam

Magento Certified Developer Dumps Magento-2-Associate-Developer Exam for Full Questions - Exam Study Guide

NEW QUESTION 28
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 29
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 30
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 31
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 32
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 33
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 34
You are working on a new entity called vendor. You implemented the model, resource model and collection.
You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others.
How do you do that?

  • A. Create an entry in etc/di.xml and add the argument eventPrefix with the value of vendor
  • B. Ensure that the primary key in the corresponding table is named vendor_id
  • C. You must implement all appropriate methods and fire the events manually
  • D. Declare the $_eventPrefix property in your vendor model and set it to vendor

Answer: D

 

NEW QUESTION 35
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 36
You have to install a new module on the production environment. All the module is adding a new product attribute. You enabled maintenance mode, copied the module code, run bin/magento setup:upgrade and disabled maintenance mode.
What two risks does this process pose? (Choose two.)

  • A. It will clean static assets from the pub/static folder
  • B. It will void all active sessions
  • C. The new attribute will be invisible on the storefront until the cache is cleaned manually
  • D. It will clean all caches which will cause a performance degradation

Answer: B,C

 

NEW QUESTION 37
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 38
You are developing a new theme which inherits from the Magento_Luma theme.
How is this accomplished?

  • A. Add Magento/luma to etc/view.xml
  • B. Add Magento/luma to theme.xml
  • C. Run the CLI command bin/magento dev:theme:inherit Magento_Luma
  • D. Specify the parent theme in Magento admin > Design > Configuration

Answer: B

Explanation:
Explanation/Reference: https://www.mageants.com/blog/how-to-create-custom-theme-in-magento-2.html

 

NEW QUESTION 39
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
What is the correct layout declaration for this?

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

Answer: B

 

NEW QUESTION 40
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_entity table 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

 

NEW QUESTION 41
What is the difference between online and offline shipping methods?

  • A. Online means that it will be sent to the customer using a shipping carrier, offline means the customer will pick up the order in person
  • B. Online means Magento will use a shipping carrier's API to obtain rates, offline means Magento will calculate the rates internally
  • C. Online means that a shipment will have a tracking number, and offline means no tracking numbers are available
  • D. Online means that an item's shipping will be processed by the merchant, offline means that it will be processed by the customer

Answer: D

Explanation:
Explanation/Reference: https://amasty.com/blog/shipping-magento-2-guide/

 

NEW QUESTION 42
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 43
\Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and sort information.
What class assists in creating an instance for SearchCriteriaInterface?

  • A. \Magento\Sales\Model\Order\SearchCriteria
  • B. \Magento\Framework\Api\SearchCriteriaBuilder
  • C. \Magento\Backend\Api\SearchCriteriaGenerator
  • D. \Magento\Framework\Api\SearchCriteriaFactory

Answer: B

Explanation:
Explanation/Reference: https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Api/ SearchCriteriaInterface.php

 

NEW QUESTION 44
......

Authentic Best resources for Magento-2-Associate-Developer Online Practice Exam: https://www.vce4plus.com/Magento/Magento-2-Associate-Developer-valid-vce-dumps.html