Post by bcfl » Sat Sep 11, 2010 6:27 pm

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
Last edited by i2Paq on Wed Sep 15, 2010 12:39 am, edited 1 time in total.
Reason: Title adjusted + Topic moved

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by i2Paq » Sat Sep 11, 2010 7:45 pm

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!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by bcfl » Sat Sep 11, 2010 9:59 pm

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

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by i2Paq » Sat Sep 11, 2010 11:34 pm

So you want to set a default tax-class for products.

This is not possible atm.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by bcfl » Sun Sep 12, 2010 7:22 am

Yes, I understand, should I submit a feature request?

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by i2Paq » Sun Sep 12, 2010 5:29 pm

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!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by fido-x » Sun Sep 12, 2010 6:37 pm

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.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by bcfl » Tue Sep 14, 2010 8:43 pm

Thank you very much, I will give this a shot and let you know.
Thanks Again bob

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by bcfl » Tue Sep 14, 2010 9:14 pm

Awesome - works like a charm THANK YOU,

Thanks Again, bob

New member

Posts

Joined
Tue Jan 26, 2010 5:34 am

Post by i2Paq » Wed Sep 15, 2010 12:39 am

Yep, Thanks!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by cantykiwi » Thu Sep 16, 2010 2:55 pm

Exxxxxxxxxxcellent code mod fido-x!!! ;D

New member

Posts

Joined
Mon Sep 13, 2010 12:37 pm

Post by tommyla » Thu Jan 27, 2011 7:02 pm

this should be added in offical version, its super useful
btw this mod works for 1.4.9.3

Active Member

Posts

Joined
Wed Jul 22, 2009 9:49 pm
Location - Norway

Post by fido-x » Thu Jan 27, 2011 10:22 pm

And here's the vQmod file.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by i2Paq » Sat Jul 23, 2011 5:40 pm

Could you update this to work with 1.5.x please?

Thanks! :yahoo:

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by tommyla » Sat Jul 23, 2011 5:48 pm

i2Paq wrote:Could you update this to work with 1.5.x please?

Thanks! :yahoo:
i just +1 ed this one on google+ :p

Active Member

Posts

Joined
Wed Jul 22, 2009 9:49 pm
Location - Norway

Post by fido-x » Sat Jul 23, 2011 8:03 pm

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).

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by tommyla » Sat Jul 23, 2011 8:12 pm

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).
default_tax_class_15x.xml
boooja! :crazy:

Active Member

Posts

Joined
Wed Jul 22, 2009 9:49 pm
Location - Norway

Post by i2Paq » Sun Jul 24, 2011 5:21 pm

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.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by webbert » Mon Oct 10, 2011 2:51 pm

where to install the "default_tax_class_15x.xml"?

Newbie

Posts

Joined
Wed Dec 30, 2009 5:07 am

Post by haydent » Wed Nov 09, 2011 11:53 am

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:

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. :crazy:

but keep in mind it wont adapt if you delete that tax class and recreate it...

User avatar
Active Member

Posts

Joined
Wed Nov 09, 2011 9:50 am
Location - Sydney, Australia
Who is online

Users browsing this forum: No registered users and 20 guests