title: Invalid method Mage_Catalog_Block_Product_Price::testPrice(Array(
body: <p>I am trying to control the price text from Magento Admin panel and for that I have overwritten default/template/catalog/product/price.phtml and trying to change the line:</p>
  
  <pre><code>&lt;span class="price-label"&gt;&lt;?php echo $this-&gt;__('Regular Price:') ?&gt;&lt;/span&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;span class="price-label"&gt;&lt;?php $this-&gt;newPriceText(); ?&gt;&lt;/span&gt;
  </code></pre>
  
  <p>I have created newPriceText(); method in local/MyCompany/Catalog/Block/Product/Price.php, which looks like this at the moment:</p>
  
  <pre><code>class MyCompany_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Price
  {
      public function newPriceText()
      {
          print_r('Testing Price Text');
      }
  </code></pre>
  
  <p>but I'm getting the following error:</p>
  
  <pre><code>a:5:{i:0;s:70:"Invalid method Mage_Catalog_Block_Product_Price::testPrice(Array
  (
  )
  )";i:1;s:4859:"#0 [internal function]: Varien_Object-&gt;__call('testPrice', Array)
  #1 C:\wamp\www\mage_testing\app\design\frontend\default\default\template\catalog\product\price.phtml(320): Mage_Catalog_Block_Product_Price-&gt;testPrice()
  #2 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(235): include('C:\wamp\www\mag...')
  #3 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(266): Mage_Core_Block_Template-&gt;fetchView('frontend\defaul...')
  #4 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template-&gt;renderView()
  #5 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Product\Price.php(111): Mage_Core_Block_Template-&gt;_toHtml()
  #6 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Catalog_Block_Product_Price-&gt;_toHtml()
  #7 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Product\Abstract.php(203): Mage_Core_Block_Abstract-&gt;toHtml()
  #8 C:\wamp\www\mage_testing\app\design\frontend\base\default\template\catalog\product\list.phtml(100): Mage_Catalog_Block_Product_Abstract-&gt;getPriceHtml(Object(Mage_Catalog_Model_Product), true)
  #9 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(235): include('C:\wamp\www\mag...')
  #10 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(266): Mage_Core_Block_Template-&gt;fetchView('frontend\base\d...')
  #11 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template-&gt;renderView()
  #12 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template-&gt;_toHtml()
  #13 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(525): Mage_Core_Block_Abstract-&gt;toHtml()
  #14 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(476): Mage_Core_Block_Abstract-&gt;_getChildHtml('product_list', true)
  #15 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Category\View.php(85): Mage_Core_Block_Abstract-&gt;getChildHtml('product_list')
  #16 C:\wamp\www\mage_testing\app\design\frontend\base\default\template\catalog\category\view.phtml(70): Mage_Catalog_Block_Category_View-&gt;getProductListHtml()
  #17 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(235): include('C:\wamp\www\mag...')
  #18 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(266): Mage_Core_Block_Template-&gt;fetchView('frontend\base\d...')
  #19 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template-&gt;renderView()
  #20 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template-&gt;_toHtml()
  #21 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract-&gt;toHtml()
  #22 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Text_List-&gt;_toHtml()
  #23 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(525): Mage_Core_Block_Abstract-&gt;toHtml()
  #24 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(476): Mage_Core_Block_Abstract-&gt;_getChildHtml('content', true)
  #25 C:\wamp\www\mage_testing\app\design\frontend\base\default\template\page\3columns.phtml(49): Mage_Core_Block_Abstract-&gt;getChildHtml('content')
  #26 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(235): include('C:\wamp\www\mag...')
  #27 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(266): Mage_Core_Block_Template-&gt;fetchView('frontend\base\d...')
  #28 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template-&gt;renderView()
  #29 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template-&gt;_toHtml()
  #30 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Model\Layout.php(529): Mage_Core_Block_Abstract-&gt;toHtml()
  #31 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Action.php(391): Mage_Core_Model_Layout-&gt;getOutput()
  #32 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\controllers\CategoryController.php(159): Mage_Core_Controller_Varien_Action-&gt;renderLayout()
  #33 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Action.php(420): Mage_Catalog_CategoryController-&gt;viewAction()
  #34 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(253): Mage_Core_Controller_Varien_Action-&gt;dispatch('view')
  #35 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard-&gt;match(Object(Mage_Core_Controller_Request_Http))
  #36 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Model\App.php(340): Mage_Core_Controller_Varien_Front-&gt;dispatch()
  #37 C:\wamp\www\mage_testing\app\Mage.php(627): Mage_Core_Model_App-&gt;run(Array)
  #38 C:\wamp\www\mage_testing\index.php(80): Mage::run('', 'store')
  #39 {main}";s:3:"url";s:27:"/mage_testing/products.html";s:11:"script_name";s:23:"/mage_testing/index.php";s:4:"skin";s:7:"default";}
  
  
  }
  </code></pre>
  
  <p>I'm not sure where I'm doing it wrong. Any idea?</p>
  
  <p>I'm still waiting for the answer. Please help?</p>
  
  <p>"I am not sure how to write the layout xml for this."</p>