5

How can I remove invoices & shipment links from my account/myorder page ? I am using Magento ver. 1.9.2

3
  • I had a quite similar issue in Magento 2. You can see my answer here.
    – Andrea
    Commented Nov 6, 2016 at 19:32
  • 1
    Magento 1 or Magento 2 ? Please don't use different version tags as answers migh differ depending on your version. Commented Nov 7, 2016 at 10:31
  • This is not a duplicate as this is for Magento 1.9.
    – Simon
    Commented Apr 19, 2018 at 7:16

3 Answers 3

2

You can find it in

app/design/frontend/Yourheme/default/layout/sales.xml

<sales_order_view translate="label">
    <reference name="sales.order.info">
        <action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path><label>Invoices</label></action>
        <action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path><label>Shipments</label></action>
    </reference>
</sales_order_view>

Comment out this code.

Or if you want remove links from all actions then

Search all matching code

    <action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path><label>Invoices</label></action>
    <action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path><label>Shipments</label></action>

and comment out in whole xml code

10
  • I have commented these lines on section <label>Customer My Account Order View</label> but invoices & shipments links still showing
    – Aks
    Commented Nov 7, 2016 at 12:22
  • check in this tag <sales_order_view translate="label"> Commented Nov 7, 2016 at 12:24
  • You have comment wrong section check properly my answer. Commented Nov 7, 2016 at 12:37
  • I have commented these lines in section <sales_order_view translate="label"> <label>Customer My Account Order View</label>
    – Aks
    Commented Nov 7, 2016 at 12:37
  • Add your complete sales.xml code to in your question then i will revert to you with proper modification. Commented Nov 7, 2016 at 12:45
1

You need to comment or remove the below code from following xml file:

app/design/frontend/Your_theme/default/layout/sales.xml

<action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path><label>Invoices</label></action>
<action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path><label>Shipments</label></action>
-1

in your sales.xml add below code

app/design/frontend/YourPackge/YourTheme/layout/sales.xml

 <sales_order_view translate="label">
  <reference name="sales.order.info">
     <remove name="invoice"> </remove>
     <remove name="shipment"> </remove> 
  </reference>
 </sales_order_view>     

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