cancel
Showing results for 
Search instead for 
Did you mean: 

How to set colspan 4 in overridden sales_email_order_items.xml in Magento2?

SOLVED

How to set colspan 4 in overridden sales_email_order_items.xml in Magento2?

I want to set colspan 4 in my custom sales_email_order_items.xml file. Location of file is app\code\My\Module\view\frontend\layout\sales_email_order_items.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" label="Email Order Items List" design_abstraction="custom">
    <body>
        <referenceBlock class="Magento\Sales\Block\Order\Email\Items" name="items">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">My_Module::my_module/email/order/items.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="order_totals">
            <arguments>
                <argument name="label_properties" xsi:type="string">colspan="4" align="right"</argument>  <!-- This is not working -->
            </arguments>
        </referenceBlock>
     </body>
</page>

But my code is not working. What is the correct way of doing it?

---
Problem Solved Click Accept as Solution!:Magento Community India Forum
Tags (1)
1 REPLY

Re: How to set colspan 4 in overridden sales_email_order_items.xml in Magento2?

I found the reason why it was not working. I need to use the code as following.

 

<referenceBlock name="order_totals">
      <action method="setLabelProperties">
           <argument name="value" xsi:type="string">colspan="4" align="right"</argument>
       </action>
</referenceBlock>
---
Problem Solved Click Accept as Solution!:Magento Community India Forum