How to setup multiple websites in Magento

In this post, we will guide you how to setup multiple websites in Magento As you know, Magento support multi-websites. That means you can manage many websites in same backend. Each website has its own settings, themes, products, customers … In this post, we will…

Magento 2 Indexer – Manage indexer using command line Magento 2

Magento 2  Indexer – Indexing is how Magento transforms data ( products, categories … ) to improve the performance of your storefront. Magento stores lots of data (including catalog data, prices, users, stores … ) in many database tables. To optimize storefront performance, Magento accumulates data…

Manage cache Magento 2 using command line

Manage cache Magento 2 using command line – In Magento 2 there are 2 ways to manage cache, going to “System -> Cache Management” in backend or using command line. You can run commands in following ways: cd <your Magento install dir>/bin and run them as…

Cache types in Magento 2

Cache types in Magento 2 – As we can see, there are 13 cache types in “System -> Cache Management”. In this post, let’s find out what they are used for and when we need to flush each type. 1. Configuration Code: config Description: Magento collects…

Magento 2 get Base URL

Magento 2 get Base URL – As you know, in Magento 1 we can easily get base url using function:

In this tutorial, let’s find out how to get base url in Magento 2 In Magento 2, we can get base url using an instance…

Magento 2 Add a menu item in backend

In this blog post we will see how to add a menu item in backend for your Magento 2 module. 1. Create file VendorName/ModuleName/etc/menu.xml The admin menu in Magento 2 has 3 parts: The main admin menu title which shows up in left sidebar Submenu…

Magento 2 – Create system configuration – system.xml

In this blog post we will see how to create System Configuration for your module in Magento 2 System configuration in Magento 2 is very similar to Magento 1 System configuration is divided into different parts; tab, section, group and field which is described in…

Magento 2 How to add link on my account navigation

How to add link on my account navigation in Magento 2 – In this tutorial, we’re going to add a new link to my account navigation in Magento 2. You only need to create a layout file: /app/code/YourVendor/YourModule/view/frontend/layout/customer_account.xml with content:

In this file “mymodule/index/index”…

Upload images in Magento programmatically

In our custom Magento modules, sometimes we need to be able to upload, save some images to our server. As we know, in Magento we can upload images for product, store logo … So we also can create a form which can be used to…