How to add Category and Sub-Category In Magento 2

Add category in magento 2

Magento 2 has a rich in feature to add categories as it comes with default root category. You can create your own category and name as your wish. First and foremost you need to login magento dashboard. Navigate to products > Categories as shown in fig. 1.0   There is already a root category by…

Magento 2: Overriding Block, Model, Controller, Helper using Preference

Overriding Block, Model, Controller, Helper in Magento 2

You can create a skeleton of module from Module Generator. After creating a module structure update your module to database using command line code :

To every magento project there needs certain level of customization on overriding magento core classes. Editing and adding our custom code on magento core classes is a bad practice…

Deploy Magento 2 Static Content Specifically

static content deploy in magento 2

The static view files deployment command enables you to write static files to the Magento file system when the Magento software is set for production mode. 1. Deploy all static contents

2. Deploy static content of locale AU

3. Deploy static content of Admin

4. Deploy static content for frontend


How to render static blocks in any pages in magento 2

Render static block in magento 2

In between Magento 1.x and 2.x, rendering the Static block is quiet different. You can call either in .phtml template, CMS page or layout file in the following way. In phtml file:

In layout file:

In any CMS block:

How to reset lost admin password in Magento 2 ?

magento 2 admin password reset

If you forgot your admin password in magento 2 in localhost you cann’t retrieve by just clicking on lost password. For that you can reset through Magento CLI, then you can easily change password of your original user. Go inside magento directory and type: