2

I'm having trouble overriding this block for a customization on admin orders: Mage_GoogleTrustedStore_Block_Adminhtml_OrderCreatedConfirmation

app\code\core\Mage\GoogleTrustedStore\Block\Adminhtml\OrderCreatedConfirmation.php

class Mage_GoogleTrustedStore_Block_Adminhtml_OrderCreatedConfirmation
extends Mage_GoogleTrustedStore_Block_OrderConfirmation_Onepage
{}

 

    <global>        
       <blocks>
          <kmd_googletrustedstore>
             <class>Kmd_Googletrustedstore_Block</class>
          </kmd_googletrustedstore>
          <googletrustedstore>
             <rewrite>                
                <orderConfirmation_Onepage>Kmd_Googletrustedstore_Block_Onepage</orderConfirmation_Onepage>
             </rewrite>
             <rewrite>
                <adminhtml_OrderCreatedConfirmation>Kmd_Googletrustedstore_Block_Adminhtml_OrderCreatedConfirmation</adminhtml_OrderCreatedConfirmation>
             </rewrite>
          </googletrustedstore>
       </blocks>
    </global>

My custom file is located here: app\code\local\Kmd\Googletrustedstore\Block\Adminhtml\OrderCreatedConfirmation.php

class Kmd_Googletrustedstore_Block_Adminhtml_OrderCreatedConfirmation
extends Kmd_Googletrustedstore_Block_Onepage
{  
}

The orderConfirmation_Onepage rewrite works fine for frontend orders, but I can't get the adminhtml block rewrite to work - any suggestions would be greatly appreciated!

Update - I checked for conflicting overrides, none found.

0

1 Answer 1

2

This should be working:

class Kmd_Googletrustedstore_Block_Adminhtml_OrderCreatedConfirmation
  extends Mage_GoogleTrustedStore_Block_Adminhtml_OrderCreatedConfirmation
{  
}

You're rewriting Mage_GoogleTrustedStore_Block_Adminhtml_OrderCreatedConfirmation according to your config.xml hence you have to extend this class.

2
  • yup that does make sense, thanks for the tip - unfortunately still not hitting that class. Let me try adjusting the casing...
    – kmdsax
    Commented Feb 9, 2018 at 19:31
  • 1
    try <adminhtml_orderCreatedConfirmation>Kmd_Googletrustedstore_Block_Adminhtml_orderCreatedConfirmation</adminhtml_OrderCreatedConfirmation> (lower case o in orderCreatedConfirmation) .. strange but working for me in that case Commented Feb 9, 2018 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.