Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

this site http://www.bitsnbridles.ca/ is live. All of a sudden the Canada Post shipping module is not working. It works on my local MAMP fine. (I hate GoDaddy, but it's where the client has the site)

 

I have tracked the error down as far as where XML data is missing.

 

In /includes/modules/shipping/canadapost.php around line 244 the function _canadapostGetQuote() is not returning any data for the lines inside <lineItems>

 

Further it would seem that the function (around line 190) _addItem ($quantity, $rate, $weight, $length, $width, $height, $description, $ready_to_ship) is not being called.

 

again, the $canadapostQuote array is full at the top of the page, but empty when the module is displayed.

 

I am lost, this only happens on the GoDaddy Server.

 

Any ideas?

Posted

@@nobodyfamous

 

I am not sure about current Godaddy server settings, BUT in the past a special request to open the port for Canada Post was required. It is NOT normally open on Godaddy servers.

 

 

Chris

Posted

@@nobodyfamous

 

ok, I thought the site was still on your MAMP server because of this " It works on my local MAMP fine.". But if it's already been live for 6 months, it could be another issue or perhaps the closed the required port by mistake.

 

 

Chris

Posted

still waiting on GoDaddy - I mirrored the site to my custom server, out there on the internet, and had the same problem. So I downloaded all the files again and ran them through a file compare program. The files are identical. . . :wacko:

Posted

so GoDaddy's response was useless.

Thank you for contacting Hosting Online Support Team. Please be aware that your website can only connect to other computers using port 80 (HTTP) or 443 (HTTPS). Other ports can not be used.

 

If other ports were usable before this would have been a configuration error.

 

So back to my issue. . . any ideas?

Posted

why might this be happening?

 

I added the line print_r($this->quotes); just before return $this->quotes; in the canadapost.php function quote so I could see what is being returned.

 

At the very top of the site, before any code is output I get this (which is correct)

Array
(
   [id] => canadapost
   [module] => Canada Post [1 box(es) to be shipped]<br>medium - 6.55(kg)
   [methods] => Array
    (
	    [0] => Array
		    (
			    [id] => Priority
			    [title] => Priority, <acronym title='Estimated Delivery Date'>EDD</acronym>: February 24, 2014
			    [cost] => 27.32
		    )
	    [1] => Array
		    (
			    [id] => Expedited
			    [title] => Expedited, <acronym title='Estimated Delivery Date'>EDD</acronym>: February 25, 2014
			    [cost] => 13.72
		    )
	    [2] => Array
		    (
			    [id] => Regular
			    [title] => Regular, <acronym title='Estimated Delivery Date'>EDD</acronym>: February 26, 2014
			    [cost] => 13.72
		    )
    )
   [icon] => <br><img src="images/icons/shipping_canadapost.gif" width="145" height="37" border="0" alt="Canada Post" title="Canada Post">
)

 

But, then what is just below the title Shipping Method I get

Array
(
   [module] => Canada Post
   [error] => XML parsing error. <br>If you prefer to use canadapost as your shipping method, please contact the Bits N Bridles via <a href="mailto:[email protected]"><u>Email</u></a>.
   [icon] => <br><img src="images/icons/shipping_canadapost.gif" width="145" height="37" border="0" alt="Canada Post" title="Canada Post">
)

Posted

I have further refined the problem to an empty array. again, at the top of the page, AKA at the time of loading this arry is right

 

$products_array = $cart->get_products();

Array
(
   [0] => Array
    (
	    [id] => 291{2}4
	    [name] => All Canadian Farmer men’s tee
	    [model] =>
	    [image] => All Canadian Farmer.PNG
	    [price] => 22.9900
	    [quantity] => 1
	    [weight] => 1.54
	    [length] => 11.50
	    [width] => 9.00
	    [height] => 9.00
	    [ready_to_ship] =>
	    [final_price] => 22.99
	    [tax_class_id] => 1
	    [attributes] => Array
		    (
			    [2] => 4
		    )
    ))

 

Yet down the page (I assume, is after it is refreshed via AJAX) I get this for the same array

array()

 

It is empty. Why is that?

Posted

SOLVED!!! turns out it was a session error. the osCid was being passed in the URL all the time, and this began blocking the AJAX from getting the right session values, ex. cartID.

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