Jump to content

Change selected tax rule in Backoffice


Recommended Posts

It would be so nice if these forums could be used to get help on issues instead of just bearing witness to struggles. After asking for help on various similar threads, I finally figure this out and am posting it to help out anyone else trying to make this modification.

 

I'll start by saying that I changed the core code and if someone can point out to me how this should be done using an override, it would probably be better.

 

I'm using version 1.5.2.0 with a custom theme based on the default that came with the install

The file to change is in your admin directory, then themes/default/template/controllers/products/prices.tpl

 

On line 165, find this:

<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >

 

and change it to this:

<option value="{$tax_rules_group.id_tax_rules_group}" {if $tax_rules_group.id_tax_rules_group == #}selected="selected"{/if} >

 

with the # sign being the id of the tax rule that you would like to be the default.

  • Like 1
Link to comment
Share on other sites

I am also running 1.5.2.0 and cannot find that file either in the default theme or in my theme (based on default). I can find a controllers directory, but there are no "products" directories under it. I also cannot find anything except a "prices-drop.tpl" in the theme folder.

 

Thanks for finding this solution! I'm probably missing someting obvious in finding that file, but I'm stumped for the moment. Help greatly appreciated!

Link to comment
Share on other sites

The files to change are not actually in your main /theme/ directory. They are in your admin directory, so when you are in your back office, the URL would be

http://www.sitename.com/admin_directory/index.php?somefilenamehere.

 

The files are within that admin_directory, whatever it happens to be called on your install, then in themes/default, etc.

Edited by betyonfire (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

How do you combine tax rules? In Florida, we have to pay sales tax based on delivery and each county has a surtax rate. I created a rule for florida tax and then I created a rule for each county but its not calculating both at checkout , even if I select combine tax rates. Can anybody help me with this? I would appreciate it.

Link to comment
Share on other sites

  • 4 weeks later...
  • 9 months later...

I am sorry to bring up an old topic, but I have this problem as well. Inserting the code snippet above does indeed change the chosen tax under every item to the tax I want, and under prices for each item I can see the orice with and without tax. However, unless I go to each item and press save the tax will not take effect.

To clarify, when looking at the list of items in katalog the base Price and total Price is the same, until I open an item an press save, then the total Price changed so it includes tax, and the tax is then also included in the front office. What am I missing?

I am on 1.5.6.

Thanks.

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

It would be so nice if these forums could be used to get help on issues instead of just bearing witness to struggles. After asking for help on various similar threads, I finally figure this out and am posting it to help out anyone else trying to make this modification.

 

I'll start by saying that I changed the core code and if someone can point out to me how this should be done using an override, it would probably be better.

 

I'm using version 1.5.2.0 with a custom theme based on the default that came with the install

The file to change is in your admin directory, then themes/default/template/controllers/products/prices.tpl

 

On line 165, find this:

<option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} >
and change it to this:

<option value="{$tax_rules_group.id_tax_rules_group}" {if $tax_rules_group.id_tax_rules_group == #}selected="selected"{/if} >
with the # sign being the id of the tax rule that you would like to be the default.

 

 

Works perfectly¡

 

Thanks "betyonfire"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...