Block class override

If you happen to install  Creare Mass Landscape Shipping Label  and  Simple Order export  free modules  you will have the nasty surprise that in the orders actions menu  will not show up Print landscape shipping labels .  This is due to the fact that both override Mage_Adminhtml_Block_Sales_Order_Grid

<global>
<blocks>
<adminhtml>
<rewrite>
<sales_order_grid>SLandsbek_SimpleOrderExport_Block_Sales_Order_Grid</sales_order_grid>
</rewrite>
</adminhtml>
</blocks>
<models>
<slandsbek_simpleorderexport>
<class>SLandsbek_SimpleOrderExport_Model</class>
</slandsbek_simpleorderexport>
</models>
</global>

<global>
<blocks>
<adminhtml>
<rewrite>
<sales_order_grid>Creare_MassLandscapeShippingLabel_Block_Sales_Order_Grid</sales_order_grid>
</rewrite>
<rewrite>
<sales_order_view>Creare_MassLandscapeShippingLabel_Block_View_Masslandscapeshippinglabel</sales_order_view>
</rewrite>
</adminhtml>
</blocks>
</global>

 

The fast solution is to modify SLandsbek_SimpleOrderExport_Block_Sales_Order_Grid  and  in function _prepareMassaction()

add  after parent::_prepareMassaction();  the followings:

$this->getMassactionBlock()->addItem(‘mass_landscape_shipping_label’, array(
‘label’=> Mage::helper(‘sales’)->__(‘Print Landscape Shipping Labels’),
‘url’ => $this->getUrl(‘creareadmin/masslandscapeshippinglabel/massLandscapeShippingLabel’),
));

 

 

This entry was posted in Errors, Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


nine − = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>