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 class C . You can get it by using public method getSelect() which returns an instance of MagentoFrameworkDBSelect D . The select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
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 HTML B . By calling $block->getChildHtml(‘mynewblock’) in the parent block’s template C . The layout is invalid since block elements cannot be nested D . Automatically if the block class Custom implements the _toHtml method
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 the AdminRouter in MyCompany/MyModule/etc/adminhtml/di.xml B . Create a new menu item in MyCompany/MyModule/etc/adminhtml/menu.xml C . Specify the my_module/custom_entity URL using a @route annotation in the action controller execute() method D . Register my_module route in MyCompany/MyModule/etc/adminhtml/routes.xml
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:upgrade B . Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade C . Run a command: bin/magento setup:db-schema:upgrade <table> <column definition> D . Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade
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 file B . Configure plugin sequencing for both plugins in MyCompany_Magic’s etc/plugin_sequence.xml file C . Set a sortOrder=”10” for MyCompany_Admission’s plugin in MyCompany_Magic’s etc/di.xml D . Add MyCompany_Admission as a dependency in MyCompany_Magic’s etc/module.xml file
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 mitigated? A . There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed. B . Event observers are fired in alphabetical order of the observer name. There is no risk here. C . Magento only supports one observer per event. These observers will need to be combined into a single point of customization. D . Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins
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.php B . Controller/Custom.php C . Controller/MyModule/Custom/Index.php D . Controller/Frontend/MyModule/Custom.php
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’, [‘adminhtml_customer’]); E . $customerSetup->addAttributeToSet(‘customer’, $attributeSetIdCustomer, $groupId, ‘notes’);
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_view B . This is not possible because products can belong to multiple categories C . Set the configuration value of catalog/seo/product_use_categories to Yes D . Create an after plugin on MagentoUrlRewriteControllerRouter::generateRewrite