[Nov-2021] Get 100% Real Magento-2-Certified-Associate-Developer Exam Questions, Accurate & Verified Prep4sureExam Dumps in the Real Exam! [Q11-Q36]

Share

[Nov-2021] Get 100% Real Magento-2-Certified-Associate-Developer Exam Questions, Accurate & Verified Prep4sureExam Dumps in the Real Exam!

Pass Your Magento Certified Developer Exams Fast. All Top Magento-2-Certified-Associate-Developer Exam Questions Are Covered.

NEW QUESTION 11
What is the relationship between products and categories in Magento?

  • A. Products may be assigned to zero or more categories
  • B. Each product belongs to zero or one category
  • C. Each product always belongs to one category
  • D. Product to category relation is dynamically defined by Catalog Product Rules

Answer: A

Explanation:
Explanation/Reference:

 

NEW QUESTION 12
You are working on a project that contains a million SKUs. The merchant has requested the product view page
to have a custom color schema and page layout depending on the product price range.
How do you implement this, keeping simplicity in mind?

  • A. Specify custom layout update XML in the admin panel for every product
  • B. Create a custom block which will dynamically choose the appropriate template
  • C. Write a Data Patch which will set the appropriate layout update XML for every product record
  • D. Enable the dynamic product page UI component and configure it to use a different layout per price range

Answer: D

 

NEW QUESTION 13
You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.
How do you do that?

  • A. Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade
  • B. Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
  • C. Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
  • D. Run a command: bin/magento setup:db-schema:upgrade <table> <column definition>

Answer: C

 

NEW QUESTION 14
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 15
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 16
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 17
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 18
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 19
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 20
Which method of a Magento resource model will remove a record from the database?

  • A. clean
  • B. delete
  • C. remove
  • D. erase

Answer: B

Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/123840/how-to-use-resource-model-delete?rq=1

 

NEW QUESTION 21
What is the connection between product attribute sets and categories?

  • A. Categories have no connection to product attribute sets, and any product can be assigned to any category
  • B. Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the 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

 

NEW QUESTION 22
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: A

 

NEW QUESTION 23
What will be the result of calling the save() method on a collection instance?

  • A. It will save the select query to the cache
  • B. It will loop over all items and call save () on each one
  • C. It will save the select query execution result into the cache
  • D. It will save all items with one INSERT ... ON DUPLICATE KEY UPDATE query

Answer: B

 

NEW QUESTION 24
You have configured an event observer to watch the checkout_submit_all_after event using this XML:

What is the required class definition for the event observer?

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

Answer: B

 

NEW QUESTION 25
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 26
How does Magento store customer address attribute values?

  • A. Customer address is an attribute of the customer, so it doesn't have its own attributes
  • B. Customer address is an EAV entity, so all values are stored in the customer_address_entity table and related values tables
  • C. Customer address is a flat entity, so all values are stored in the customer_address_entity table
  • D. Customer address is not an entity, so its properties are customer attributes

Answer: B

 

NEW QUESTION 27
You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
You see the existing site map menu item is declared by the node:

What two actions do you take to configure the new menu entry location? (Choose two.)

  • A. Specify sortOrder="100"
  • B. Specify parent="Magento_Backend::marketing_seo"
  • C. Specify item XML in the file etc/adminhtml/menu/marketing/seo/menu.xml
  • D. Specify parent="Magento_Sitemap::catalog_sitemap"

Answer: A,C

 

NEW QUESTION 28
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 admin panel to create a new extension attribute
  • C. Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported
    languages
  • D. Use a Data Patch to create a new EAV attribute

Answer: B

 

NEW QUESTION 29
In a code review of a merchant's site you have discovered that there are multiple observers for the
checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the
others being executed before it is called.
What risk does this pose, and how can it be mitigated?

  • A. Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be
    re-worked using plugins
  • B. Magento only supports one observer per event. These observers will need to be combined into a single
    point of customization.
  • C. Event observers are fired in alphabetical order of the observer name. There is no risk here.
  • D. There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be
    changed.

Answer: C

Explanation:
Explanation/Reference: https://magento.stackexchange.com/questions/373/magento-observer-events-order-of-operations

 

NEW QUESTION 30
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 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 are adding a new menu item to the admin backend which will link to a custom backend page.
The declaration of the route:

What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?

  • A. It is not possible without extending the adminhtml route in routes.xml
  • B. action="adminhtml/mycompany/mymodule/"
  • C. action="mycompany/mymodule/"
  • D. action="admin/mycompany/mymodule/"

Answer: C

 

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

Penetration testers simulate Magento-2-Certified-Associate-Developer exam: https://www.prep4sureexam.com/Magento-2-Certified-Associate-Developer-dumps-torrent.html