dragon123 Posted November 15, 2011 Share Posted November 15, 2011 My taxes aren't being updated by the module: Estimate your shipping and taxes. It updates the shipping cost but doesn't do anything for the taxes. See picture attached. I want my customer to know how much total they are going to pay before going ahead with the order. If the customer goes through the order the taxes are working as they should. I looked everywhere and cannot find a solution to this problem, I am very close to getting the store the way I want but for tinny little bugs like this one. Link to comment Share on other sites More sharing options...
dragon123 Posted November 15, 2011 Author Share Posted November 15, 2011 Not a clean solution but don't want to waste more time on that stuff: in your template shopping-cart.tpl <tr class="cart_total_tax"> <td colspan="6"> <!-- ESTIMATION OF TAX RATE --> {if $id_state == 89||$id_state == 90||$id_state == 96||$id_state == 98||$id_state == 95||$id_state == 87||$id_state == 91||$id_state == 97} {$Taxrate=.05} {$Taxname="GST"} {else if $id_state == 88} {$Taxrate=.12} {$Taxname="HST"} {else if $id_state == 92} {$Taxrate=.15} {$Taxname="HST"} {else if $id_state == 93||$id_state == 313||$id_state == 94||$id_state == 86} {$Taxrate=.13} {$Taxname="HST"} {else} {$Taxrate=0} {$Taxname=""} {/if} {if $display_tax_label} {l s='Total tax:'} {else} {$Taxname} {l s='Estimated Sales Tax:'} {/if} </td> <td class="price" id="total_tax">{displayPrice price=($total_price*$Taxrate)}</td> <!-- <td class="price" id="total_tax">{displayPrice price=$total_tax}</td> --> </tr> Technically I would like a simple SQL statement like the one below but I do not know how to call the function in the shopping-cart.tpl page public static function getTaxRatedByState($id_state, $active =1) { $tax = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow(' SELECT t.`rate` FROM `'._DB_PREFIX_.'tax` t JOIN `'._DB_PREFIX_.'tax_rule` tr ON (tr.id_tax = t.id_tax) WHERE tr.`id_state` = '(int)($id_state). ($active == 1 ? ' AND t.`active` = 1' : '')); return $rate ? (int)($tax['rate']) : false; } Just throwing it out there, no one seems to answer much on the forum anyway. 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