Magento 2 Certified Associate Developer v1.0

Page:    1 / 7   
Exam contains 110 questions

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


Answer : B

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

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\Model\ResourceModel\Product\Collection::load()->fetchById($id)
  • C. \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)
  • D. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id)


Answer : BD

What scopes are available for customer attributes?

  • A. Global only
  • B. Website only
  • C. Global and Website
  • D. Global, Website and Store


Answer : A

Reference:
https://magento.stackexchange.com/questions/258212/which-entity-allows-scoped-attributes

What is a valid use case for an around plugin?

  • A. The execution of the pluginized method must be suppressed
  • B. The arguments of the before plugins must be modified
  • C. The arguments of the after plugins must be modified
  • D. The execution of the before and after plugins must be suppressed


Answer : D

Reference:
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html

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/Custom/Index.php
  • B. Controller/Custom.php
  • C. Controller/MyModule/Custom/Index.php
  • D. Controller/Frontend/MyModule/Custom.php


Answer : A

Reference:
https://www.simicart.com/blog/magento-create-controller/

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. action=ג€adminhtml/mycompany/mymodule/ג€
  • B. action=ג€admin/mycompany/mymodule/ג€
  • C. It is not possible without extending the adminhtml route in routes.xml
  • D. action=ג€mycompany/mymodule/ג€


Answer : D

Reference:
https://magento.stackexchange.com/questions/92236/magento-2-custom-admin-action-redirected-to-dashboard

You added a plugin declaration to MyCompany/MyModule/etc/di.xml:


What will be the effect of this declaration?

  • A. An exception because plugins must not be applied to the interfaces
  • B. An exception because of the syntax error in the declaration
  • C. The plugin will be ignored because ActionInterface will never be instantiated directly
  • D. The plugin will be applied to all implementors of the ActionInterface


Answer : B

You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.
In which file will the event observer be declared?

  • A. etc/frontend.xml
  • B. etc/events.xml
  • C. etc/config.xml
  • D. etc/frontend/events.xml


Answer : D

Reference:
https://magento.stackexchange.com/questions/128548/trigger-event-after-an-order-has-been-created-saved/128565

You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?

  • A. Using custom options, with rings as simple products
  • B. Using categories, with each ring size as a separate product
  • C. Using configurable products, with ring size as an attribute value
  • D. Using custom options, with rings as bundle products


Answer : C

You have created a module with a custom ACL resource and want to restrict access to resources of your module.
Which three items are restricted based on ACL role permissions? (Choose three.)

  • A. CLI Commands
  • B. Webapi resources
  • C. Storefront login
  • D. System configuration sections
  • E. Adminhtml controllers


Answer : CDE

Reference:
https://www.mageplaza.com/magento-2-module-development/magento-2-acl-access-control-lists.html

A merchant is interested in setting different prices for the same products in different store scopes.
What do you reply to this inquiry?

  • A. The prices can only be scoped per website or globally
  • B. The prices can be scoped per store
  • C. The price scope can be set to store but this will lead to performance degradation of category pages
  • D. The prices do not support scopes


Answer : A

Reference:
https://www.quora.com/How-can-I-set-up-different-prices-for-the-same-product-per-Magento-s-Store-View-Im-using-Magento-2-2

You are reviewing a Magento module and see a directory named Service.
What can you determine from this directoryג€™s name?

  • A. It is where the API response cache is stored
  • B. It is where API-related configuration resides
  • C. It is where the moduleג€™s service contracts are stored
  • D. You need to review the files in this folder to understand its purpose


Answer : D

Reference:
https://stackoverflow.com/questions/55337322/what-is-the-use-of-service-directory-in-magento-2

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/frontend/routes.xml
  • B. etc/frontend/config.xml
  • C. etc/config.xml
  • D. etc/routes.xml


Answer : A

Reference:
https://devdocs.magento.com/guides/v2.3/extension-dev-guide/routing.html

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 is written to the var/log/exception.log file including the identifier
  • B. The error is sent to the pre-configured error email with the identifier in the subject
  • C. A file with a name matching the identifier is written to the var/report folder
  • D. An error message is written to the database table error_log with an error_id field matching the identifier


Answer : B

You have been asked to display details from the customerג€™s latest order on the customerג€™s account dashboard (customer/account/). You create a new custom template to show the information.
How do you obtain an order repository so you can fetch an order?

  • A. Create a view model and specify an OrderRepositoryInterface argument in the _construct method
  • B. In your template, add the following: $orderRepository = ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
  • C. In your block, add a method with the following: return ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
  • D. In your template, add the following: $orderRepository = new OrderRepository();


Answer : C

Page:    1 / 7   
Exam contains 110 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary doesn't offer Real Microsoft Exam Questions.
Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.