I am trying to get core helper in magento 2. In Magento 1, I was using -
<?php $_coreHelper = $this->helper('core');
/* @var $_coreHelper Mage_Core_Helper_Data */ ?>
Is there any way to use core helper in magento 2, like this?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou can do the following in your template:
$this->helper('Path/To/Helper/Class')->customMethod();
But it is not a good practice, see details here: Magento 2: proper use of helpers