What is this folder's purpose?

As you are scanning folder in the vendor/module-catalog directory, you see a directory that is named Ui. What is this folder's purpose?A . It contains UI component data providers and component information.B . It contains templates, CSS and JS pertinent to the module.C . It contains the block PHP files...

March 2, 2022 No Comments READ MORE +

Which mechanism do you use?

A custom module needs to log all calls of MagentoCustomerApiAddressRepositoryInterface::save(). Which mechanism do you use?A . An observer on the customer_address_repository_save event, which is automatically fired for every repository saveB . A proxy configured to intercept all calls to any public method and log themC . An extension attribute configured...

March 1, 2022 No Comments READ MORE +

Which two methods will load the product model by ID as specified in the URL?

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 . MagentoCatalogModelResourceModelProduct::load($productModel, $id)B . MagentoCatalogModelResourceModelProductCollection::load()->fetchById($id)C . MagentoCatalogModelResourceModelProductCollection::fetchItemById($id)D . MagentoCatalogApiProductRepositoryInterface::getById($id)View AnswerAnswer: B,D

March 1, 2022 No Comments READ MORE +

How do you visually check if Magento evaluates your ACL resource as expected?

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...

February 28, 2022 No Comments READ MORE +

What can you determine from this directory’s name?

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 storedB . It is where API-related configuration residesC . It is where the module’s service contracts are storedD . You need...

February 28, 2022 No Comments READ MORE +

What will be the return type of the execute method?

Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?A . You should implement a new API endpoint instead of returning JSON from a controllerB . The string value of Zend_Json::encode()C . An instance of MagentoFrameworkControllerResultJsonD ....

February 28, 2022 No Comments READ MORE +

What risk does this pose, and how can it be mitigated?

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...

February 28, 2022 No Comments READ MORE +

✑ before and after element attributes?

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 . They are the same, both provide access to the same functionalityB . Elements are...

February 28, 2022 No Comments READ MORE +

How do you implement this, keeping simplicity in mind?

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 . Create a custom block which will...

February 28, 2022 No Comments READ MORE +

How can you access the select query of a collection?

How can you access the select query of a collection?A . You can only access the select query after the collection has been loaded by calling the public method query()B . It is stored in a protected variable $query and can only be accessed from the inside of a collection...

February 28, 2022 No Comments READ MORE +