Skip to main content
added 948 characters in body
Source Link
user1799722
  • 970
  • 3
  • 31
  • 80

i have module in my magento

community\Inic\Catalog\Helper\Product\view1: 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();
 
gevalnow$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 ??..

i have module in my magento

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();
 
gevalnow();// get value from function in view.php

how can i do it pls guide ??..

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 ??..

Source Link
user1799722
  • 970
  • 3
  • 31
  • 80

calling magento module class from external php file

i have module in my magento

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();
 
gevalnow();// get value from function in view.php

how can i do it pls guide ??..