Assume that a customer’s cart only includes one downloadable product.
What effect will it cause on the quote object?
You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.
What two elements automatically render their children? (Choose two.)
You are building CLI that use the console to create a customer account with our custom command, Adding a new command to CLI is based on passing on the argument from the XML level to the class. Dependency Injection comes in handy here. you create the file app/code/Mycompany/Customer/etc/di.xml with the following content:
The module MyCompany_MyModule will add a new page to the admin interface at the URL path admin/mycompany/entity_grid.
How do you name the file containing the action controller class so the admin router matches the path to the class?
A custom module needs to log all calls of \Magento\Customer\Api\AddressRepositoryInterface::save().
Which mechanism do you use?
You are reviewing a Magento module and see a directory named Service.
What can you determine from this directory’s name?
The constructor function for \Magento\Catalog\Model\Category contains this excerpt:
With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?
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.)
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?
You are building a new module to add extra functionality to the Magento application.You want to works with CustomerData the data stored on the client side. Where initialized sections Cart and Directory-data are on the server side via the classes?
In a custom module you implement the interface \Magento\Framework\App\Config\DataInterface.
What version constraint for magento/framework do you add to your module’s composer.json file?
A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.
You decided to implement an observer for customer_save_after_data_object event.
In which file do you declare the observer?
You need to control access to a custom controller action. How do you tell Magento about this new control option?