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


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">
                    <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>
<block class="Magento\Sales\Block\Order\Link" name="sales.order.info.links.shipment">
                    <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>

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.