I have posted a CanPar module which is basically a zen-cart version of the osCommerce contribution.
Feel free to test it out and let me know if there are any problems.
http://www.zen-cart.com/index.php?ma...roducts_id=664
I have posted a CanPar module which is basically a zen-cart version of the osCommerce contribution.
Feel free to test it out and let me know if there are any problems.
http://www.zen-cart.com/index.php?ma...roducts_id=664
Fantastic module and it works great for Canada!
Now, is it limited to just Canada ? When I use a US 'ship to' address it returns $0 for the shipping amount which raises the question: is it only calling on domestic shipping rates?
Also, there is a blank input box when I go in to edit the settings for the module.. I've got True/False, Tax Class, a titleless box, and then Sort Order.. ?!
Your blank box is 'Mark Up'.
I am presently trying to get some help to re-write this mod to work with Can and USA at the same time. Presently you have to edit the file to use with USA.
On my oscommerce site, I created CanPar and CanParUSA so that it quoted for both, but I didn't like the results of the look of both showing together and 1 having 0 value.
Hello Breck.
What edits are you making in the file to work with US. Perhaps I can apply your edits to the mod.
I am trying to get this mod to work both in canada and the us at the same time.
This is the line that regulates it:
$request = join('&', array('service=1',
If services=1 (CAN) If services=2 (USA)
This mod can work for either but not both as of now.
You have to manually change the file to use one or the other.
I was thinking that if the file could be rewrote to check the first character of the zip/postal code, then it could be set for 1 or 2 for the services.
Canada postal code k8a 1e3 - first character is a letter
USA zip code 59595 - first character is a number
I was thinking something like:
If zip character equal or greater than 0,
Then
//Connect to CanPar here to get quote, and parse XML.
$request = join('&', array('service=2',
'quantity=' . $shipping_num_boxes,
'unit=K',
'origin=' . $srcFSA,
'dest=' . $desFSA,
'weight=' . intval($shipping_weight),
'cod=0',
'put=0',
'xc=0',
'dec=0'));
ELSE
//Connect to CanPar here to get quote, and parse XML.
$request = join('&', array('service=1',
'quantity=' . $shipping_num_boxes,
'unit=K',
'origin=' . $srcFSA,
'dest=' . $desFSA,
'weight=' . intval($shipping_weight),
'cod=0',
'put=0',
'xc=0',
'dec=0'));
I don't know coding at all, so this is where I am stuck and need someone with coding experience to help me with this.
I know the file already grabs the first 3 characters for retrieving quotes.
Actually, the code already grabs the first character of the postal code:
$desFSA1stLetter = substr(strtoupper($order->delivery['postcode']), 0, 1);
I just added a simple php is_numberic:
// if 1st letter is a number = US, otherwise Canadian
if( is_numeric( $desFSA1stLetter ) ) {
$request = join('&', array('service=2', ...
} else {
$request = join('&', array('service=1', ...
}
LOL - we are chasing each other.
Do you have a updated canpar module for 138?
This version doesn't work anymore.
Really - I was getting alot of errors.
Must of did something wrong.
Will try it again later. Thanks for the info.
It's not working on my 1.38 either... the amounts always show up as $0.00... help anyone?