2

I want to add a <select> element after the shipping methods.

I've created a layout file in Company\MyModule\view\adminhtml\layout\sales_order_create_load_block_shipping_method.xml

<?xml version="1.0"?>


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="Company_MyModule::js/pickup_point_shipping.js"/>
    </head>

    <body>

        <referenceContainer name="content">
                <block name="order.create.shipping.method.pickuppoint" class="Magento\Backend\Block\Template"
                       template="Company_MyModule::select_pickup_point.phtml"
                       after="order.create.shipping.method.form"  />
        </referenceContainer>

    </body>
</page>

But it does not appears on the page.

What do I miss?

1 Answer 1

0

The problem was the reference, because it is a block instead of container:

<referenceBlock name="shipping_method">
        <block name="order.create.shipping.method.pickuppoint" class="Magento\Backend\Block\Template"
                   template="Company_MyModule::select_pickup_point.phtml"
                   after="order.create.shipping.method.form"  />
</referenceBlock>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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