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?
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?
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.)
A client has asked you to include category url keys in product URLs.
How is this done?
Which two ways does Magento persist category relationships in the database? (Choose two.)
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout 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?
You need to control access to a custom controller action. How do you tell Magento about this new control option?
Assume that $collection is a new instance of a class that extends
Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids.
How do you select a list of records from the database where the record ids are in the $ids list?
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
How is this one?
A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module’s frontName?
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?
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?