[Oct-2021] Verified Magento Exam Dumps with Magento-2-Associate-Developer Exam Study Guide
Best Quality Magento Magento-2-Associate-Developer Exam Questions Dumpexams Realistic Practice Exams [2021]
NEW QUESTION 54
How can you access the select query of a collection?
- A. The select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
- B. You can get it by using public method getSelect() which returns an instance of Magento\Framework\DB\Select
- C. You can only access the select query after the collection has been loaded by calling the public method query()
- D. It is stored in a protected variable $query and can only be accessed from the inside of a collection class
Answer: B
NEW QUESTION 55
Which entity in Magento supports scoped attributes?
- A. Category
- B. Customer Address
- C. CMS Page
- D. Customer
Answer: A
NEW QUESTION 56
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
How is this one?
- A. An event observer adds RewriteRules to .htaccess on product save
- B. Using a URL Rewrite stored in the database connecting the request path with the target path
- C. Magento\Catalog\Controller\Product\View::loadByUrlKey loads product pages using the url_key attribute value
- D. A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute
Answer: B
NEW QUESTION 57
You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to Magento 2.
Keeping in mind upgradability and the need to customize, which one do you choose?
- A. Create a new Magento instance by using the bin/magento install command
- B. Create a new Magento instance using composer create-project
- C. Run php bin/magento setup:migrate <path-to-m1-installation> <new-version> command
- D. Clone the magento/magento2 GitHub repository
Answer: C
NEW QUESTION 58
You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml.
What is the function of this file?
- A. It configures Grunt to compile assets for the theme
- B. It informs Magento that the theme is present and available for use
- C. It stores theme and image configuration values
- D. It specifies the applicable CSS files for the theme
Answer: C
NEW QUESTION 59
There are two different configurable products which both share one variation. The shared variation is
represented by the same simple product.
A customer added both configurables to the cart with the same selected variation?
How will they be displayed?
- A. As two separate line items with quantity 1 each
- B. As one line item of the second product with quantity 2
- C. As one line item which lists both configurable products with quantity 1 each
- D. As one line item of the first product with quantity 2
Answer: C
Explanation:
Explanation/Reference: https://firebearstudio.com/blog/the-complete-guide-to-magento-2-configurable-products.html
NEW QUESTION 60
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 61
Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?
- A. Dependency Injection
- B. Store Manager
- C. Extension Attribute
- D. Entity Attribute Value
Answer: D
NEW QUESTION 62
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 63
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.phtml of 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
NEW QUESTION 64
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 65
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
NEW QUESTION 66
What is a valid use case for an around plugin?
- A. The arguments of the before plugins must be modified
- B. The execution of the before and after plugins must be suppressed
- C. The execution of the pluginized method must be suppressed
- D. The arguments of the after plugins must be modified
Answer: B
NEW QUESTION 67
You are writing a customization for the customer module. You need to make sure the configuration files from your module are loaded after the customer module's configuration.
Where should the dependency be declared?
- A. etc/config.xml
- B. etc/module.xml
- C. etc/di.xml
- D. composer.json
Answer: D
Explanation:
Explanation/Reference: https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/ mod_depend.html
NEW QUESTION 68
While reviewing a layout file named sales_order_view.xml you notice the element
<update handle="customer_account"/>
What is the purpose of this element?
- A. Adds the customer_account handle to the page's handles list
- B. Updates the current page handle to customer_account
- C. Replaces the customer_account handle with sales_order_view
- D. Nothing, this element has been deprecated
Answer: B
NEW QUESTION 69
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 70
......
Authentic Best resources for Magento-2-Associate-Developer: https://www.dumpexams.com/Magento-2-Associate-Developer-real-answers.html