cancel
Showing results for 
Search instead for 
Did you mean: 

front-end product view won't show

front-end product view won't show

Í'm trying to get a magento 1.9 install working after someone else broke it.

All looks to be working except for the product view in the front-end.

Here's the error:

a:5:{i:0;s:97:"Invalid method Mage_Catalog_Block_Product_View_Type_Simple::displayProductStockStatus(Array
(
)
)";i:1;s:5380:"#0 /home/webzite/domains/webzite.nl/public_html/app/design/frontend/rwd/default/template/catalog/product/view/type/availability/default.phtml(27): Varien_Object->__call('displayProductS...', Array)
#1 /home/webzite/domains/webzite.nl/public_html/app/design/frontend/rwd/default/template/catalog/product/view/type/availability/default.phtml(27): Mage_Catalog_Block_Product_View_Type_Simple->displayProductStockStatus()
#2 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/teknosuck...')
#3 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/rwd/de...')
#4 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#6 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
#7 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('product_type_av...', true)
#8 /home/webzite/domains/webzite.nl/public_html/app/design/frontend/rwd/default/template/catalog/product/view.phtml(69): Mage_Core_Block_Abstract->getChildHtml('product_type_av...')
#9 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/teknosuck...')
#10 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/rwd/de...')
#11 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#12 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#13 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#14 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Text_List->_toHtml()
#15 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml()
#16 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#17 /home/webzite/domains/webzite.nl/public_html/app/design/frontend/rwd/default/template/page/2columns-right.phtml(55): Mage_Core_Block_Abstract->getChildHtml('content')
#18 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/teknosuck...')
#19 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/rwd/de...')
#20 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#21 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml()
#22 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#23 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#24 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#25 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#26 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#27 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->noRouteAction()
#28 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#29 /home/webzite/domains/webzite.nl/public_html/app/code/community/BalkeTechnologies/StoreMaintenance/Controller/Router/Standard.php(91): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#30 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): BalkeTechnologies_StoreMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#31 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#32 /home/webzite/domains/webzite.nl/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#33 /home/webzite/domains/webzite.nl/public_html/index.php(83): Mage::run('', 'store')
#34 {main}";s:3:"url";s:41:"/records-151/webzite-100-deejay.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"nl";}

I'm using the rwd/default theme 

Can anyone give me a hint on how to fix it?

7 REPLIES

Re: front-end product view won't show

Hi @spot_d,

 

According with your error maybe you can check the file:

 

/home/webzite/domains/webzite.nl/public_html/app/design/frontend/rwd/default/template/catalog/product/view/type/availability/default.phtml

 

On line 27 there's a call to method displayProductStockStatus(). That method is not available on class Mage_Catalog_Block_Product_View_Type_Simple. Maybe that is a customiztion on your store.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: front-end product view won't show

Thank you for replying.

This file should have been untouched. Here is the code which seem to be standard in 1.9.3. 

<?php $_product = $this->getProduct(); ?>
<?php if ($this->displayProductStockStatus()): ?>
    <?php if ($_product->isAvailable()): ?>
        <p class="availability in-stock">
            <span class="label"><?php echo $this->helper('catalog')->__('Availability:') ?></span>
            <span class="value"><?php echo $this->helper('catalog')->__('In stock') ?></span>
        </p>
    <?php else: ?>
        <p class="availability out-of-stock">
            <span class="label"><?php echo $this->helper('catalog')->__('Availability:') ?></span>
            <span class="value"><?php echo $this->helper('catalog')->__('Out of stock') ?></span>
        </p>
    <?php endif; ?>
<?php endif; ?>

I see the function in \app\code\core\Mage\Catalog\Block\Product\Abstract.php 

\app\code\core\Mage\Catalog\Block\Product\View\Type\Simple.php extends that one so it should work. I'm lost. Any other ideas?

Re: front-end product view won't show

You're right. I've missed on the parent class.

Did you tried changing the theme to RWD?

 

Is it possible that your custom theme has some layout change that points to another block?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: front-end product view won't show

I'm not running a custom theme, switching to a default was my first step. I have disabled a bunch of plugins that would interact with that class, but no luck so far.

Re: front-end product view won't show

It looks a little bit strange this line:

 

#2 /home/webzite/domains/webzite.nl/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/teknosuck...')

 

Has your code some path that contains the string "teknosuck" harcoded?

 

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: front-end product view won't show

that was actually a find and replace gone wrong in that error file Smiley Wink tried to hide the site it came from but I guess i failed misserably. Not related to the error. 

Re: front-end product view won't show

I'm sorry. I'm out of ideas.

I need to check the code to think in another approach.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"