1

I'm trying to hide tax amount on one page checkout. Hiding that in phtml files is not a problem, but I want to hide it using xml file.

To that moment I have this code in my local.xml file:

<sales_order_view>
<reference name="content">
    <block type="sales/order_view" name="sales.order.view">
        <block type="sales/order_items" name="order_items" template="sales/order/items.phtml">
            <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
              <action method="unsetChild">
                <name>tax</name>
              </action>
            </block>
        </block>
    </block>
</reference>
</sales_order_view>

But it didn't work. Any sugestion?

  • So why do you use sales_order_view layout handle then? – user487772 Mar 31 '14 at 11:11
  • Sorry but I don't know which type of layout should I use to this? – Adrian Mar 31 '14 at 11:16
1

Unfortunately you can't do it via XML layouts as you can only remove blocks which were previously defined and taxes at the OPC are not separated into a block.

So if you want your products to have taxes but hide them at checkout (which can actually be a legal issue in some countries) you have to modify templates.

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.