I'm try to figure out how to show/hide things if the customer hasn't verified their Tax/VAT number. Very much in a similar way to showing/hiding things if the customer isn't logged in (code below)


I can find this in the controller

protected function _isVatValidationEnabled($store = null)
    return  $this->_getHelper('customer/address')->isVatValidationEnabled($store);

So I have tried these but with no luck



Any ideas how I might get it working?

2 Answers 2


If you are in the EU you should just enable VAT validation and auto assign to groups based upon VAT validation result. If you are outside the EU and Magento won't deliver any automatic VAT validations you can assign the customers individually to their respective groups.

If this now is, you can customize your e.g. PHTML based upon the group the customer belongs to and can hide/show things.

I'm guessing it's for prices incl/excl taxes? If so you can solve this via the customer groups itself.


This was the answer to my question, it checks for the login and then checks for a customer group id too

    $_isLoggedIn = $this->helper('customer')->isLoggedIn();
    if($_isLoggedIn == true){
    $_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();          
    if($_myGroupId == 5){
    ?><div class="special"> </div><?php

Your Answer

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

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