
07-21-2003, 07:33 PM
|
| Active Member | | Join Date: May 2003
Posts: 148
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0 | |
Shipping Mod Check Hey guys,
I was wondering if anyone can point me in the right direction here, basically I want to check if the customer selects "store pickup" as the method of shipping, and if he/she does, then charge them 8.25% tax no matter what state they are from. I was messing around with catalog/includes/classes/order.php and this code, plz tell me what am I doing wrong here? Quote:
$products = $cart->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$this->products[$index] = array('qty' => $products[$i]['quantity'],
'name' => $products[$i]['name'],
'model' => $products[$i]['model'],
'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
// 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $shipping_address['entry_country_id'], $shipping_address['entry_zone_id']),
'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']),
'price' => $products[$i]['price'],
'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']),
'weight' => $products[$i]['weight'],
'id' => $products[$i]['id']);
if(strpos($this->info['shipping_method'], 'Store Pickup')>0){
$this->products[$index]['tax'] = 8.25;
$this->products[$index]['tax_description'] = 'New York State sales tax';
}
| |