3

How could i change this label? Tried with sales_order_grid.xml didn't work.

image

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
    <settings>
        <sticky>true</sticky>
    </settings>
    <bookmark name="bookmarks"/>
    <columnsControls name="columns_controls"/>
    <exportButton name="export_button"/>
    <filterSearch name="fulltext"/>
    <filters name="listing_filters">
        <filterSelect name="store_id" provider="${ $.parentName }">
            <settings>
                <options class="Magento\Store\Ui\Component\Listing\Column\Store\Options"/>
                <caption translate="true">All Store Views</caption>
                <label translate="true">Purchase Point</label>
                <dataScope>store_id</dataScope>
                <imports>
                    <link name="visible">ns = ${ $.ns }, componentType = column, index = ${ $.index }:visible</link>
                </imports>
            </settings>
        </filterSelect>
    </filters>
    <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
        <action name="cancel">
            <settings>
                <url path="sales/order/massCancel"/>
                <type>cancel</type>
                <label translate="true">Cancel</label>
            </settings>
        </action>
        <action name="hold_order">
            <settings>
                <url path="sales/order/massHold"/>
                <type>hold_order</type>
                <label translate="true">Hold</label>
            </settings>
        </action>
        <action name="unhold_order">
            <settings>
                <url path="sales/order/massUnhold"/>
                <type>unhold_order</type>
                <label translate="true">Unhold</label>
            </settings>
        </action>
        <action name="pdfinvoices_order">
            <settings>
                <url path="sales/order/pdfinvoices"/>
                <type>pdfinvoices_order</type>
                <label translate="true">Print Invoices</label>
            </settings>
        </action>
        <action name="pdfshipments_order">
            <settings>
                <url path="sales/order/pdfshipments"/>
                <type>pdfshipments_order</type>
                <label translate="true">Print Packing Slips</label>
            </settings>
        </action>
        <action name="pdfcreditmemos_order">
            <settings>
                <url path="sales/order/pdfcreditmemos"/>
                <type>pdfcreditmemos_order</type>
                <label translate="true">Print Credit Memos</label>
            </settings>
        </action>
        <action name="pdfdocs_order">
            <settings>
                <url path="sales/order/pdfdocs"/>
                <type>pdfdocs_order</type>
                <label translate="true">Print All</label>
            </settings>
        </action>
        <action name="print_shipping_label">
            <settings>
                <url path="adminhtml/order_shipment/massPrintShippingLabel"/>
                <type>print_shipping_label</type>
                <label translate="true">Print Shipping Labels</label>
            </settings>
        </action>
    </massaction>
    <paging name="listing_paging"/>
</listingToolbar>
<columns name="sales_order_columns">
    <column name="base_grand_total" class="Magento\Sales\Ui\Component\Listing\Column\Price">
        <settings>
            <filter>textRange</filter>
            <label translate="true">Gift Cards Total</label>
        </settings>
    </column>
    <column name="grand_total" class="Magento\Sales\Ui\Component\Listing\Column\PurchasedPrice">
        <settings>
            <filter>textRange</filter>
            <label translate="true">Order Total</label>
        </settings>
    </column>
    <column name="shipping_name">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="billing_address">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="shipping_address">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="shipping_information">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="shipping_and_handling">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="payment_method">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="total_refunded">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="signifyd_guarantee_decision">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="mailchimp">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentDisabled" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>
    <column name="fee">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Service Fee Total</item>
                <item name="visible" xsi:type="boolean">false</item>
            </item>
        </argument>
    </column> 
    <column name="fundraised">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Funds Raised Total</item>
                <item name="visible" xsi:type="boolean">false</item>
            </item>
        </argument>
    </column>
</columns>

  • While overriding sales_order_grid.xml  have you added you module in sequence after Magento_Sales in module.xml ? – Milind Singh Jun 21 at 3:56
  • yes. I have added extra two column that worked. but can't change default column label – Nayem Jun 21 at 3:58
  • Let me check. It should work by default. – Milind Singh Jun 21 at 3:59
  • This is my code for edit Gift Card(Base) label <column name="base_grand_total" class="Magento\Sales\Ui\Component\Listing\Column\Price"> <settings> <filter>textRange</filter> <label translate="true">Order Total</label> </settings> </column> – Nayem Jun 21 at 4:02
1

Override sales_order_grid.xml ui_component file in your module

app/code/[vendore]/[Module]/view/adminhtml/ui_component/sales_order_grid.xml

 <?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="sales_order_columns">
    <column name="base_grand_total" class="Magento\Sales\Ui\Component\Listing\Column\Price">
        <settings>
            <filter>textRange</filter>
            <label translate="true">Grand Total (Base) 1</label>
        </settings>
    </column>
</columns>
</listing>

https://prnt.sc/o4o6eg

You can check it here. http://easyndfaster.com/blog/post/magento-2-how-to-change-sales-order-grid-column-label/

It's work.

  • It's not working here. I'm using magento 2.3.1 – Nayem Jun 21 at 5:06
  • I am also using 2.3.1 version. Please give me url file override path. Or write your code. So I will check. – Sweety Masmiya Jun 21 at 5:14
  • If i edit in core it's working but when i do it in my module it does not. Any idea why? – Nayem Jun 21 at 5:40
  • Please review my question. i have edited my question with my code. – Nayem Jun 21 at 5:44
  • Just add after end of file </listing>. It's missing in your code. Also I write same code in my module it's work. See screenshot prnt.sc/o4p034 – Sweety Masmiya Jun 21 at 6:03
1

you can do this from Admin Only, go to,

Store -> Configuration -> Advance -> Developer -> Translate Inline -> Enabled for Admin == Yes

and change the inline translations asp per the screenshot attached. enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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