Page 1 of 1

Display Tax Depending on Customer Group

Posted: Wed Jul 23, 2014 6:44 pm
by faulksandcox
Hi,

I need a way of showing the price WITH tax for one customer group and WITHOUT for another.

i.e. Consumers will see the price inclusive of VAT and Trade will see the price on the store without VAT (However will still be charged VAT at the checkout).

Need this quite urgently, please point me to a mod that will do it!

Thanks :)

- Lea

Re: Display Tax Depending on Customer Group

Posted: Thu Jul 24, 2014 6:57 pm
by Xyph3r
A quick change that I did to one of the stores I've made:

NOTE: You must edit the "index.php" file

Add this code:

Code: Select all

// Taxes selector
if (isset($session->data['customer_id'])) {
	$customer_get_group_querry = $db->query("SELECT * FROM " . DB_PREFIX . "customer WHERE customer_id = '" . (int)$session->data['customer_id'] . "' AND status = '1'");
	$customer_get_group = $customer_get_group_querry->row['customer_group_id'];

	if ($customer_get_group == 2 ) {		
		$config->set('config_tax', 0);
	}
}
before "//Language" line

NOTE: Change "2" from "if ($customer_get_group == 2 ) {" with your customer group id.

Re: Display Tax Depending on Customer Group

Posted: Sun Jan 19, 2020 3:21 am
by fabius
Opencart 3.x version here for free:

https://www.opencart.com/index.php?rout ... n_id=38381

Re: Display Tax Depending on Customer Group

Posted: Sun Jan 19, 2020 10:33 pm
by straightlight
Using the extension provided above, based on the described screenshots from the extension page, would also remove the ability to users to use the default customer group ID since check boxes could now be used. We need to be reminded that the customer group does use a default value during startup and may also interfere with the internal APIs for registered customers.

Re: Display Tax Depending on Customer Group

Posted: Sun Feb 09, 2020 6:05 pm
by fabius
@straightlight
I haven't removed the "default customer groups" option, that is still present in the account section. The extension only affect the $tax_status variable at website page startup.
Or you mean something different?

Re: Display Tax Depending on Customer Group

Posted: Mon Feb 22, 2021 3:10 pm
by Naheed
Hello,
You can show the price WITH tax for one customer group and WITHOUT for another
by using the below-mentioned extensions:
1. Product without the tax for specific groups ( VQMOD)
2. Tax for Customers Groups
3. Multiple Taxes module