Wednesday, 1 April 2015

Magento: Google Checkout Warning: include(Mage/Googlecheckout/Block/Adminhtml/Shipping/Merchant.php): failed to open stream: No such file or directory in app/code/local/Varien/Autoload.php on line 98

Whenever you see this error:

Warning: include(Mage/Googlecheckout/Block/Adminhtml/Shipping/Merchant.php): failed to open stream: No such file or directory  in app/code/local/Varien/Autoload.php on line 98

It only means that in app/code/core/Mage/GoogleCheckout/etc/config.xml, the block was not declared. So you just have to add this inside the global node:

        <blocks>
            <googlecheckout>
                <class>Mage_GoogleCheckout_Block</class>
            </googlecheckout>
        </blocks>

Did that solve the issue? Please leave your comment. Thanks!

P.S. If you want the other way of solving this issue (which is the more appropriate one), just let me know.


2 comments:

  1. This error means that you upgraded from 1.7 (or older) to 1.8 (or newer) where many files of Mage_GoogleCheckout were removed! If you just copied the new files during the upgrade and not replaced the whole app/code/core directory, you still have the old files. Instead of creating a workaround to hide the error, better delete the files that should not be there anymore. See: https://github.com/OpenMage/magento-mirror/tree/magento-1.9/app/code/core/Mage/GoogleCheckout

    ReplyDelete
    Replies
    1. Hey thanks for that information. I've just noticed this. Anyway, I was working for the company's e-comm website so it's not really advisable to override all the files in app/code/core as there are some core files that were edited directly. But I agree with what you stated there. Thanks for visiting my blog. Have a nice day!

      Delete