[MOD] Default Tax class
28 posts
• Page 1 of 2 • 1, 2
[MOD] Default Tax class
I am setting up a new store and will have customers picking up product as well as shipping across the US.
When I add product, under the data tab, how do I change the tax class from the default (---None---) to the tax rate I have setup, (the tax is already set up and is in the dropdown).
Thanks, bob
When I add product, under the data tab, how do I change the tax class from the default (---None---) to the tax rate I have setup, (the tax is already set up and is in the dropdown).
Thanks, bob
Last edited by i2Paq on Tue Sep 14, 2010 4:39 pm, edited 1 time in total.
Reason: Title adjusted + Topic moved
Reason: Title adjusted + Topic moved
- bcfl
- Posts: 60
- Joined: Mon Jan 25, 2010 9:34 pm
Re: Change Default
I'm not sure if I understand your question but you can change it per product...
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: Change Default
That I understand, but if you are entering a large number of items sometimes you forget to make the selection, so I would like the default to be (in my case) FL tax 6% as the default and the None choice as an option. In the Tax Class drop down.
does that help, thanks bob
does that help, thanks bob
- bcfl
- Posts: 60
- Joined: Mon Jan 25, 2010 9:34 pm
Re: Change Default
So you want to set a default tax-class for products.
This is not possible atm.
This is not possible atm.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: Change Default
Yes, I understand, should I submit a feature request?
- bcfl
- Posts: 60
- Joined: Mon Jan 25, 2010 9:34 pm
Re: Change Default
bcfl wrote:Yes, I understand, should I submit a feature request?
I think you have a legit feature request here

Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: Change Default
i2Paq wrote:So you want to set a default tax-class for products.
This is not possible atm.
Yes it is!
Try this.
In "admin/controller/setting/setting.php" (before the $ignore array), insert the following:
- Code: Select all
// Default tax class
$this->data['entry_tax_class'] = $this->language->get('entry_tax_class');
$this->load->model('localisation/tax_class');
$this->data['tax_classes'] = $this->model_localisation_tax_class->getTaxClasses();
if (isset($this->request->post['config_tax_class_id'])) {
$this->data['config_tax_class_id'] = $this->request->post['config_tax_class_id'];
} else {
$this->data['config_tax_class_id'] = $this->config->get('config_tax_class_id');
}
// End default tax class
In the language file (admin/language/english/setting/setting.php), insert the following:
- Code: Select all
// Default tax class
$_['entry_tax_class'] = 'Default Tax Class:';
And the template file (admin/view/template/setting/setting.tpl), insert the following at around line 214:
- Code: Select all
<tr>
<td><?php echo $entry_tax_class; ?></td>
<td><select name="config_tax_class_id">
<option value="0"><?php echo $text_none; ?></option>
<?php foreach ($tax_classes as $tax_class) { ?>
<?php if ($tax_class['tax_class_id'] == $config_tax_class_id) { ?>
<option value="<?php echo $tax_class['tax_class_id']; ?>" selected="selected"><?php echo $tax_class['title']; ?></option>
<?php } else { ?>
<option value="<?php echo $tax_class['tax_class_id']; ?>"><?php echo $tax_class['title']; ?></option>
<?php } ?>
<?php } ?>
</select></td>
</tr>
Then, in "admin/controller/catalog/product.php", change line 821 from:
- Code: Select all
$this->data['tax_class_id'] = 0;
to:
- Code: Select all
$this->data['tax_class_id'] = $this->config->get('config_tax_class_id');
You should then be able to set the default tax class under the "Local" tab in your settings.

If you're not living on the edge ... you're taking up too much space!
Multi-Vendor Plugin for OpenCart 1.5.1.x
Have I helped you?
-

fido-x - Posts: 1960
- Joined: Fri Jun 27, 2008 5:09 pm
- Location: Tasmania, Australia
Re: Change Default
Thank you very much, I will give this a shot and let you know.
Thanks Again bob
Thanks Again bob
- bcfl
- Posts: 60
- Joined: Mon Jan 25, 2010 9:34 pm
Re: Change Default
Awesome - works like a charm THANK YOU,
Thanks Again, bob
Thanks Again, bob
- bcfl
- Posts: 60
- Joined: Mon Jan 25, 2010 9:34 pm
Re: Change Default
Yep, Thanks!
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: Change Default
Exxxxxxxxxxcellent code mod fido-x!!! 

