Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Call Helper Function in phtml in Magento 2

  1. #1
    Junior Member
    Join Date
    Nov 2022
    Location
    CA, USA
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to Call Helper Function in phtml in Magento 2

    In Magento 2 stores, helper classes provide functionality for a variety of functions. The Helper can be invoked in controllers, models, views, and other helpers with Magento 2.


    If you want helper data in a Magento 2 .phtml file, you can use the shared code.

    Making changes to the core Magento 2 files is not advised, which is why the Magento 2 Helper class was created to replace them.

    To add unique functionalities and improve shop features, use the programmatic way to invoke helper functions in phtml in Magento 2, By visiting: https://meetanshi.com/blog/call-help...-in-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    If you have any desire to do this appropriately you ought to just bring in the format just techniques from the block that renders it.Rather you can have your aide.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •