top of page
How To Enable/Disable JS/CSS Minification/Merge In Production Mode – Magento 2
In production mode developer option are not available in Admin -> Store -> Configuration -> Advanced. We can use the below Magento...
Bilal Malik
Feb 8, 20201 min read
812 views
0 comments
Deployment modes – Magento 2
There are three deployment mode is available in Magento 2. Default Developer Production How to check which mode is enabled? We check the...
Bilal Malik
Feb 8, 20202 min read
20 views
0 comments
What is the difference between frontname and id in routes.xml
We many see routes.xml file with the same name of frontname and id. what if it is both different? <?xml version="1.0" ?> <config...
Bilal Malik
Sep 28, 20191 min read
54 views
0 comments
What are the types of components available in Magento 2
Available types of components in Magento 2 module library theme language setup Reference: vendor/magento/framework/Component/ComponentReg...
Bilal Malik
Sep 28, 20191 min read
8 views
0 comments
Useful docker commands
To see the list of images docker images To see the list of running containers docker ps To see the list of all containers (both running...
Bilal Malik
Sep 28, 20191 min read
13 views
0 comments
Magento2 install by command line
We can install Magento 2 by using below Magento command. This is my favorite way of installation because it throws an error if any and we...
Bilal Malik
Sep 28, 20191 min read
7 views
0 comments
Create git patches and apply
First, modify the file you want, then use the below command to generate the patch file git diff --ignore-space-at-eol -b -w...
Bilal Malik
Aug 22, 20191 min read
68 views
0 comments
Auto Currency Switcher Based On Country Code With Varnish
I faced the issue like “auto currency switcher is not working after installing varnish, it displayed the firstly loaded cached content to...
Bilal Malik
Aug 10, 20191 min read
154 views
0 comments
Magento 2 Multi Website with Apache2
Need to create websites, stores and stores views from Magento admin Main website: Magento already creates the main website while we...
Bilal Malik
Aug 6, 20192 min read
28 views
0 comments
Create admin user from command line Magento 2
We can use the below command to create an admin user. php bin/magento admin:user:create --admin-user=bilal --admin-password=pwd@123...
Bilal Malik
Aug 1, 20191 min read
35 views
0 comments
How to write custom logs in Magento 2
We can use the below functions to anywhere like Models, Helper, Controller..etc and call wherever you need to print logs. public function...
Bilal Malik
Jul 30, 20191 min read
34 views
0 comments
Mysql – Find the largest table in specific database
Run the below query to find the largest table in your database. Please database_name value as your database name. SELECT TABLE_NAME AS...
Bilal Malik
Jul 25, 20191 min read
12 views
0 comments
Useful docker commands
To see the list of images docker images To see the list of running containers docker ps To see the list of all containers (both running...
Bilal Malik
Jul 25, 20191 min read
9 views
0 comments
Run docker command without sudo
If you need to run docker command without sudo, then you need to add your user into docker group. Create the docker group. $ sudo...
Bilal Malik
Jul 25, 20191 min read
3 views
0 comments
How to pull specific version of docker image
It is very easy! first, we need to find the docker image and their available tags in docker hub. After that, we can pull the image with...
Bilal Malik
Jul 25, 20191 min read
291 views
0 comments
Get/Load product by sku – Magento 2
Get product by SKU using product repository protected $_productRepository; /** * Constructor * * @param \Magento\Framework\View\Element\...
Bilal Malik
Jun 30, 20191 min read
6 views
0 comments
Get/Load product by id – Magento 2
We can get product collection in different ways in Magento 2. Get product by id using product repository public function __construct(...
Bilal Malik
Jun 30, 20191 min read
1 view
0 comments
Change product image placeholder based on product – Magento 2
We need to override the below two functions in vendor/magento/module-catalog/Helper/Image.php Below function change the placeholder image...
Bilal Malik
Feb 19, 20191 min read
3 views
0 comments
Available options while creating product attribute programmatically in Magento 2
These are the available options while creating product attribute programmatically in Magento 2. All of the attributes are...
Bilal Malik
Oct 2, 20181 min read
2 views
0 comments
Available EAV types in Magento 2
These are the available EAV type in Magento 2. 1) customer 2) customer_address 3) catalog_category 4) catalog_product 5) order 6)...
Bilal Malik
Oct 2, 20181 min read
2 views
0 comments
bottom of page