Get skin path in Magento?

后端 未结 6 1410
面向向阳花
面向向阳花 2020-12-14 06:01

I have a few custom PHP functions for my Magento store that I stored in myfunc.php and I need to require it from in a few different .phtml files. How do I do that?

I

6条回答
  •  清歌不尽
    2020-12-14 06:32

    To get that file use the below code.

    include(Mage::getBaseDir('skin').'myfunc.php');
    

    But it is not a correct way. To add your custom functions you can use the below file.

    app/code/core/Mage/core/functions.php
    

    Kindly avoid to use the PHP function under skin dir.

提交回复
热议问题