Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2005
    Posts
    13
    Plugin Contributions
    2

    Default CanPar Shipping XML Module

    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

  2. #2
    Join Date
    Dec 2006
    Location
    Toronto, Ontario, CANADA
    Posts
    21
    Plugin Contributions
    0

    help question Re: CanPar Shipping XML Module

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

  3. #3
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    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.

  4. #4
    Join Date
    Jan 2005
    Posts
    13
    Plugin Contributions
    2

    Default Re: CanPar Shipping XML Module

    Hello Breck.

    What edits are you making in the file to work with US. Perhaps I can apply your edits to the mod.

  5. #5
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    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.

  6. #6
    Join Date
    Jan 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    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', ...
    }

  7. #7
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    LOL - we are chasing each other.

    Do you have a updated canpar module for 138?

    This version doesn't work anymore.

  8. #8
    Join Date
    Jun 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    Quote Originally Posted by breck View Post
    LOL - we are chasing each other.

    Do you have a updated canpar module for 138?

    This version doesn't work anymore.
    Are you sure? Its working on my site atm even after an update to 1.38.

    Arek

  9. #9
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    Really - I was getting alot of errors.
    Must of did something wrong.

    Will try it again later. Thanks for the info.

  10. #10
    Join Date
    Jan 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: CanPar Shipping XML Module

    It's not working on my 1.38 either... the amounts always show up as $0.00... help anyone?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. CanPar Module not giving shipping rates
    By RobertG in forum Addon Shipping Modules
    Replies: 0
    Last Post: 23 Aug 2010, 06:42 PM
  2. CanPar Shipping Module
    By eggplant36 in forum Addon Shipping Modules
    Replies: 2
    Last Post: 8 May 2010, 06:08 PM
  3. Canpar shipping Module
    By RobertG in forum Addon Shipping Modules
    Replies: 2
    Last Post: 19 Dec 2009, 06:45 PM
  4. Canpar Shipping XML
    By bellilint in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 31 Oct 2008, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg