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

June 23, 2022 1 Comment READ MORE +

How will this block be rendered?

You are adding a child node to the product.info block using the XML: How will this block be rendered?A . Child block nodes are automatically rendered as HTMLB . By calling $block->getChildHtml(‘mynewblock’) in the parent block’s templateC . The layout is invalid since block elements cannot be nestedD . Automatically...

June 23, 2022 No Comments READ MORE +

https://your.store.base.url/admin/my_module/custom_entity URL?

The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in a grid. You created a controller for this grid MyCompanyMyModuleControllerAdminhtmlCustomEntityIndex Which two actions are required to make the new page accessible at the https://your.store.base.url/admin/my_module/custom_entity URL? (Choose two.)A . Register my_module route for...

June 23, 2022 No Comments READ MORE +

How do you do that?

You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema. How do you do that?A . Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgradeB . Create a etc/db.xml file in your module,...

June 21, 2022 No Comments READ MORE +

Which two actions are required to ensure the new plugin will execute last?

You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml Which two actions are required to ensure the new plugin will execute last? (Choose two.)A . Include a sortOrder=”20” on the new plugin in MyCompany_Magic’s etc/di.xml...

June 21, 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...

June 20, 2022 No Comments READ MORE +

What file contains the controller class for the frontend path /mymodule/custom?

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.phpB . Controller/Custom.phpC . Controller/MyModule/Custom/Index.phpD . Controller/Frontend/MyModule/Custom.phpView AnswerAnswer: A

June 20, 2022 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’,...

June 19, 2022 No Comments READ MORE +

How is this done?

A client has asked you to include category url keys in product URLs. How is this done?A . Create an observer for controller_action_postdispatch_catalog_product_viewB . This is not possible because products can belong to multiple categoriesC . Set the configuration value of catalog/seo/product_use_categories to YesD . Create an after plugin on...

June 19, 2022 No Comments READ MORE +

In which file do you declare the observer?

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?A . etc/webapi_rest/events.xmlB . etc/adminhtml/events.xmlC . etc/webapi/rest_events.xmlD . etc/events.xmlView AnswerAnswer:...

June 19, 2022 No Comments READ MORE +