Sign up ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

i have module in my magento

1: config.xml code of config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <global>
        <helpers>
            <catalog>
                <rewrite>
                    <product_view>Inic_Catalog_Helper_Product_View</product_view>
                </rewrite>
            </catalog>
        </helpers>
        <blocks>
            <catalog>
                <rewrite>
                    <product_view_attributes>Inic_Catalog_Block_Product_View_Attributes</product_view_attributes>
                </rewrite>
            </catalog>
        </blocks>
    </global>
</config>

2:view.php community\Inic\Catalog\Helper\Product\view.php

code of view.php

class Inic_Catalog_Helper_Product_View extends Mage_Catalog_Helper_Product_View
{
    public function gevalnow($param)
    {
      return $param
    }
}

now i have written custom code in my root folder say test.php

<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

$helper = Mage::helper('inic_catalog/product_view')->gevalnow('Standard');
print_r($helper);// get value from function in view.php

i get below error:

Fatal error: Class 'Mage_Inic_Catalog_Helper_Product_View' not found in /home/keviainc/public_html/app/Mage.php on line 546

how can i do it pls guide ??..

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You have to see what is the tag for the helper in app/code/community/Inic/Catalog/etc/config.xml. Search for <helpers>. Most probably it is:

    <helpers>
        <inic_catalog>
            <class>Inic_Catalog_Helper</class>
        </inic_catalog>
    </helpers>

then you have to use:

Mage::helper('inic_catalog/product_view')->gevalnow();

You have to replace inic_catalog with the string from the config.xml (below <helpers> tag).

share|improve this answer
    
not working check my updated code – mydeve Nov 23 '14 at 20:33
    
Please paste the config.xml. – michael Nov 23 '14 at 20:40
    
paste config.xml see point 1: config.xml code of config.xml: – mydeve Nov 23 '14 at 20:41
    
Please try with Mage::helper('catalog/product_view')->gevalnow(); – michael Nov 23 '14 at 20:45
    
thanks ........... – mydeve Nov 23 '14 at 20:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.