1

Hi I want to add Custom tab in Sales order Shipment page in Backend. So which Block i need to override

I added in Sales Order View page in below code

<blocks>
      <delivery>
        <class>MPS_Delivery_Block</class>
      </delivery>
    <adminhtml>
        <rewrite>
            <sales_order_view_info>MPS_Delivery_Block_Sales_Order_View_Info</sales_order_view_info>
        </rewrite>
    </adminhtml>
    </blocks>

Can you please tell me which class i need to override to add custom tab in sales order shipement page

<adminhtml_sales_order_shipment_new>
      <reference name="content">
          <action method="setTemplate"><template>delivery/sales/order/shipment/create/items.phtml</template></action>
      </reference>
    </adminhtml_sales_order_shipment_new>

I got this error Fatal error: Call to a member function setData() on boolean in : app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php on line 129 when i click ship button in order details page

  • Can you add more details, if possible with screenshot, exactly which part you want to override? – Neha Raval Apr 8 '17 at 16:34
  • Whenever we click shipment button it will redirect to shipment page there i want to add custom tab – Magento 2 Apr 8 '17 at 16:39
  • You mean when we click on "Ship" button on order page? – Neha Raval Apr 8 '17 at 16:47
  • Yes correct .... – Magento 2 Apr 8 '17 at 17:08
  • Do you want to add new section or want to override Items section on new shipment page? Because with your code, it will override new shipment form and won't add anything new to it. – Jaimin Sutariya Apr 9 '17 at 5:32
0

Try with below code in your config file

<blocks>
  <delivery>
    <class>MPS_Delivery_Block</class>
  </delivery>
    <adminhtml>
        <rewrite>
            <sales_order_shipment_create_form>MPS_Delivery_Block_Adminhtml_Sales_Order_Shipment_Create_Form</sales_order_shipment_create_form>
        </rewrite>
    </adminhtml>
</blocks>
  • ok can you please tell me the referncename – Magento 2 Apr 8 '17 at 17:16
  • Reference name? sorry but I think I didnt get you there – Neha Raval Apr 8 '17 at 17:25
  • in layout.xml we need add right – Magento 2 Apr 8 '17 at 17:30
  • I got this error after adding this Fatal error: Call to a member function setData() on boolean in \app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php on line 129 – Magento 2 Apr 8 '17 at 20:34
  • Check my updated question – Magento 2 Apr 8 '17 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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