As i'm totally novice, can someone give me a little describtion of this function? :
the ps_checkout.inc file
function calc_order_tax($order_subtotal, $d) {
global $ps_vendor_id;
$db = new ps_DB;
eval(load_class("tax", "ps_tax"));
$ps_tax= new ps_tax;
$q = "SELECT state, country FROM user_info WHERE user_info_id='";
$q .= $d["ship_to_info_id"] . "'";
$db->query($q);
$db->next_record();
$state = $db->f("state");
$country = $db->f("country");
$q = "SELECT * FROM tax_rate WHERE tax_country='$country' ";
$q .= "AND tax_state='$state'";
$db->query($q);
if ($db->next_record()) {
$rate = $order_subtotal * $db->f("tax_rate");
return $rate;
}
else
return(0);
}
many thanx