dixie Posted March 10, 2012 Share Posted March 10, 2012 I am in the US, and use the same tax rate for all of my products. All products, except for a few downloads, have the same tax rate. As it is now, I have to change the scroll down from 'no tax' to US-AL Rate (6%) for each product that I add. Is there a way to have the scroll down set to US-AL Rate (6%) default, then scroll down for No Tax? Can someone help this non coder change this default? It would sure same me a lot of time in building my website. I have PS 1.4.7 and am using the new template. Thanks! Dixie Link to comment Share on other sites More sharing options...
phrasespot Posted March 12, 2012 Share Posted March 12, 2012 You can delete the tax rules you don't use so there will not be as many as that comes with default US install. Link to comment Share on other sites More sharing options...
enigma32 Posted March 23, 2012 Share Posted March 23, 2012 Line numbers might be wrong since I run 1.4.4.1 with mods and patched updates.. Use phpmyadmin and view browse ps_tax_rules_group and find the 'id_tax_rules_group' value for your tax rule. Note that number and now open up /admin/tabs/AdminProducts.php On line 2543 (?) you'll find: echo '<option value="'.$tax_rules_group['id_tax_rules_group'].'" '.(($this->getFieldValue($obj, 'id_tax_rules_group') == $tax_rules_group['id_tax_rules_group']) ? ' selected="selected"' : '').'>'.Tools::htmlentitiesUTF8($tax_rules_group['name']).'</option>'; change $this->getFieldValue($obj, 'id_tax_rules_group') == $tax_rules_group['id_tax_rules_group'] to $tax_rules_group['id_tax_rules_group'] == # # being the id number you took from the database now it will default to that # Link to comment Share on other sites More sharing options...
DBMAN Posted October 18, 2012 Share Posted October 18, 2012 Any solution for same issue in 1.5. That file no longer exists best I can find. I have a single tax id; #54 (lol, didn't bother renumbering it). Link to comment Share on other sites More sharing options...
betyonfire Posted October 31, 2012 Share Posted October 31, 2012 (edited) Any solution here? I need to make the same mod. I found a file called AdminProductsController.php in /controllers/admin/ and it has this line: $this->object->id_tax_rules_group = (int)Tools::getValue('id_tax_rules_group'); Would this be the line to adjust and if so, how? Many thanks for any help. Edited October 31, 2012 by betyonfire (see edit history) Link to comment Share on other sites More sharing options...
stevell Posted December 20, 2012 Share Posted December 20, 2012 (edited) For 1.5.2 PLEASE NOTE THIS WILL CHANGE ALL YOUR EXISTING PRODUCTS TAX RATES TO THE DEFAULT RATE. This means you're retail prices will change if they are not at the default rate. Only use it if you have only one tax rate. Use phpmyadmin and view browse ps_tax_rules_group and find the 'id_tax_rules_group' value for your tax rule. Note that number and now open up \admin\themes\default\template\controllers\products\prices.tpl On line 165 Replace the # below with the 'id_tax_rules_group' value for your tax rule. Replace <option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > With <option value="{$tax_rules_group.id_tax_rules_group}" $tax_rules_group['id_tax_rules_group'] == # selected="selected"> Edited December 20, 2012 by stevell (see edit history) Link to comment Share on other sites More sharing options...
mohsart Posted December 21, 2012 Share Posted December 21, 2012 (edited) Tried the above but doesn't work. No tax is replaced with 6% (id_tax_rules_group 3) as default when I use id_tax_rules_group 7 (25%). Actually I get 6% no matter which id_tax_rules_group number I use. Edit: Another thing: All existing products still have 25% VAT after the change, BUT if I edit them, VAT is changed to 6% /Mats Edited December 22, 2012 by mohsart (see edit history) Link to comment Share on other sites More sharing options...
codigoworkshop Posted January 30, 2016 Share Posted January 30, 2016 ok, solution in prestashop 1.6 go to Control Panel and note the "id" tax rule you want to make the default. Now go to the file \admin\themes\default\template\controllers\products\prices.tpl line 161 you see: <option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > then change $product->getIdTaxRulesGroup() and instead put the desired id tax group. example: <option value="{$tax_rules_group.id_tax_rules_group}" {if 5 == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > Now that rule is the tax that is default But...... to not overwrite the original file must use the override folder the root of prestashop to overwrite the file. then, copy the file prices.tpl and paste it in /override/controllers/admin/templates/products (create the folder products) now you can chage de prices.tpl file without change the original file. Link to comment Share on other sites More sharing options...
Daresh Posted January 20, 2021 Share Posted January 20, 2021 Hi! I know this is a bit old topic, but people still may look for solution to fix unassigned tax rules group for some products. I just added a feature doing it to the Tidy module. Link to comment Share on other sites More sharing options...
prestoshap Posted December 15, 2023 Share Posted December 15, 2023 On 1/30/2016 at 10:23 AM, codigoworkshop said: ok, solution in prestashop 1.6 go to Control Panel and note the "id" tax rule you want to make the default. Now go to the file \admin\themes\default\template\controllers\products\prices.tpl line 161 you see: <option value="{$tax_rules_group.id_tax_rules_group}" {if $product->getIdTaxRulesGroup() == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > then change $product->getIdTaxRulesGroup() and instead put the desired id tax group. example: <option value="{$tax_rules_group.id_tax_rules_group}" {if 5 == $tax_rules_group.id_tax_rules_group}selected="selected"{/if} > Now that rule is the tax that is default But...... to not overwrite the original file must use the override folder the root of prestashop to overwrite the file. then, copy the file prices.tpl and paste it in /override/controllers/admin/templates/products (create the folder products) now you can chage de prices.tpl file without change the original file. Hi, does anyone know how to do the exact same thing in the Carrier Wizard? Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now