You are working on a Magento store which will be selling in two countries. Each country has its own set of payment methods.
How do you organize the project to support this requirement?
You are implementing a custom module MyModule, which provides an implementation of \Psr\Log\LoggerInterface called \MyCompany\MyModule\Logger.
The LoggerInterface has the default preference declared in app/etc/di.xml.
Keeping upgradability in mind, how do you make \MyCompany\MyModule\Logger the default implementation of the LoggerInterface globally?
You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database.
What do you inject into a constructor to represent each product you create?
A Magento industry partner shipping provider has tasked you to build their integration module called MyCompany_ShippingProvider.
Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?
A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.
Which two actions do you take to make sure the newsletter is sent? (Choose two.)
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.)
What are two functions of a resource model? (Choose two.)
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?
How can you render a text on a page using only layout xml?
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?
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?
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?
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?
Assume that a customer’s cart only includes one downloadable product.
What effect will it cause on the quote object?
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.)