Category: Magento

How to create a theme in Magento 2

You need to create the theme.xml file under app/design/frontend/Cloudways/m2-theme/theme.xml and use the code below: <theme xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Config/etc/theme.xsd”> <title>m2-theme</title> <parent>Magento/Luma</parent> <media> <preview_image>media/m2-theme-image.jpg</preview_image> </media> </theme> In <title> tag insert the name of your theme, and in the <parent> tag you can specify…

How to overwrite Magento 2 core files

Create New Module to override Magento 2 Core files. For module you have to create below files. app/code/Namespace/Module/registration.php app/code/Namespace/Module/etc/module.xml Controller Override app/code/Namespace/Module/registration.php app/code/Namespace/Module/etc/module.xml Controller Override app/code/Namespace/Module/etc/di.xml sanu

How Magento 2 Pub folder work

How Magento 2 Pub folder work

The Magento app is served from /var/www/html/magento2/pub. The rest of the Magento file system is vulnerable because it is accessible from a browser. Setting the webroot to the pub/ directory prevents site visitors from accessing the Web…

Back to top