8

I am using Magento 2.1 I want to rename order shipments name and switch order shipments first then invoice. enter image description here

8

You need to override this file in your module

Path: vendor\magento\module-sales\view\frontend\layout\sales_order_info_links.xml

Following is the code for that invoice and order shipment links in customer account dashboard if you want to swap just swap the block or if you want to rename the Order shipment label just rename the label order shipment block

<block class="Magento\Sales\Block\Order\Link" name="sales.order.info.links.invoice">
                <arguments>
                    <argument name="key" xsi:type="string">Invoices</argument>
                    <argument name="path" xsi:type="string">sales/order/invoice</argument>
                    <argument name="label" xsi:type="string" translate="true">Invoices</argument>
                </arguments>
</block>
<block class="Magento\Sales\Block\Order\Link" name="sales.order.info.links.shipment">
                <arguments>
                    <argument name="key" xsi:type="string">Shipments</argument>
                    <argument name="path" xsi:type="string">sales/order/shipment</argument>
                    <argument name="label" xsi:type="string" translate="true">Order Shipments</argument>
                </arguments>
 </block>

I hope this will help

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.