Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change sort order of Canada Post shipping options


Fireflight

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);
			}
		}

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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