To make a custom PHP library available in Magento, copy it into the lib directory and give it an appropriate name. For example, put the library in /lib/MyLibFolder/MyLib.php, name the file MyLib.php and structure it as follows:
|
1 2 3 |
class MyLibFolder_MyLib { // ... } |
You can then load the library using:
|
1 |
$myLib = new MyLibFolder_MyLib(); |
Adding a custom library or PHP script
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.