1

module-sales/view/frontend/layout/sales_order_view.xml

    <referenceContainer name="content">
        <block class="Magento\Sales\Block\Order\View" name="order.comments" template="Magento_Sales::order/order_comments.phtml" before="sales.order.info.links"/>
        <block class="Magento\Sales\Block\Order\View" name="sales.order.view" cacheable="false" after="sales.order.info.links">
            <block class="Magento\Sales\Block\Order\Items" name="order_items" template="Magento_Sales::order/items.phtml">
                <block class="Magento\Framework\View\Element\RendererList" name="sales.order.items.renderers" as="renderer.list"/>
                <block class="Magento\Theme\Block\Html\Pager" name="sales_order_item_pager"/>
                <block class="Magento\Sales\Block\Order\Totals" name="order_totals" template="Magento_Sales::order/totals.phtml">
                    <arguments>
                        <argument name="label_properties" xsi:type="string">colspan="4" class="mark"</argument>
                        <argument name="value_properties" xsi:type="string">class="amount"</argument>
                    </arguments>
                    <block class="Magento\Tax\Block\Sales\Order\Tax" name="tax" template="Magento_Tax::order/tax.phtml"/>
                </block>
            </block>
        </block>
        <block class="Magento\Sales\Block\Order\Info" as="info" name="sales.order.info" after="sales.order.view"/>
    </referenceContainer>

I want to change only colspan="4" to colspan="7"

       <argument name="label_properties" xsi:type="string">colspan="7" class="mark"</argument>

I tried,

app/code/Test/Module/view/frontend/layout/sales_order_view.xml

   <?xml version="1.0"?>
   <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
    <referenceBlock name="order_totals">
        <arguments>
            <argument name="label_properties" xsi:type="string">colspan="7" class="mark"</argument>
        </arguments>
    </referenceBlock>
   </body>

Page is getting overrided but some phtml files are missing. It is not overrided in proper way.

2 Answers 2

1

Try add second argument, i mean

<argument name="value_properties" xsi:type="string">class="amount"</argument>

so it should look like

 <?xml version="1.0"?>
   <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
    <referenceBlock name="order_totals">
        <arguments>
            <argument name="label_properties" xsi:type="string">colspan="7" class="mark"</argument>
            <argument name="value_properties" xsi:type="string">class="amount"</argument>
        </arguments>
    </referenceBlock>
   </body>

Let me know if it helps

12
  • still some blocks are getting missed
    – jassi
    Jan 14, 2020 at 12:37
  • what blocks? about taxes?
    – lama377
    Jan 14, 2020 at 12:39
  • side menu bar is not getting displayed. I have attached screenshot for your reference
    – jassi
    Jan 14, 2020 at 12:40
  • try set colspan="4" (like original) but in your custom file, we will see if its problem with page layout or your file
    – lama377
    Jan 14, 2020 at 12:49
  • still same issue
    – jassi
    Jan 14, 2020 at 12:53
0
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
    <referenceBlock name="order_totals">
        <arguments>
            <argument name="label_properties" xsi:type="string">colspan="7" class="mark"</argument>
        </arguments>
    </referenceBlock>
  </body>
</page>

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.