11

I want to remove some XML value without touching core XML files, is it possible ?

The scenario is the following.

In /app/code/core/Mage/Tax/etc/config.xml we have some config value for the totals (<sales><quote><totals>). I want to comment out the tax one so the tax line is not displayed in the frontend.

  • commenting the node in the core XML file works fine but it is not the best approach.
  • If I have put new empy values in a separate module I have a different effect ( it is not like remove the declaration)

In particular I want to do something like:

  • <!--<renderer>tax/checkout_tax</renderer>-->
asked Dec 16, 2013 at 15:53
1
  • 2
    Is there some reason you can't change the settings under System > Configuration > Tax > Shopping Cart Display Settings to not show tax? Commented Dec 16, 2013 at 20:14

1 Answer 1

8

Theoretically inside of your module you can:

  1. in config.xml reset the node to something like <renderer>0</renderer>
  2. register an observer and Mage::getConfig()->setNode('path', NULL)
answered Dec 16, 2013 at 20:20
9
  • <renderer>0</renderer> is giving me a different result: removing the node from core XML file return null while <renderer>0</renderer> return a string with value 0 Commented Dec 17, 2013 at 9:17
  • Try putting null instead of 0. If it will not work try option 2. Commented Dec 17, 2013 at 10:08
  • I have already tried both ( 0 and null ) the issue is that they are converted to string ... I think solution 2 is the only one working Commented Dec 17, 2013 at 10:40
  • @Francesco, not quite. Solution 1 can be still valid for some cases where setting the value to 0 or something else will do the job. Commented Dec 17, 2013 at 13:01
  • 1
    Hi Tim, I think it is good idea to improve the answer specifying that method 1 is not equivalent to comment out the line in the core file Commented Dec 17, 2013 at 14:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.