Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a helper class magento

Tags:

php

magento

I am trying to call a helper class in magento but stuck with an error message from magento.

The helper class is located at

app/code/core/Mage/Catalog/Helper/Product/Compare.php

The class name is

class Mage_Catalog_Helper_Product_Compare extends Mage_Core_Helper_Url

I tried the below call

$helper=Mage::helper('catalog_product_compare');

Error message I got

Fatal error: Class 'Mage_Catalog_Product_Compare_Helper_Data' not found in C:\xampp\htdocs

How can i call this helper class?

like image 324
Daric Avatar asked Nov 25 '11 07:11

Daric


1 Answers

Like this:

$helper = Mage::helper('catalog/product_compare');
like image 75
Jürgen Thelen Avatar answered Sep 21 '22 00:09

Jürgen Thelen