I want to show some extra data on product list page so I override the vendor\magento\module-catalog\Block\Product\ListProduct.php
.
For this I refer Add custom block on listing page : Magento2. It work.
But I need to call my helper function in my override block file.
Created new file name ListProduct.php
in app\code\Vendor\Module_Name\Block\Product
:
namespace Vendor\Module_Name\Block\Product;
class ListProduct extends \Magento\Catalog\Block\Product\ListProduct
{
// I need to call my module helper function here:
public function test()
{
}
}
How can I call my helper function inside this block file?
Thanks