|
powersitedesign -> RE: Shoppng Cart Reccommedations? (5/21/2004 11:19:53)
|
Thanks for the suggestions Erin and Cooper, I will look into these more closely later. Jaybee I am appreciative of your willingness to help, here is my scenario. My client has a unique tax code that applies to in-state purchases only. It is setup like this: quote:
Sales tax rates: 7.25% on the first $2500 6.0% after $2500. **This only applies to arkansas residents, everyone else is excluded. I know this is the php code that we need to drop in to handle this conversion, but I have no idea where to put it in at. (float) $price=2600.00;
function tax($price)
{
(float) $perc=7.25;
(float) $perc2=6.00;
(float) $high=2500.00;
if($price<=2500)
{
$perc=$perc+100;
$perc2=$perc2+100;
$price=round((($price*$perc)/100), 2);
return $price;
}
else
{
$price2=round((($high*$perc)/100), 2);
$price3=$price-$high;
$price3=round((($price3*$perc2)/100), 2);
$price=$price2+$price3+$price;
return $price;
}
}
$price=tax($price);
echo $price;
?> Do you know where it might go?
|
|
|
|