Magento 2 Archives - Magento blog | ExtensionsMall
  • Display notification messages via notification system in Magento 2

    How to display confirmation messages, error or warning to the user is something every theme and/or Magento 2 extension developer should know about. There are four types of notification messages you can use: Error (in red), Notice (yellow), Success (green) and Warning (in grey). Getting your module to display notifications in Magento 2 is different than in Magento 1, since there are no more session class specific notification messages. If you need your module to display messages via Magento notification system,...
    February 19th, 2016 by ExtensionsMall.
  • How to get absolute path of a file in Magento 2

    While building your custom extension, you will usually need path to your extensions files. However sometimes you will need to get absolute path to Magento 2 root folder or maybe to media folder. To directly access those files through your extension you can use Magento\Framework\App\Filesystem\DirectoryList class. (more…)
    February 9th, 2016 by ExtensionsMall.