Cover

Magento 2: How to get config value

In Magento 2, configuration data is stored to core_config_data database table. The easiest way to get a configuration value from there, is using the following code snippet. It’s the most …

Magento 2: Get product by SKU or ID

There are two different ways, how to get product in Magetno 2: object manager method and dependency injection. The object manager method is easier, but according to Magento 2 documentation, …

Magento 2 Enable custom module

The following command works all the time, if the module is disabled. Otherwise something is wrong with module or it is already enabled. But If you’re reading blog article about …

How to change logo in magento 2.3

Probably, the first thing, which everyone prefers to do, with fresh Magento installation, is to change a logo in store front. This article is based on Magento 2.3. I chose …

How write to log in Magento 2?

The following code snippet is the alternative to Mage::log(‘*’) logging method in Magento 1. It’s a good way to log the errors while you are debugging or in the other …