Jump to content

Canada Post Shipping


Guest jacksond

Recommended Posts

Guest jacksond

This was working before, but now I get this error if I have the Canada Post shipping option enabled:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php:62 Stack trace: #0 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php(62): SimpleXMLElement->__construct('') #1 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php(57): Canada_Post->process(false) #2 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/calc.php(57): Canada_Post->request() #3 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/calc.php(77): Canada_Post() #4 /home3/toronto9/public_html/jacksonjewellery/cart/includes/content/cart.inc.php(814): include('/home3/toronto9...') #5 /home3/toronto9/public_html/jacksonjewellery/cart/includes/global/cart.inc.php(56): require_once('/home3/toronto9...') #6 /home3/toronto9/public_html/jacksonjewellery/cart/ in /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php on line 62

Does anyone know how I fix this (or even what the problem is)?

Link to comment
Share on other sites

Guest jacksond

This is the same error message I got before, when I didn't have a dedicated IP, so I called my provider to ask whether that was still working and they said yes.

My provider said I should be contacting Canada Post because there's an error in the php file (I assume at line 62) where it says:

function process($xml_string) {

		$i = 0;

		$xml = new SimpleXMLElement($xml_string);

if (is_object($xml->ratesAndServicesResponse->product)) {

			foreach ($xml->ratesAndServicesResponse->product as $products) {

				$returnData[$i]['price']= $products->rate;

				$returnData[$i]['name']	= $products->name;

				$i++;

			}

			return $returnData;

		}

		return false;

	}

}



?>

Link to comment
Share on other sites

  • 2 months later...
Guest Morning8

If you're having trouble, it might be worth checking out purolator's new webservices. Their website is purolator.com/eship

The site has tutorials on how to use it, but if you have some questions for me you can post it here and I'll get back to you.

Link to comment
Share on other sites

  • 1 month later...

This was working before, but now I get this error if I have the Canada Post shipping option enabled:

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php:62 Stack trace: #0 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php(62): SimpleXMLElement->__construct('') #1 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php(57): Canada_Post->process(false) #2 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/calc.php(57): Canada_Post->request() #3 /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/calc.php(77): Canada_Post() #4 /home3/toronto9/public_html/jacksonjewellery/cart/includes/content/cart.inc.php(814): include('/home3/toronto9...') #5 /home3/toronto9/public_html/jacksonjewellery/cart/includes/global/cart.inc.php(56): require_once('/home3/toronto9...') #6 /home3/toronto9/public_html/jacksonjewellery/cart/ in /home3/toronto9/public_html/jacksonjewellery/cart/modules/shipping/Canada_Post/classes/canadapost.class.php on line 62

Does anyone know how I fix this (or even what the problem is)?

It suddenly started happening to me as well as I just indicated in another thread. Did you ever get it solved because I am at a complete loss.

Thanks

Link to comment
Share on other sites

Join the conversation

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

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