Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

ok so my goal is to offer free ground shipping and the subtract the ground shipping cost from the other ups options (next day, 2nd day, ETC...)

 

ok so I have the default array of which types of shipping methodes I would like to allow

 

 

$this->types = array('1DA' => 'Next Day Air',
						   '2DA' => '2nd Day Air',
						   'GND' => ' <font color="red"> FREE Ground</font>');

 

 

then I have changed this to only use the allowed types and also pulled out the ground cost

for ($i=0; $i<$qsize; $i++) {
	list($type, $cost) = each($upsQuote[$i]);
	if($type == 'GND'){$groundcost = $cost;}		
							if( isset($this->types[$type]) ) {
	$methods[] = array('id' => $type,
	'title' => $this->types[$type],
	'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
	}
	}

 

 

Then subtracted the ground cost from all costs in the array

 

foreach ($methods as $key => $val){
		$methods[$key]['cost'] -= $groundcost;
	}

 

on checkout shipping.php all prices show correct

 

ground= $0.00

2nd Day air = 2nd day air$- Ground cost

nextday air - nextday air cost - ground cost

 

if I select ground and go to checkout_confirmation.php the ground stays at $0.00 and all is well, but if you select 2nd day or next day it reverts back to their orig quotes.

 

 

anyone have any Idea. I have also set the array myself $methods[1]['cost']= '0' etc.. and the checkout_shipping page shows correct, but the confirmation page does not.

 

HELP

 

Thanks

Posted

<<ok so my goal is to offer free ground shipping >>

Why cant you simply use Free Shipping option from Admin then?

or Am I missing something?

Posted (edited)
<<ok so my goal is to offer free ground shipping >>

Why cant you simply use Free Shipping option from Admin then?

or Am I missing something?

 

 

 

ok so my goal is to offer free ground shipping and then subtract the ground shipping cost from the other ups options (next day, 2nd day, ETC...)

Edited by keithschm

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...