Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 4
After Upgrade to 1.1 Error messages
 
tronics
Member
 
Total Posts:  46
Joined:  2008-01-17
 

Fatal error: Class ‘Mage_Review_Helper_Product’ not found in /www/shop/app/code/core/Mage/Core/Model/App.php on line 779

When I searched in my old backup I found this file missing: /app/code/core/Mage/Review/Helper/Product.php

When I put it there it says:
Fatal error: Call to undefined method Mage_Catalog_Helper_Product::getPriceHtml() in /www/shop/app/design/frontend/default/default/template/catalog/product/homepage.phtml on line 39

 
Magento Community Magento Community
Magento Community
Magento Community
 
tronics
Member
 
Total Posts:  46
Joined:  2008-01-17
 

This line is for example triggering the error:
<? echo $this->helper('catalog/product')->getPriceHtml($_product) ?>

It seems like this getPriceHtml function does not exist anymore in 1.1 - yet I have this stuff in my templates..
What shall I do? It is all over the place?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oeno
Jr. Member
 
Total Posts:  10
Joined:  2008-03-02
 

Same problem here after upgrading to 1.1 with the Modern theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ekris
Jr. Member
 
Total Posts:  8
Joined:  2008-03-21
 

Same error in 1.1:
Fatal error: Call to undefined method Mage_Catalog_Helper_Product::getPriceHtml()

