cancel
Showing results for 
Search instead for 
Did you mean: 

XML Layout problem

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

XML Layout problem

Hi,

what am I doing wrong, so that my custom block does not show after the specified block on the New Shipment page?

Original layout file adminhtml_order_shipment_new.xml

 

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="admin.scope.col.wrap" htmlClass="admin__old" /> <!-- ToDo UI: remove this wrapper with old styles removal. The class name "admin__old" is for tests only, we shouldn't use it in any way -->
        <referenceContainer name="content">
            <block class="Magento\Shipping\Block\Adminhtml\Create" name="sales_shipment_create">
                <block class="Magento\Shipping\Block\Adminhtml\Create\Form" name="form" template="Magento_Shipping::create/form.phtml">
                    <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="Magento_Sales::order/view/info.phtml">
                        <container name="extra_customer_info"/>
                    </block>
                    <block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
                    <block class="Magento\Shipping\Block\Adminhtml\Create\Items" name="order_items" template="Magento_Shipping::create/items.phtml">
                        <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" name="default" as="default" template="Magento_Shipping::create/items/renderer/default.phtml"/>
                        <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="Magento_Sales::items/column/qty.phtml" group="column"/>
                        <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="Magento_Sales::items/column/name.phtml" group="column"/>
                        <block class="Magento\Framework\View\Element\Text\ListText" name="order_item_extra_info"/>
                        <container name="submit_before" label="Submit Before"/>
                        <container name="submit_after" label="Submit After"/>
                    </block>
                    <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking" name="shipment_tracking" template="Magento_Shipping::order/tracking.phtml"/>
                    <block class="Magento\Shipping\Block\Adminhtml\Order\Packaging" name="shipment_packaging" template="Magento_Shipping::order/packaging/popup.phtml"/>
                </block>
            </block>
        </referenceContainer>
    </body>
</page>

My extension

 

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
			<block class="PerunPro\DPD\Block\Adminhtml\OrderDPD" name="order_dpd" template="PerunPro_DPD::order/view/dpd.phtml" after="order_payment"/>
        </referenceContainer>
    </body>
</page>

Instead of showing after "order_payment", it's shown at the end, after the submit button.

Also tried before="order_items" which also does not work.