What is a consequence of this setup?

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

January 9, 2020 No Comments READ MORE +

Keeping in mind upgradability and the need to customize, which one do you choose?

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 using composer create-projectB . Clone the magento/magento2GitHub repositoryC ....

January 9, 2020 1 Comment READ MORE +

What is the public URL for this file?

In the module located at app/code/MyCompany/MyModulethere is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/and the luma theme with the en_US locate is used. What is the public URL for this file?A . https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.jsB . https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.jsC . https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.jsD . https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.jsView AnswerAnswer: A Explanation: Reference: https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js-resources.html

January 9, 2020 No Comments READ MORE +

What is a valid use case for an aroundplugin?

What is a valid use case for an aroundplugin?A . The execution of the pluginized method must be suppressedB . The arguments of the before plugins must be modifiedC . The arguments of the after plugins must be modifiedD . The execution of the beforeand after plugins must be suppressedView...

January 8, 2020 1 Comment READ MORE +

How is this one?

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 saveB . MagentoCatalogControllerProductView::loadByUrlKey loads product pages using the url_key attribute valueC . Using a URL Rewrite stored in the database connecting the...

January 8, 2020 No Comments READ MORE +

Which three actions do you specify in a module’s Data Patch to add a customer notes attribute?

A merchant tasked you to add an input field for notes to the Customer Account Information backend page. Which three actions do you specify in a module’s Data Patch to add a customer notes attribute? (Choose three.)A . $cache->clean([‘eav’, ‘db_ddl’]);B . $customerSetup->addAttribute(‘customer’, ‘notes’, $options);C . $customerSetup->getConnection()->addColumn(‘customer_entity’, ‘notes’, $columnSpecs);D . $notesAttribute->setData(‘used_in_forms’,...

January 8, 2020 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: BD Explanation: Reference: https://magento.stackexchange.com/questions/94851/magento2-how-to-load-product-by-id

January 7, 2020 No Comments READ MORE +

What will be the effect of this declaration?

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 interfacesB . An exception because of the syntax error in the declarationC . The plugin will be ignored because ActionInterface will never be instantiated...

January 7, 2020 No Comments READ MORE +

What two files are required to make a module usable?

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 . Helper/Data.phpB . etc/config.xmlC . etc/module.xmlD . registration.phpView AnswerAnswer: CD Explanation: Reference: https://inchoo.net/magento-2/how-to-create-a-basic-module-in-magento-2/

January 7, 2020 No Comments READ MORE +

How is this accomplished?

You are developing a new theme which inherits from the Magento_Luma theme. How is this accomplished?A . Add Magento/luma to theme.xmlB . Run the CLI command bin/magento dev:theme:inherit Magento_LumaC . Specify the parent theme in Magento admin > Design > ConfigurationD . Add Magento/luma to etc/view.xmlView AnswerAnswer: A Explanation: Reference:...

January 6, 2020 No Comments READ MORE +