Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Archived

This topic is now archived and is closed to further replies.

woodies

osc234 w/ Bootstrap & Canada Post Shipping Module

Recommended Posts

I am really interested and am happy about a bootstrap version of OSC! I want to get a site moved over to it, but am having some difficulty with the Canada Post Shipping Module (canada.post.rest.rate.service.oscommerce.V2.3_1).

I am hoping that someone who has got Bootstrap and Canada Post shipping working might be able to point me in the right direction. At this time, I don't think it is doing anything (no communication between the server and Canada Post).

 

Originally, on my test site, after I installed it, I was getting an error something like "No shipping method available for your location." I really don't recall how I fixed that error but after playing around with some other shipping settings, including adding a package (the module comes with dimensional support from the UPSXML module), that error finally went away.

 

However, now when an item is placed in the shopping cart (and meets the weight and dimensions of the package that are in the database), I am simply seeing:

"This is currently the only shipping method available on this order" 

 

but there are no methods or options listed below that.

 

Other possibly relevant information:

 

When I edit the Canada Post module, I can enter the API keys, originating postal code and city, customer number, and they all "stick." However, none of the checkmarked shipping methods NOT allowed stick. I check several off, save, but the checkmarked shipping methods are not saved.

 

Additionally, when I save, this error shows up in my error_log file:

 

PHP Warning:  constant(): Couldn't find constant CANADA_POST_Array in /home/skyscanc/public_html/products/includes/modules/shipping/canadapost.php on line 887, referer: ..../products/admin/modules.php?set=shipping&module=canadapost&action=edit 

In another thread, someone reported a similar error (but not quite the same) and there was a response about it possibly being an issue with modules.php on line 37 - but I wouldn't know after looking at it, what would need to be adjusted.

 

I doubt this is related but will mention it anyway - after installing the dimensional support, and then going to "Tools>>Packaging," there are options to add, edit and delete but clicking on them does not do anything. I'm not sure if the need to be adjusted somewhere in the code... but I got around that temporarily by creating packages with dimensions manually in the database.

What Else I Have Done:

 

