Q:

Opencart hide taxes from specific customer group

I want to show the prices incl. tax only to not registered users or to users registered with a normal account. For wholesalers (customer group id 2) the prices should be shown without tax, but get added on checkout. 
I know that there is a option for this at the configuration at the shop, but only for the complete store and not for specific user groups. 
I know that I need to do smth like
if(usergroup == 2){
   show price without tax
}else{
   show price with tax
}

But where in the core is the line where the tax is added to the product price, and where it should not affect the checkout. Has anyone done this before?

A:

"But where in the core is the line where the tax is added to the product price"
In the file <OC_ROOT>/system/library/tax.php, class Tax @ functions calculate, getTax
But I don't recommend changing the core implementation of both Tax @ calculate, getTax, it's better to change the code where they are called, you will notice that in any controller function that displays product details (such as best seller module) the price is calculated through formatting the result of$this->tax->calculate($price... or getTax..., so this is the best place to put your logic that checks for the user group ID
"and where it should not affect the checkout"
If you didn't hack the core functions  calculate, getTax(but instead, hack the code that calls them as I said before), you won't affect any thing
"Has anyone done this before?"
You can find if some one has already done it in the extensions page