:(

 
Magento Community Magento Community
Magento Community
Magento Community
 
winterradio
Sr. Member
 
Total Posts:  84
Joined:  2008-02-01
 

Reporting the same problem here.  Does anyone have any idea on how to remedy this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

Are you guys all using the modern theme?
As far as I know the modern theme is not compatible with 1.1.0 yet.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pauljosephson
Member
 
Total Posts:  37
Joined:  2007-08-31
 

Doesn’t make a difference if someone is using a modern theme or not.  This is a helper function that is part of the base code of 1.0x.  If it is missing then it will possibly break a lot of other user created themes.  I don’t know why they would remove this function (most frameworks when depreciating something , [are they are depreciating this and other functions?] will allow the use the same function but print a warning or provide the functionality of the call but calling the newer system function and warn that this function will be removed in succeeding version.) If this is to be a permanent removal this may cause a headache even if modern is not supported right now.  I doubt it is going to removed.  I will have to look at their code to see what they are doing instead. I know I use this call several times in a theme we are designing for site right now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 

If you are using the modern theme, do a global search and replace for the theme folder ‘modern’ in ‘app/design/frontend’ for the following 2 functions.

Old:

$this->helper('review/product')->getSummaryHtml(

replaced with:

$this->getReviewsSummaryHtml(

Old:

$this->helper('catalog/product')->getPriceHtml(

replaced with:

$this->getPriceHtml(
 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 

Also, under “template/checkout/cart.phtml”

replace:

<?php foreach($this->getItems() as $_item): ?>
        
<tr>
            <
td>
..........
..........
.........
           </
td>
        </
tr>
    
<?php endforeach ?>

with:

<?php foreach($this->getItems() as $_item): ?>
        <?php 
echo $this->getItemHtml($_item?>
    <?php 
endforeach ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

Nice find hyteckit, this helps out alot.

But could there be more that we are missing? An official version change guide would be something to be desired.

 
Magento Community Magento Community
Magento Community
Magento Community
 
JLHC
Mentor
 
Avatar
Total Posts:  1287
Joined:  2008-05-09
Tampa, FL
 

Thanks PJ and hyteckit.
If possible, adding a guide in the wiki will be most helpful. wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
tronics
Member
 
Total Posts:  46
Joined:  2008-01-17
 

Ok, I still have this error when trying to put a product into the cart :(
Is this the code that needs to be adapted in cart.phtml? Can you post or attach the complete code of a working cart.phtml?
Thanks.

Recoverable ErrorArgument 1 passed to Mage_Catalog_Helper_Image::init() must be an instance of Mage_Catalog_Model_Productnull givencalled in /www/shop/app/design/frontend/default/default/template/checkout/cart.phtml on line 76 and defined  in /www/shop/app/code/core/Mage/Catalog/Helper/Image.php on line 58
Trace
:
#0 /www/shop/app/code/core/Mage/Catalog/Helper/Image.php(58): mageCoreErrorHandler(4096, 'Argument 1 pass...', '/www/shop...', 58, Array)
#1 /www/shop/app/design/frontend/default/default/template/checkout/cart.phtml(76): Mage_Catalog_Helper_Image->init(NULL, 'thumbnail')
#2 /www/shop/app/code/core/Mage/Core/Block/Template.php(138): include('/www/shop...')
#3 /www/shop/app/code/core/Mage/Core/Block/Template.php(170): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#4 /www/shop/app/code/core/Mage/Core/Block/Template.php(187): Mage_Core_Block_Template->renderView()
#5 /www/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Template->_toHtml()
#6 /www/shop/app/code/core/Mage/Core/Block/Text/List.php(37): Mage_Core_Block_Abstract->toHtml()
#7 /www/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Text_List->_toHtml()
#8 /www/shop/app/code/core/Mage/Core/Block/Abstract.php(445): Mage_Core_Block_Abstract->toHtml()
#9 /www/shop/app/code/core/Mage/Core/Block/Abstract.php(408): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#10 /www/shop/app/design/frontend/default/default/template/page/1column.phtml(47): Mage_Core_Block_Abstract->getChildHtml('content')
#11 /www/shop/app/code/core/Mage/Core/Block/Template.php(138): include('/www/shop...')
#12 /www/shop/app/code/core/Mage/Core/Block/Template.php(170): Mage_Core_Block_Template->fetchView('frontend/defaul...')
#13 /www/shop/app/code/core/Mage/Core/Block/Template.php(187): Mage_Core_Block_Template->renderView()
#14 /www/shop/app/code/core/Mage/Core/Block/Abstract.php(580): Mage_Core_Block_Template->_toHtml()
#15 /www/shop/app/code/core/Mage/Core/Model/Layout.php(508): Mage_Core_Block_Abstract->toHtml()
#16 /www/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(320): Mage_Core_Model_Layout->getOutput()
#17 /www/shop/app/code/core/Mage/Checkout/controllers/CartController.php(125): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /www/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(343): Mage_Checkout_CartController->indexAction()
#19 /www/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(144): Mage_Core_Controller_Varien_Action->dispatch('index')
#20 /www/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(168): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 /www/shop/app/Mage.php(420): Mage_Core_Controller_Varien_Front->dispatch()
#22 /www/shop/index.php(40): Mage::run()
#23 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 
SimpleHelix.com - 12 July 2008 11:54 PM

Nice find hyteckit, this helps out alot.

But could there be more that we are missing? An official version change guide would be something to be desired.

Yes, there are more that I haven’t listed yet.

The checkout page doesn’t work.  The cart page has been updated a little bit.

They are all easy fixes.  It took me less than 3 mins to figure out and fix the issue with getSummaryHtml() and getPriceHtml() functions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

In my case the checkout doesn’t work cause there’s a new folder “widget” in template/customer which doesn’t get included, you can see the error message while viewing rendered source in browser…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

template/checkout/onepage.phtml

change

<script type="text/javascript">
    var 
accordion = new Accordion('checkoutSteps''.head'true);
    
<?php if($this->getActiveStep()): ?>
    accordion
.openSection('opc-<?php echo $this->getActiveStep() ?>');
    
<?php endif ?>

    
var checkout = new Checkout(accordion,
        
'<?php echo $this->getUrl('checkout/onepage/progress') ?>',
        
'<?php echo $this->getUrl('checkout/onepage/review') ?>',
        
'<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
        
'<?php echo $this->getUrl('checkout/cart') ?>'
    
);
</script>

to

<script type="text/javascript">
    var 
accordion = new Accordion('checkoutSteps''.head'true);
    
<?php if($this->getActiveStep()): ?>
    accordion
.openSection('opc-<?php echo $this->getActiveStep() ?>');
    
<?php endif ?>

    
var checkout = new Checkout(accordion,{
        progress
'<?php echo $this->getUrl('checkout/onepage/progress') ?>',
        
review'<?php echo $this->getUrl('checkout/onepage/review') ?>',
        
saveMethod'<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
        
failure'<?php echo $this->getUrl('checkout/cart') ?>'}
    
);
</script>
 
Magento Community Magento Community
Magento Community
Magento Community
 
hyteckit
Sr. Member
 
Avatar
Total Posts:  166
Joined:  2008-04-01
Los Angeles, CA
 

Okay, to get the checkout page working with the modern theme.

Replace the file ‘info.phtml’ under “template/checkout/onepage/review” with the one from the default template folder.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 4