Extension’s custom initialization on Magento start
To load custom mini-libraries with short popular global functions in Magento 2, run the following code: Continue Reading
To load custom mini-libraries with short popular global functions in Magento 2, run the following code: Continue Reading
If you get the «There are no commands defined» failure while trying to execute a console command in Magento 2, you can easily fix it. The reason of this problem is probably an absence of an extension’s etc/module.xml file or an error in the same file. Continue Reading
To create an extension’s dropdown config option in Magento 2 check the core example: «Catalog» → «Storefront» → «List Mode». Continue Reading
In Magento 2 menu configurations are located inside menu.xml, so to create custom system configuration and controller you should: Continue Reading
In order to fix this Magento 2 problem, you as a web server user need write access to:
To get current store DateTime in Magento 2, inject an instance of \Magento\Framework\Stdlib\DateTime\DateTime in your class constructor. Continue Reading
Use the following code to include a phtml file via the type=“core/template” block in Magento 2: Continue Reading
The registration.php file is a kind of the entry point of every Magento 2 module. Being the equivalent of app/etc/modules/[Namespace]_[Module].xml introduced in Magento 1, registration.php plays similar functions, but it is a part of the module itself. Continue Reading
To load a JavaScript file of a custom module in Magento 2, you have to include an extension’s base javascript file via layout instructions. Continue Reading
To overwrite a template via module in Magento 2, have to add a layout folder to your module file [Vendor]/[ModuleName]/view/adminhtml/layout/catalog_product_options.xml Continue Reading