overriding a magento block in multiple modules (and how to ignore the other ones)

前端 未结 4 817
梦如初夏
梦如初夏 2021-01-02 15:42

In Magento you can override a block (or helper, or model, etc.) from one module in another one (most common from Magento Adminhtml module). Now I have the problem that I wan

4条回答
  •  死守一世寂寞
    2021-01-02 15:56

    Instead of rewriting catalog_product_grid, why not extend on Symmetrics_DeliveryTime_Block_Adminhtml_Catalog_Product_Grid? That way the Symmetrics module will keep all it's functionalities and you can add yours.

    So instead of:

    
        
            
                    Symmetrics_DeliveryTime_Block_Adminhtml_Catalog_Product_Grid
            
        
    
    

    do this:

    
        
            
                    Namespace_MyModule_Block_Adminhtml_Catalog_Product_Grid
            
        
    
    

    Of course than a depend in your app/etc/modules file would be fitting.

提交回复
热议问题