Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    If the mark up part was working, you could add a percentage to the retrieved amount to come more in line with the actual price you would pay at the canpar outlet.

    Just to do a test, I selected an item on my site shipping from CAN to USA and canpar module gives me a quote of $12.69.

    If I go to canpar.ca for a quote on the same item, I get a quote of $22.26


    The same item from CAN to CAN on my site quotes $7.59.

    On canpar.ca it quotes $8.04

    A bit closer, but still a loss.


    I am going to contact canpar and ask them if they are providing counter rates or rates for people with accounts. And I will ask them about the difference in the quotes.


    Some things that may help anyone inquiring into this mod:

    http://www.canpar.com/XML/BaseRateXM...t=null&xc=null

    http://www.canpar.com/XML/base_rate.xsd

  2. #12
    Join Date
    Mar 2009
    Posts
    57
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    yes, I could modify that, but the problem I have is, for small orders it's too high, but for big orders it's way too low. If I just add $30 to every order to match the big ones, then the guy that orders 1 item with $5 shipping will have to pay $35.
    The real problem is, my quote matches up with just doing a live quote on the canpar site. but somewhere in the guts of Zencart, it's changing that. Where? so I can fix it.

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

    Default Re: Need help with Canpar...

    I figured out what is wrong.

    The xml as it is returns quote for weights in pounds.
    If you use KG on your site, then you get a drastic difference in prices the heavier the parcel.

    Also, the xml returns quotes without the 9.05% fuel surcharge.

    I am not a coder, so I can't provide a fix, but I can supply the how to for the way this should work.

    If your site uses pounds for weight

    totalquote=xmlquote(with weight as pounds)+(xmlquote(with weight as pounds)*0.0905)

    Elseif

    totalquote=xmlquote(with weight as kg/2.2)+(xmlquote(with weight as kg/2.2)*0.0905)

    Hope it's not too confusing.

    Basically, you would have to use an if / endif to determine if your sites weights are pounds or kilograms.
    If in kilograms, you have to convert to pounds in the module before requesting the quote.
    Once you retrieve the quote, you have to add the 9.05%(0.0905) fuel surcharge to get the correct quote that will match canpar.ca

  4. #14
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    lol

    Wasn't sure if my post went up.

    My ip got banned on this site for a couple hours.

  5. #15
    Join Date
    Mar 2009
    Posts
    57
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    Quote Originally Posted by breck View Post
    I figured out what is wrong.

    The xml as it is returns quote for weights in pounds.
    If you use KG on your site, then you get a drastic difference in prices the heavier the parcel.
    No, I'm quoting in Kg and getting a reply in Kg. There is a key in the URL for format, either L for pounds or K for kilos. I wish it were that easy.

    Quote Originally Posted by breck View Post
    Also, the xml returns quotes without the 9.05% fuel surcharge.
    I don't need the fuel surcharge.
    I'm saying that if I submit the url by hand (the same url that the page will send), I get back the correct answer in the XML. But somewhere after that, the page nerfs the data.

    I could just add a calculation to the canpar form that would give me something close to the right answer in all cases, but that's a lot of work and JUST WRONG. I'd rather have a solution than a workaround. Why doesn't it work as it should?

    I guess I'll have to go into the files and find out. If I do solve it, I'll provide some answers here.

  6. #16
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    Thanks for the lb to kg fix.

    I see the issue too. I tested with 100kg weight, and canpar.ca and using the link come back correct, but the module comes up with a price almost half the correct price.

  7. #17
    Join Date
    Mar 2009
    Posts
    57
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    Here's some info on the canpar API:

    Parameters:

    service: 1=Ground, 2=U.S.A., 3=Select Letter, 4=Select Pak, Select Parcel
    quantity: Number of pieces in the shipment
    unit: Weight unit of measure L=lbs, K=kgs
    weight: Weight of the shipment
    origin: Origin postal code
    dest: Destination postal code
    cod (cash on delivery): Value of the COD; 0 if not a COD shipment
    dec (declared value): Value in Canadian dollars
    put (Pickup Tag): 1=Pickup Tag Shipment, 0=Not a Pickup Tag Shipment
    xc (Extra Care): Number of Extra Care pieces in the shipment


    This is a sample http request to get a rate

    Code:
    http://www.canpar.com/XML/BaseRateXML.jsp?service=1&quantity=1&unit=L&weight=10&origin=M4X1W7 &dest=L4Y2N9&cod=100&dec=200&put=0&xc=1
    Sorry, I had to wrap that in <code> tags so it would display.

    Sample XML data returned:
    <?xml version="1.0" encoding="windows-1252"?>
    <CanparRate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.canpar.com/XML/base_rate.xsd">
    <CanparShipment>
    <COD>100.00</COD>
    <Declared>200.00</Declared>
    <Origin>M4X1W7</Origin>
    <Destination>L4Y2N9</Destination>
    <ExtraCare>1.00</ExtraCare>
    <PUT>No</PUT>
    <Quantity>1</Quantity>
    <ServiceType>1</ServiceType>
    <Weight>10</Weight>
    <Unit>L</Unit>
    </CanparShipment>
    <CanparCharges>
    <BaseRate>8.65</BaseRate>
    </CanparCharges>
    </CanparRate>


    So if you want to ship in Kilos, just use the 'unit=K' in your string.
    Note, check your URL, there are several URLs and I've gotten different results from different ones. This is the one Canpar just gave me, so I assume it's the one we should be using.

    Just out of curiosity, if someone else would try the experiment, make the URL as above and paste it in your browser, and tell me if you get the same results as when you submit with Zencart. I don't, but I would like to see someone else try.

  8. #18
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    One issue I saw is "K" must be in caps. If lower case, it reverts back to "L"


    I tested your above url and get a different quote.
    Also Firefix and Explorer are same quote, but look a little different.

    Firefox:

    <CanparRate xsi:noNamespaceSchemaLocation="http://www.canpar.com/XML/base_rate.xsd">

    <CanparShipment>
    <COD>100.00</COD>
    <Declared>200.00</Declared>
    <Origin>M4X1W7</Origin>
    <Destination>L4Y2N9</Destination>
    <ExtraCare>1.00</ExtraCare>
    <PUT>No</PUT>
    <Quantity>1</Quantity>
    <ServiceType>1</ServiceType>
    <Weight>10</Weight>
    <Unit>L</Unit>
    </CanparShipment>

    <CanparCharges>
    <BaseRate>9.25</BaseRate>
    <ExtraCareCharge>10.00</ExtraCareCharge>
    <CODCharge>4.50</CODCharge>
    </CanparCharges>
    <TransitTime>1</TransitTime>
    </CanparRate>


    Explorer:

    <?xml version="1.0" encoding="windows-1252" ?>
    - <CanparRate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.canpar.com/XML/base_rate.xsd">
    - <CanparShipment>
    <COD>100.00</COD>
    <Declared>200.00</Declared>
    <Origin>M4X1W7</Origin>
    <Destination>L4Y2N9</Destination>
    <ExtraCare>1.00</ExtraCare>
    <PUT>No</PUT>
    <Quantity>1</Quantity>
    <ServiceType>1</ServiceType>
    <Weight>10</Weight>
    <Unit>L</Unit>
    </CanparShipment>
    - <CanparCharges>
    <BaseRate>9.25</BaseRate>
    <ExtraCareCharge>10.00</ExtraCareCharge>
    <CODCharge>4.50</CODCharge>
    </CanparCharges>
    <TransitTime>1</TransitTime>
    </CanparRate>


    I get a quote of $9.25

    I don't know a great deal about coding, but learning a lot in the past 2 nights doing a little reading on php. Gonna be a wiz in time lol.

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

    Default Re: Need help with Canpar...

    Seems it is getting the incorrect info to use.

    I did another test by adding the line

    $body = file_get_contents('http://www.canpar.com/XML/BaseRateXML.jsp?' . $request);
    echo $body;

    I used an item that was 5.3kg from Can to USA

    I get returned:

    0.00
    0.00
    K2P2N2
    08854
    0.00
    No
    1
    2
    8
    K
    23.15

    NOTE: 5.3kg is now 8kg.

    I then changed the item to 100kg to test it and it returned:

    0.00
    0.00
    K2P2N2
    08854
    0.00
    No
    3
    2
    36
    K
    80.39

    NOTE: Service=3 and quantity=3 but I only have 1 item in my cart.

    I looked at my UPS module, and it shows the same. Seems to be an issue with zencart and not the module.

    I am going to post this as a bug and see what they say.

  10. #20
    Join Date
    Sep 2007
    Posts
    106
    Plugin Contributions
    0

    Default Re: Need help with Canpar...

    Fixed it.

    Go to Configuration>Shipping/Packaging menu.

    Change:

    Enter the Maximum Package Weight you will ship
    Change to 500 or 1000 or whatever you choose.
    If you have it set to max 50, and your order weight is 110, it changes it to 3 pieces and averages out the weight. This will cause under estimated prices.

    Package Tare Small to Medium - added percentage:weight
    Leave it blank or if you change it, it adds to weight which increases price.

    Larger packages - added packaging percentage:weight
    Same as line above.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. zencart plays with my shipping data -Canpar
    By Luxifer in forum Addon Shipping Modules
    Replies: 1
    Last Post: 15 Sep 2009, 05:26 PM
  2. Need help with stylesheet - Need to delete the categories
    By annav in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Jun 2009, 12:41 PM
  3. New some help with Canpar shipping
    By breck in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 21 Mar 2008, 12:09 AM
  4. Need Help with a couple of issues with the shop
    By chrisb in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 3 Oct 2006, 12:36 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