Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:23:34+00:00 2026-05-26T01:23:34+00:00

I am trying to control the price text from Magento Admin panel and for

  • 0

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:

<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>

to

<span class="price-label"><?php $this->newPriceText(); ?></span>

I have created newPriceText(); method in local/MyCompany/Catalog/Block/Product/Price.php, which looks like this at the moment:

class MyCompany_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Price
{
    public function newPriceText()
    {
        print_r('Testing Price Text');
    }

but I’m getting the following error:

a:5:{i:0;s:70:"Invalid method Mage_Catalog_Block_Product_Price::testPrice(Array
(
)
)";i:1;s:4859:"#0 [internal function]: Varien_Object->__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->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->fetchView('frontend\defaul...')
#4 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template->renderView()
#5 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Product\Price.php(111): Mage_Core_Block_Template->_toHtml()
#6 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Catalog_Block_Product_Price->_toHtml()
#7 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Product\Abstract.php(203): Mage_Core_Block_Abstract->toHtml()
#8 C:\wamp\www\mage_testing\app\design\frontend\base\default\template\catalog\product\list.phtml(100): Mage_Catalog_Block_Product_Abstract->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->fetchView('frontend\base\d...')
#11 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template->renderView()
#12 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#13 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(525): Mage_Core_Block_Abstract->toHtml()
#14 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(476): Mage_Core_Block_Abstract->_getChildHtml('product_list', true)
#15 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\Block\Category\View.php(85): Mage_Core_Block_Abstract->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->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->fetchView('frontend\base\d...')
#19 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template->renderView()
#20 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#21 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#22 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Text_List->_toHtml()
#23 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(525): Mage_Core_Block_Abstract->toHtml()
#24 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(476): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#25 C:\wamp\www\mage_testing\app\design\frontend\base\default\template\page\3columns.phtml(49): Mage_Core_Block_Abstract->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->fetchView('frontend\base\d...')
#28 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Template.php(280): Mage_Core_Block_Template->renderView()
#29 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Block\Abstract.php(758): Mage_Core_Block_Template->_toHtml()
#30 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Model\Layout.php(529): Mage_Core_Block_Abstract->toHtml()
#31 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Action.php(391): Mage_Core_Model_Layout->getOutput()
#32 C:\wamp\www\mage_testing\app\code\core\Mage\Catalog\controllers\CategoryController.php(159): Mage_Core_Controller_Varien_Action->renderLayout()
#33 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Action.php(420): Mage_Catalog_CategoryController->viewAction()
#34 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('view')
#35 C:\wamp\www\mage_testing\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->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->dispatch()
#37 C:\wamp\www\mage_testing\app\Mage.php(627): Mage_Core_Model_App->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";}


}

I’m not sure where I’m doing it wrong. Any idea?

I’m still waiting for the answer. Please help?

“I am not sure how to write the layout xml for this.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:23:34+00:00Added an answer on May 26, 2026 at 1:23 am

    Your trace says:

    Invalid method Mage_Catalog_Block_Product_Price::testPrice(Array())

    which is different from the method newPriceText() that you have defined in the block and are also calling in your template.

    Scan your template for testPrice() or $this->testPrice() calls.

    Maybe you originally had defined a method named testPrice, then deleted it, or changed its name to newPriceText afterwards, but forgot to remove/rename the method calls in your template accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to control the main timeline of my flash application from a MovieClip
I am trying to control admin item entry where non-super user accounts can't save
I'm trying to control some soulseek features from VB6 - the problem is the
I am trying to control the channel (left/right) and its volume from which the
Trying to make a make generic select control that I can dynamically add elements
Here's what I am trying to do: Build a custom control that essentially is
I am trying to control a console application (JTAG app from Segger) from Python
Guys, I am trying to find a nice panel like control for ASP.NET. I'd
I'm trying to control windows of a foreign OSX applications from my application. I'd
Hey all I am trying to control the horizontal scroll of a panel box

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.