- cantykiwi
- Posts: 63
- Joined: Mon Sep 13, 2010 4:37 am
Re: [MOD] Default Tax class
this should be added in offical version, its super useful
btw this mod works for 1.4.9.3
btw this mod works for 1.4.9.3
- tommyla
- Posts: 144
- Joined: Wed Jul 22, 2009 1:49 pm
- Location: Norway
Re: [MOD] Default Tax class
And here's the vQmod file.

If you're not living on the edge ... you're taking up too much space!
Multi-Vendor Plugin for OpenCart 1.5.1.x
Have I helped you?
-

fido-x - Posts: 1960
- Joined: Fri Jun 27, 2008 5:09 pm
- Location: Tasmania, Australia
Re: [MOD] Default Tax class
Could you update this to work with 1.5.x please?
Thanks!
Thanks!

Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [MOD] Default Tax class
i2Paq wrote:Could you update this to work with 1.5.x please?
Thanks!
i just +1 ed this one on google+ :p
- tommyla
- Posts: 144
- Joined: Wed Jul 22, 2009 1:49 pm
- Location: Norway
Re: [MOD] Default Tax class
OK, you asked for it, so here it is.
Default Tax Class for OpenCart 1.5.1 (should work for 1.5.0.x as well).
Default Tax Class for OpenCart 1.5.1 (should work for 1.5.0.x as well).

If you're not living on the edge ... you're taking up too much space!
Multi-Vendor Plugin for OpenCart 1.5.1.x
Have I helped you?
-

fido-x - Posts: 1960
- Joined: Fri Jun 27, 2008 5:09 pm
- Location: Tasmania, Australia
Re: [MOD] Default Tax class
fido-x wrote:OK, you asked for it, so here it is.
Default Tax Class for OpenCart 1.5.1 (should work for 1.5.0.x as well).
boooja!

- tommyla
- Posts: 144
- Joined: Wed Jul 22, 2009 1:49 pm
- Location: Norway
Re: [MOD] Default Tax class
I see entry_tax_class, I have Dutch and English set-up.
In English it is OK, do I need anything to get it also in Dutch?
Edit:
I see, I needed to add the Dutch related settings in the xml.
In English it is OK, do I need anything to get it also in Dutch?
Edit:
I see, I needed to add the Dutch related settings in the xml.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9842
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [MOD] Default Tax class
where to install the "default_tax_class_15x.xml"?
- webbert
- Posts: 6
- Joined: Tue Dec 29, 2009 9:07 pm
Re: [MOD] Default Tax class
ok here's my quick and dirty hard coded approach for Version 1.5.1.3 (thoery will work with other versions if my example doesnt)
open "admin/controller/catalog/product.php" go to line 832 or where you find:
and change it to equal the id for your tax class you want default, this can be found in the url of the edit page for that class
ie: admin/index.php?route=localisation/tax_class/update&token=cb9c3c67af54oueu440d7efe8983257&tax_class_id=9
So in my case i change it to:
that is it.
but keep in mind it wont adapt if you delete that tax class and recreate it...
open "admin/controller/catalog/product.php" go to line 832 or where you find:
- Code: Select all
$this->data['tax_class_id'] = 0;
and change it to equal the id for your tax class you want default, this can be found in the url of the edit page for that class
ie: admin/index.php?route=localisation/tax_class/update&token=cb9c3c67af54oueu440d7efe8983257&tax_class_id=9
So in my case i change it to:
- Code: Select all
$this->data['tax_class_id'] = 9;
that is it.
but keep in mind it wont adapt if you delete that tax class and recreate it...
-

haydent - Posts: 53
- Joined: Wed Nov 09, 2011 1:50 am
- Location: Sydney, Australia
28 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 5 guests