1. Gone through the instructions provided with the Canada Post module and double checked I made correct changes (although it's possible I missed something - it seems that there are sometimes - at least with the dimensional support instructions, where defines had to be put in another file and not the ones it said).

2. Emailed the developer of the Canada Post mod to ask for any guidance but have not heard back.

 

3. Played around with different shipping settings to see if some other combinations of settings worked.

 

4. Originally, I had the site on a domain name that I pointed at in my own hosts file. So then it came to me that perhaps Canada Post was sending the information to the live site residing on another server. So I created a subdomain that exists in real DNS (not just my hosts file) to eliminate that being the problem.

After all of my testing and fiddling, I'm suspecting the module is just not working properly in the Bootstrap version and no shipping quotes are being requested from Canada Post or received, of course. I am getting no emailed error messages at all (even though it seems the module itself is also set up _I think_ to also send email messages on curl warnings or errors).

 

Any suggestions as to what to try next would be very much appreciated! 
 

Share this post


Link to post
Share on other sites

@@woodies, I have some answers for you but have no wifi today... So won't get into to much detail on my phone.

 

1st I haven't tried the REST module - I hope to look at it however after I get my 2.3.4 BS store up and running. However ive read all the same post as you.... Where it seems to have issues.

 

I currently use the canadapost sellonline module for 2.2 (it works fine in BS).

 

The prob you are going to run jnto is getting a sellonline account set up with canada post.

 

Search the addon section for the sellonline module. Then call can post and see if they will set up an old style sellonline account id for you.

Share this post


Link to post
Share on other sites

@@greasemonkey - Thanks very much for the reply. We have the older "Sell On Line" Canada Post module but unfortunately, I don't think it provides dimensional support, and thus the shipping quotes are often inaccurate and come in lower than actual Canada Post shipping costs.

 

Share this post


Link to post
Share on other sites

@@woodies you are correct. I'm not aware of a Can Post module that has dimensional support.

 

That said... I'm not sure it's required (only you know your business). For me - we have 2600 sku's.... No module in the world is going to figure out the box size of any combination of these products.

 

How do I get around this (knowing we are billed dimensionally)? Simple.... Adjust the weight of larger, bulky items.

 

Example: some items I sell are made from styro foam (they are very light but very large). I've set them up with weights around 10kg.

Share this post


Link to post
Share on other sites

Another update:

I replaced the admin/modules.php file with the one that came with the Canada Post module. That seemed to enable the module to work in that now, I can check off Postal Services I don't want to offer, and they "stick" now.

 

But am still not getting shipping quotes. 

 

I added the line print_r($this->quotes); just before return $this->quotes; in the canadapost.php to see what if anything was being returned, and am seeing this error message in the shopping cart:

 

Array ( [module] => Canada Post Service [error] => unknown error from Canada Post

Although my email address is entered correctly, I'm not receiving any error email messages from Canada Post. 

Share this post


Link to post
Share on other sites

Well, it seems that the data being sent is not being accepted by Canada Post. Curl  logs to the system error_log file and I happened to have a look there and see this:

  Host: ct.soa-gw.canadapost.ca

Content-Type: application/vnd.cpc.ship.rate+xml
Accept: application/vnd.cpc.ship.rate+xml
Content-Length: 670
 
< HTTP/1.1 400 Bad Request
< Server: Oracle-iPlanet-Web-Server/7.0
< Date: Tue, 09 Jun 2015 19:47:57 GMT
< Content-type: text/xml; charset=UTF-8
< X-backside-transport: FAIL FAIL
< Transfer-encoding: chunked
* Connection #0 to host ct.soa-gw.canadapost.ca left intact
* Closing connection #0
 
The lines before that show the user and authentication. 

I am guessing that the data being sent by this module is not formatted correctly. But I'm not sure.  Perhaps it will give a hint to someone else with the problem and can perhaps see what is going wrong.

Share this post


Link to post
Share on other sites

@@woodies, very quickly looking at the sample code here https://www.canadapost.ca/cpo/mc/business/productsservices/developers/codesamples.jsf

 

I see the url for the rate "could be" incorrect.

 

you have;

    <mailing-scenario xmlns=\"http://www.canadapost.ca/ws/ship/rate\">

They have

<mailing-scenario xmlns="http://www.canadapost.ca/ws/ship/rate-v3">

Have a look through the REST php examples for GetRates...

 

If that is not it... and its just a guess... As a test you could hard code some of the variables in the $xmlRequest to see if you can get it to go....

Share this post


Link to post
Share on other sites

@@greasemonkey That's a good catch, but didn't solve the problem. :( I see that the Canada Post website also has this:

 

Accept

application/vnd.cpc.ship.rate-v3+xml (Note: */* in place of the header value will return an error)

Content-Type

application/vnd.cpc.ship.rate-v3+xml (Note: */* in place of the header value will return an error)

 

which also has rate-v3 but the script does not.

 

So, changed that as well here:

curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/vnd.cpc.ship.rate+xml', 'Accept: application/vnd.cpc.ship.rate+xml'));

Still get the "unknown error." But the odd thing, no error in apache's error_log.

 

So, uploaded a fresh copy of canadapost.php (with the original values) and... weird... still no new error messages when going through the checkout process.

So that really confuses me! 

 

It was odd as there was an error log entry in my file when I changed the first url:

$priceQuotes = $xmlResult->{'price-quotes'}->children('http://www.canadapost.ca/ws/ship/rate');

(I missed the one you were specifically referring to initialy and tried the shopping cart after changing the above to .../rate-v3 and that is when the last error message appeared).

I then changed the one you noted. No error message in error_log file, but still get the "unknown error" with the  print_r($this->quotes); before the line: return $this->quotes;

 

So that's when I thought I'd start over to see if I could the error_log message again, but am not. 

So now I'm really confused :) But I think you are probably on to something with those URL's and possibly hard coding some things. I'll have to brush up on some things.

 


 

Share this post


Link to post
Share on other sites

An update, for anyone interested, from Canada Post, on their developer forum:

"The different URL is due to the fact that the plugin in using an older version of the rating API, which should still work. "

Share this post


Link to post
Share on other sites

Something I've noticed and I'm not sure if this is part of the problem, but in the Configuration>>Shipping/Packaging area, I'm seeing this:
 

Dimensions Support With product dimensions icon_info.gif

Dimensions Support With product dimensions icon_arrow_right.gif

Unit Weight KGS icon_info.gif

Unit Weight KGS icon_info.gif

Unit Length IN icon_info.gif

Unit Length IN

icon_info.gif

 

 

 

As you can see, those three configuration options are each listed twice. 

I'm not sure where this might be coming from and how I might try removing the duplicates. Any ideas to point me in the right direction?

Share this post


Link to post
Share on other sites

Re the last post with the duplicate configuration options - I found it in the database and removed them. But it made no difference - Canada Post module still not working correctly. 

Share this post


Link to post
Share on other sites

If anyone else is hoping to use this module and wants to help troubleshoot or has further suggestions - what I've done:

 

1. I have confirmed there IS communication with the website and Canada Post. I fired up tcpdump and can see the packets including the encrypted handshake, encrypted application data being sent, and encrypted application data received. 

 

2. I hardcoded some of the variables in $xmlRequest (originating postal code, destination postal code, weight, height, width and length.

 

I also uncommented   echo $xmlRequest;

 

So this is what I'm seeing when I click on the Checkout Button:

--------------------------------
7303394 counter 1012 12 12 L9W2Z7 L6K1E4 Array ( [module] => Canada Post Service [error] => unknown error from Canada Post

--------------------------------------

I'm wondering about the 1012. The '10' is what I hard coded for the weight, and the 12 is one of the dimensions, but there is no space between them.. but not sure if that matters in the actual xml request that is being sent.

 

Any other suggestions or ideas to test? I'm wondering if there is a way to have curl print to a file the actual unenctryped data that is being received. 

 

@@greasemonkey - any ideas? :) 

If we're going to stick with osCommerce, it's important to get this to work. With the old Canada Post module, we're getting shipping costs that are totally out of whack.  Trying to adjust the weight to get accurate costs is not working - for example, sending to Fort McMurray - shipping quote is nearly triple the cost, while sending to an Ontario address, shipping quote is nearly half the actual cost. 
 

Share this post


Link to post
Share on other sites

A little more headway here... had a thought to add:

 

echo $curl_response; 

 

after 

 

$curl = curl_init($url); // Create REST Request                                                                                                                                                                              
                curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
                curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
                curl_setopt($curl, CURLOPT_CAINFO, realpath(dirname($argv[0])) . '/includes/modules/shipping/canadapost/cacert.pem'); // Signer Certificate in PEM format                                                                    
                curl_setopt($curl, CURLOPT_POST, true);
                curl_setopt($curl, CURLOPT_POSTFIELDS, $xmlRequest);
                curl_setopt($curl, CURLOPT_TIMEOUT, (int)$this->timeout);
                curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
                curl_setopt($curl, CURLOPT_USERPWD, $this->access_username . ':' . $this->access_password);
                curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/vnd.cpc.ship.rate-v3+xml', 'Accept: application/vnd.cpc.ship.rate-v3+xml'));
                $curl_response = curl_exec($curl); // Execute REST Request 

And I can see the actual error: AA004 which is described in the Canada Post Errors and Messages as "You cannot mail on behalf of the requested customer" (see https://www.canadapost.ca/cpo/mc/business/productsservices/developers/messagescodetables.jsf).

So, I'm not sure what that means exactly - I'm using Test Mode, and using the Development Mode API Keys. I did hardcode the customer number as being blank as in the Canada Post docs, it says, "This element is required to obtain discounted rates for commercial customers and Solutions for Small Business members. It must be omitted to obtain counter (i.e., consumer) rates."

When I hard code the customer number, and try again, I then get error code 9114, which is:

"

To get "counter" rates, the elements of customer number and contract number should be omitted. If a "commercial" quote is desired, the quote-type element can be omitted or set to value of "commercial".

A Get Rates request was made with <quote-type> of “counter” and <customer-number> and/or <contract-id> elements were present. Remove the elements or change to “commercial” quote type.

Share this post


Link to post
Share on other sites

I now know why the module is returning errors from Canada Post. 
 

$xmlRequest ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<mailing-scenario xmlns=\"http://www.canadapost.ca/ws/ship/rate\">
 <customer-number>$this->access_customer_number</customer-number>

The customer-number tag can NOT be sent even if empty to obtain counter rates. If you include a customer number, then you cannot request counter rate and will get an error from Canada Post.

If you remove the customer number, but send an empty <customer-number></customer-number> tag, you will also receive an error from Canada Post. 
 
With removing that tag completely, I am now receiving postage quotes from Canada Post with this module - but it's not displaying on the checkout page. But the rates are being sent.

@@greasemonkey - in case you are interested in trying to implement this module. 

Share this post


Link to post
Share on other sites

@@woodies Very interesting.... and good catch... however I believe that will give you "list rates" not contract or negotiated rates from Canada Post.

 

Can you tell me if you have your contract ID filed in?

 

Maybe you are just missing the contact-id?

 

 

to obtain commercial test rates, in your request to Get Rates, you must include both the customer-number and the contract-id.

Share this post


Link to post
Share on other sites

@@greasemonkey - I personally only have the "Solutions For Small Business" account with Canada Post - I don't ship or mail very much. So, I was using my account to test this and don't have a contract ID.  

 

I'm not sure that the client I am trying to help with this has a Contract ID either. My goal was to see if I could get the module working with the Bootstrap version of osCommerce.  He really needs to upgrade his site to a responsive design and I'd prefer he stick with osCommerce. The old Canada Post module is just returning some really whacky rates - for example, a product sent out to Northern Alberta gets a quote using the old system that is sometimes double the actual shipping cost, while the same product sent to Southern Ontario will often end up with a postal quote that is far too low. Sometimes, it does not provide all the shipping options that are available, as well. 

Anyhow, as mentioned above, I have added the line:
 

print_r($this->quotes);
 
 
also:
  
echo $curl_response;
 
and can see what Canada Post is sending back.
 
But I think there might be an issue with this function:

function _parseResult($xmlResult) {
        $aryProducts = false;
        $upstemp = array();
                $priceQuotes = $xmlResult->{'price-quotes'}->children('http://www.canadapost.ca/ws/ship/rate-v3');
                if ( $priceQuotes->{'price-quote'} ) {
                        $aryProducts=array();
                        foreach ( $priceQuotes as $priceQuote ) {
                                $title  =(string) $priceQuote->{'service-name'};
                                $code  = (string)$priceQuote->{'service-code'};
                                $charge = (float) $priceQuote->{'price-details'}->{'due'};
                                $ddate = (string) $priceQuote->{'service-standard'}->{'expected-delivery-date'}; //2011-09-21*/                                                                                                              
                                $aryProducts[] = array('service-name'=>$title,'due'=>$charge,'service-code' => $code,'expected-delivery-date'=> $ddate);
                        }
                }
        return $aryProducts;
    }

but I am not sure. 

The postal rates are not being placed on the page where they should go and instead, in View Source, this is what I see:
 

<?xml version="1.0" encoding="UTF-8"?>   <mailing-scenario xmlns="http://www.canadapost.ca/ws/ship/rate-v3">       <quote-type>counter</quote-type><options><option>   <option-code>COV</option-code>   <option-amount>16</option-amount>   </option>   </options> <parcel-characteristics>   <weight>10</weight><dimensions><length>12</length>   <width>12</width>   <height>12</height>   </dimensions></parcel-characteristics>   <origin-postal-code>L9W2Z7</origin-postal-code>   <destination><domestic>   <postal-code>L6K1E4</postal-code>   </domestic> </destination>   </mailing-scenario><?xml version="1.0" encoding="UTF-8"?>   <price-quotes xmlns="http://www.canadapost.ca/ws/ship/rate-v3"><price-quote><service-code>DOM.PC</service-code><service-link rel="service" href="https://ct.soa-gw.canadapost.ca/rs/ship/service/DOM.PC?country=CA" media-type="application/vnd.cpc.ship.rate-v3+xml"/><service-name>Priority</service-name><price-details><base>30.02</base><taxes><gst>0.00</gst><pst>0.00</pst><hst percent="13.000">4.24</hst></taxes><due>36.89</due><options><option><option-code>COV</option-code><option-name>Coverage</option-name><option-price>0.00</option-price><qualifier><step-size>100</step-size><step-cost>2.20000</step-cost><included-amount>100</included-amount><max-value>5000</max-value><included>true</included></qualifier></option><option><option-code>DC</option-code><option-name>Delivery confirmation</option-name><option-price>0</option-price></option></options><adjustments><adjustment><adjustment-code>FUELSC</adjustment-code><adjustment-name>Fuel surcharge</adjustment-name><adjustment-cost>2.63</adjustment-cost><qualifier><percent>8.75</percent></qualifier></adjustment></adjustments></price-details><weight-details/><service-standard><am-delivery>false</am-delivery><guaranteed-delivery>true</guaranteed-delivery><expected-transit-time>1</expected-transit-time><expected-delivery-date>2015-06-25</expected-delivery-date></service-standard></price-quote><price-quote><service-code>DOM.RP</service-code><service-link rel="service" href="https://ct.soa-gw.canadapost.ca/rs/ship/service/DOM.RP?country=CA" media-type="application/vnd.cpc.ship.rate-v3+xml"/><service-name>Regular Parcel</service-name><price-details><base>15.39</base><taxes><gst>0.00</gst><pst>0.00</pst><hst percent="13.000">2.36</hst></taxes><due>20.53</due><options><option><option-code>COV</option-code><option-name>Coverage</option-name><option-price>2.20</option-price><qualifier><step-size>100</step-size><step-cost>2.20000</step-cost><max-value>5000</max-value></qualifier></option><option><option-code>DC</option-code><option-name>Delivery confirmation</option-name><option-price>0</option-price><qualifier><included>true</included></qualifier></option></options><adjustments><adjustment><adjustment-code>FUELSC</adjustment-code><adjustment-name>Fuel surcharge</adjustment-name><adjustment-cost>0.58</adjustment-cost><qualifier><percent>3.75</percent></qualifier></adjustment></adjustments></price-details><weight-details/><service-standard><am-delivery>false</am-delivery><guaranteed-delivery>false</guaranteed-delivery><expected-transit-time>2</expected-transit-time><expected-delivery-date>2015-06-26</expected-delivery-date></service-standard></price-quote><price-quote><service-code>DOM.XP</service-code><service-link rel="service" href="https://ct.soa-gw.canadapost.ca/rs/ship/service/DOM.XP?country=CA" media-type="application/vnd.cpc.ship.rate-v3+xml"/><service-name>Xpresspost</service-name><price-details><base>18.15</base><taxes><gst>0.00</gst><pst>0.00</pst><hst percent="13.000">2.57</hst></taxes><due>22.31</due><options><option><option-code>COV</option-code><option-name>Coverage</option-name><option-price>0.00</option-price><qualifier><step-size>100</step-size><step-cost>2.20000</step-cost><included-amount>100</included-amount><max-value>5000</max-value><included>true</included></qualifier></option><option><option-code>DC</option-code><option-name>Delivery confirmation</option-name><option-price>0</option-price></option></options><adjustments><adjustment><adjustment-code>FUELSC</adjustment-code><adjustment-name>Fuel surcharge</adjustment-name><adjustment-cost>1.59</adjustment-cost><qualifier><percent>8.75</percent></qualifier></adjustment></adjustments></price-details><weight-details/><service-standard><am-delivery>false</am-delivery><guaranteed-delivery>true</guaranteed-delivery><expected-transit-time>1</expected-transit-time><expected-delivery-date>2015-06-25</expected-delivery-date></service-standard></price-quote></price-quotes>Array   (   [id] => canadapost   [module] => Canada Post Service   [methods] => Array   (   [0] => Array   (   [id] => DOM.PC   [title] => Priority   [cost] => 36.89   )       [1] => Array   (   [id] => DOM.RP   [title] => Regular Parcel   [cost] => 20.53   )       [2] => Array   (   [id] => DOM.XP   [title] => Xpresspost   [cost] => 22.31   )       )       [icon] => <img src="images/icons/shipping_canadapost_small.gif" alt="Canada Post Service" title="Canada Post Service" width="66" height="15" class="img-responsive" />   )
 

Soo... now I'm a bit lost at what to try to figure out next. 

But maybe we have enough information to at least make this work at some point. :)

One other thing- your post above regarding the URL that is being used in the Module was partially correct (even though Canada Post claims all the old URL's should still work). 

 

This line in the script:
 

$priceQuotes = $xmlResult->{'price-quotes'}->children('http://www.canadapost.ca/ws/ship/rate');

NEEDED to be changed to:
 

$priceQuotes = $xmlResult->{'price-quotes'}->children('http://www.canadapost.ca/ws/ship/rate-v3');

I was getting errors until I added the "-v3" at the end.

 

 

Share this post


Link to post
Share on other sites
The postal rates are not being placed on the page where they should go and instead, in View Source, this is what I see:

 

 

I take that back! I'm not sure what the heck I did, but it is showing up now on the page!

 

Yay! It's working! So now, I can say that Canada Post dimensional support appears to be available with the Bootstrap Version. Just need to make some changes to the script... I'll try and summarize it all. 

To be working for anyone, it will have to strip out the Customer ID tag completely for those that only require counter rates, for one thing. Let's see what I can do :) 

Share this post


Link to post
Share on other sites

Are you two still talking about the REST Canada Post add-on - canada.post.rest.rate.service.oscommerce.V2.3_1 ?

 

I'm still running the older Canada Post (canadapost.php,v 4.0 March 28 2008) which now has stopped giving the correct boxes pretty much since June 1st or there abouts. Didn't notice for a week or two as we were just shipping small orders that all fit in our smallest box.

 

So, it is certainly time to upgrade to the REST (or SOAP) module, but I haven't the time to do any research and am hoping that you guys sort it out. I'm willing to try it on my site too (flippers.com) as we Canadians need a decent CP module!

 

Something that generates labels would be nice too...the old label generator jams up when CP asks for a javascript answer and I havne't a clue how to fix that.

Share this post


Link to post
Share on other sites

@@Pinball Yes - that is what I'm trying to get working, and I think I finally have it! I'll try and clean up the code a bit (it's got all kinds of changes and places where I hardcoded things while I experimented) and possibly upload it when I'm done, and provide documentation. 

It is pretty important to get something like this working - we're experiencing similar problems with the older Canada Post module - the rates that it is quoting are really whacky at times. 

Share this post


Link to post
Share on other sites

Yes, we too are having trouble with the rate quoting for customers. What we are seeing now is the price quoted is correct, but it isn't telling us the correct box it calculated would work. And we have about twenty boxes on cpc_canadapost...

I was going to phone the tech support line to find out what had changed. I suspect something minor. The web page for the boxes hasn't changed at all, and as far as I can tell the link to the support information shows the same 2012 files.

Share this post


Link to post
Share on other sites

Well, I've been struggling with the other end, trying to get the original admin interface working for generating labels - and I think I may have found the script to do just that. This doesn't use REST or SOAP, rather it gets you from the login screen directly to the Canadian destination data entry page where the original script should run just fine. While you are in the Canadian data page you can change to the US or International pages  OR you can write PHP code so the final line of the following script will sort out the destination Domestic/US/International.

 

Note this was done using Firefox running on OSX Yosemite and the Selenium extension.

 

Now I am no PHP code jockey, so I can't rewrite the code, but I'm hoping that someone here (greasemonkey or Insaini?) recognizes what I have found and can fix ship_canadapost.php -

Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://sso.epost.ca/sso/lfe/ui/login?" />
<title>CanadaPostSeleniumLoginShipment-PrivateBrowsing1</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">CanadaPostSeleniumLoginShipment-PrivateBrowsing1</td></tr>
</thead><tbody>
<tr>
	<td>open</td>
	<td>https://sso.epost.ca/sso/lfe/ui/login?</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Sign in or sign up to Canada Post or epost | Canada Post</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>id=sso_username</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=sso_username</td>
	<td>#your CP number#</td>
</tr>
<tr>
	<td>click</td>
	<td>id=sso_remember</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>id=sso_password</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>id=sso_password</td>
	<td>#your CP password#</td>
</tr>
<tr>
	<td>click</td>
	<td>id=sso_action</td>
	<td></td>
</tr>
<tr>
	<td>open</td>
	<td>https://est.canadapost.ca/esto/app/shipment/domestic?execution=e1s1</td>
	<td></td>
</tr>
</tbody></table>
</body>
</html>

Note that for the Rates portion (customers side) I am using canadapost.php which is the other part of the above links package. Which works fine for me, it is accurate and uses dimensions which are forwarded to sellonline.canadapost.ca where it looks up your boxes and sees which box it can stuff the items into, giving you the box name and costs back to your shopping cart customer.

Share this post


Link to post
Share on other sites

Yes, we too are having trouble with the rate quoting for customers. What we are seeing now is the price quoted is correct, but it isn't telling us the correct box it calculated would work. And we have about twenty boxes on cpc_canadapost...

I was going to phone the tech support line to find out what had changed. I suspect something minor. The web page for the boxes hasn't changed at all, and as far as I can tell the link to the support information shows the same 2012 files.

 

Ah, it was my mistake. The dimensions weren't getting to CP as I had inadvertently changed PriceFormatter.php and PriceFormatterPage.php back a few months ago and hadn't noticed the side effect.

Share this post


Link to post
Share on other sites

Hi,

 

I've upgraded my site to this version of Osc and I have the Canada Post Rest module installed. After some manipulation of the previous 2.2 database, everything seems good.

 

I am having one little problem with this module though and, although it's probably something simple, I can't find the problem.

 

When the client gets to the shipping module, the various options show up with the correct prices and, as usual, the lowest priced option radio selection is chosen.

 

However, if the client chooses one of the other options, although it sticks, this change isn't transferred to the confirmation page. The shipping charge is still the lowest priced one of the shipping options.

 

Does anyone have any thoughts on the problem?

 

TIA

 

Richard


No Good Deed EVER Goes Unpunished

Share this post


Link to post
Share on other sites

×