jtmudge Posted April 5, 2004 Posted April 5, 2004 When sending the form from cehckout_confirmation.php, taxes are sent more than once. There are 3 items in the order, so the tax is sent 3 times instead of once. the Total tax should be 2.06 instead of 6.18. Here is a sample of the html generated: <input type="hidden" name="item_name_1" value="SUPERHEAVY ASSLT LANDER"> <input type="hidden" name="item_number_1" value="GHX MT028"> <input type="hidden" name="quantity_1" value="1"> <input type="hidden" name="amount_1" value="18.00"> <input type="hidden" name="tax_1" value="2.06"> <input type="hidden" name="on0_1"> <input type="hidden" name="os0_1"> <input type="hidden" name="on1_1"> <input type="hidden" name="os1_1"> <input type="hidden" name="item_name_2" value="LARGE MULTI ROCKET POD"> <input type="hidden" name="item_number_2" value="GHX SFA019"> <input type="hidden" name="quantity_2" value="2"> <input type="hidden" name="amount_2" value="3.90"> <input type="hidden" name="tax_2" value="2.06"> The paypal module that generates this looks like this: //Customer Order Details for ($i=0; $i<sizeof($order->products); $i++) { $index = $i+1; $paypal_fields .= tep_draw_hidden_field('item_name_'.$index, $order->products[$i]['name']). tep_draw_hidden_field('item_number_'.$index, $order->products[$i]['model']). tep_draw_hidden_field('quantity_'.$index, $order->products[$i]['qty']). tep_draw_hidden_field('amount_'.$index, number_format($order->products[$i]['final_price']* $currencies->get_value($my_currency),2)) . tep_draw_hidden_field('tax_'.$index, number_format($order->info['tax'] * $currencies->get_value($my_currency),2)); //Customer Specified Product Options: PayPal Max = 2 if ($order->products[$i]['attributes']) { for ($j=0, $n=sizeof($order->products[$i]['attributes']); $j<2; $j++) { if($order->products[$i]['attributes'][$j]['option']){ $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,$order->products[$i]['attributes'][$j]['option'],$order->products[$i]['attributes'][$j]['value']); } else { $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' '); } } } else { for ($j=0; $j<2; $j++) { $paypal_fields .= $this->_drawPayPalOptionSet($j,$index,' ',' '); } } } Any ideas of how to remedy this? Quote
devosc Posted April 5, 2004 Posted April 5, 2004 $taxValue = ($order->products[$i]['final_price'] * ($order->products[$i]['tax'] / 100))*$currencies->get_value($my_currency); $paypal_fields .= tep_draw_hidden_field('tax_'.$index, number_format($taxValue, 2)); Quote "Any fool can know. The point is to understand." -- Albert Einstein
jtmudge Posted April 5, 2004 Author Posted April 5, 2004 Thanks for the answer. Quesiton: Is this somehting that others have run into using this module? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.