cannot call helper method

Permalink 1 user found helpful
hi there,

I am trying to create a block from which I am trying to access a helper class to return me some information from a method but I seem to be getting an error on the webpage.

This is what I have in my view.php of my block:
<?php 
   $fh = Loader::helper('online_shop_get_products');
   $categories = $fh->getAllCategories();
?>


My file (online_shop_get_products.php) is placed in my local /helpers/ folder.

This is the error I get on the webpage:
Fatal error: Class 'OnlineShopGetProductsHelper' not found in /Users/sahirmemon/Sites/c410/trunk/Project/concrete/concrete/libraries/loader.php on line 252

Does anyone know what the problem here is?

Thanks!!!

Sahir

 
Mnkras replied on at Permalink Reply
Mnkras
the class for the helper isn't right, it should be exactly how the error says it should be.
sahir replied on at Permalink Reply
You're right. I just took a peek at the built-in concrete helpers and noticed that I did not declare it as a class.


I got it working now.

Thanks!