Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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? :?

 

$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';

}

The late twentieth century has witnessed a remarkable growth in scientific interest in the subject of extinction

----------------------------------------------------

Arpit

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...