Jump to content
Sign in to follow this  
Fireflight

Change sort order of Canada Post shipping options

Recommended Posts

I'm using the Canada Post shipping module. On the checkout_shipping.php page, the shipping options are in descending order (Most expensive to least expensive). I need to sort them from least expensive to most expensive. I have a feeling that what I need to edit is in the snippet below, but I'm nowhere near certain.

 

Any help would be really appreciated!

 

		$canadapostQuote = $this->_canadapostGetQuote();
	if ( (is_array($canadapostQuote)) && (sizeof($canadapostQuote) > 0) ) {
		$this->quotes = array('id' => $this->code,
			'module' => /*$this->title . ' (' . */$shipping_num_boxes . ' x ' . $shipping_weight . 'kgs' ); //2gen.net - Removed shipper name		
			$methods = array();
		for ($i=0; $i<sizeof($canadapostQuote); $i++) {
			list($type, $cost) = each($canadapostQuote[$i]);

			if ( $method == '' || $method == $type ) {
				$methods[] = array('id' => $type,
					'title' => $type,
				'cost' => (SHIPPING_HANDLING + MODULE_SHIPPING_CANADAPOST_HANDLING + $cost) * $shipping_num_boxes);
			}
		}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×