Hi,
I have an issue with this piece of code right here below, I cant seem to get it to work.
what i would like this peice of code to do is if the user's country is "USA" Charge 13% tax on top of the total which is ['price'] thats also coming from the database, and if not just add price without tax
What getUserData() is getting the user information country from the database
<?php
$row1 = $user->getUserData(('country'));
function get_taxed_total($region, $amount){
$region = $row1['country'];
$amount = $row['price'];
if ($region = 'USA' ){
return ($amount * 13 / 100 + 0.0013 );
};
if ($region != 'USA'){
return ( $amount );
};
}
?>
<input type="hidden" name="a3" value="<?php echo $amount ;?>" />