Home » Archive

Articles in the Magento 2 Category

Magento, Magento 2 »

[12 Feb 2016 | 4 Comments]

This article shows how we can get current category and current product data in Magento 2.
Below is a block class of my custom module (Chapagain_HelloWorld). I have injected object of \Magento\Framework\Registry class in the constructor of my module’s block class.

Magento, Magento 2 »

[4 Feb 2016 | One Comment]

In Magento 1, you could simply write your own custom log with the following code:

and it would be saved at MAGENTO_ROOT/var/log/your_log_file.log