0

I am trying to add a block to be appear on shipment view. I successfully showing my custom block on sales order view, but I have to move it to shipment view. Here is what I want to achieve:

My custom block should be showing along with these blocks: sales shipment view

My attempt:

<layout version="1.0">
   <adminhtml_sales_order_shipment_view>
    <reference name="order_info">
        <block type="paketid_booking/adminhtml_sales_order_view_info_booking" name="paketid_booking.order.info.booking.block" template="paketid/booking.phtml" after="order_history" />
    </reference>
  </adminhtml_sales_order_shipment_view>
</layout>

My config.xml:

<config>
<modules>
    <PaketId_Booking>
        <version>1.0.0</version>
    </PaketId_Booking>
</modules>
<default>
    <paketid_booking>
        <api>
            <email>[email protected]</email>
            <key>TEST-API-KEY</key>
            <debug>0</debug>
        </api>
    </paketid_booking>
  </default>
  <global>
     <blocks>
        <paketid_booking>
            <class>PaketId_Booking_Block</class>
        </paketid_booking>
     </blocks>
     <helpers>
        <paketid_booking>
            <class>PaketId_Booking_Helper</class>
        </paketid_booking>
     </helpers>

    <models>
        <paketid_booking>

            <class>PaketId_Booking_Model</class>
            <resourceModel>paketid_booking_resource</resourceModel>
        </paketid_booking>        

        <paketid_booking_resource>

            <class>PaketId_Booking_Model_Resource</class>
            <entities>
                <result>
                    <table>paketid_booking_result</table>
                </result>
            </entities>
        </paketid_booking_resource>

    </models>
    <resources>
        <paketid_booking_setup>
            <setup>
                <module>PaketId_Booking</module>
            </setup>
        </paketid_booking_setup>
    </resources>

    <events>
        <checkout_type_onepage_save_order_after>

            <observers>

                <paketid_booking>
                    <type>singleton</type>
                    <class>PaketId_Booking_Model_Observer</class>

                    <method>processOrder</method>
                </paketid_booking>
            </observers>
        </checkout_type_onepage_save_order_after>
    </events>
</global>
<adminhtml>
    <layout>
        <updates>
            <paketid_booking>
                <file>paketid_booking.xml</file>
            </paketid_booking>
        </updates>
    </layout>
    <events>
        <core_block_abstract_to_html_after>
            <observers>
                <paketid_booking>
                    <type>singleton</type>
                     <class>PaketId_Booking_Model_Adminhtml_Observer</class>
                    <method>getSalesOrderBookingInfo</method>
                </paketid_booking>
            </observers>
        </core_block_abstract_to_html_after>
    </events>
</adminhtml>
</config>

`

My block structure:

enter image description here

I have not found any solution for this since yesterday, so you might have read this question and I am really sorry if I am breaking the rule. I need help

1 Answer 1

0

try to change your layout file below and let me know its working or not

<layout version="1.0">
  <adminhtml_sales_order_shipment_view>
      <reference name="content">
        <block type="paketid_booking/adminhtml_sales_order_view_info_booking" name="paketid_booking.order.info.booking.block" template="paketid/booking.phtml" after="order_history" />
     </reference>
   </adminhtml_sales_order_shipment_view>
 </layout>
1
  • it's not working :( .. I wonder if it has something to do with my config or my folder structure?
    – may
    Commented Sep 6, 2016 at 2:07

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.