Page 1 of 6 123 ... LastLast
Results 1 to 10 of 52
  1. #1
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Implementing Purolator Shipping Module

    Hey guys & gals,

    My employer needs purolator shipping charges. So I decided to impelement a purolator shipping module for good ol' Zen-Cart. I have the algorithm working, but I'm having trouble properly integrating it in to the environment.

    Call it a stupidity on my part or lack of experience with the zen-cart structure. But I am really really having a hard time trying to get it integrated and started up. If anyone here who has written a module can shine some light on my problem that would be great!

    and the sooner it's implemented I can have it up for all you guys who are wanting a purolator module as well.

    This is what I have done so far.

    I have a database set up with all postal codes across canada mapped to all their geographical locations. Each code will correspond to a flat rate price up to 10 lbs. after which prices incremenent according to specific weight ranges.

    The entire algorithm has been tested and works flawlessly. I am just having a very very hard time getting it "installed" in to zen-cart.

    any takers?

    Thanks for the help guys/gals

  2. #2
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    Update:

    So I finally started understanding the environment a bit better and on the admin side I managed to get the purolator module to show up and it "installs". When I go to the client side and try to make a purchase it doesn't recognize my shipping method and neglects it completely.

    These are the files I created:

    includes\modules\shipping\purolator.php
    includes\english\modules\shipping\purolator.php


    So, my question is, are there any other sections I have to modify to get this thing working?

    thanks.

  3. #3
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    For the people reading this thread, here is yet another update:

    I just managed to get the purolator option to show up on the client side, however the charge remains at 'zero' and when I click on next to go to the checkout page it remains on the "choose your shipping options" page.

    any ideas what I could be missing? (see previous reply for what files I created

  4. #4
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    Alright,

    I got it working...

    anyone interested? so far it doesn't seem like it


    I'm just putting in some touch ups to make sure provinces/postal codes match their according regions so someone can't put in British Columbia and have a postal code for Montreal. Just minor things here and there.

    oh if anyone was wondering, this was built for a canada only store. Apparantly shipping in the states is all one rate anyway so it shouldn't be too hard to add it in there. I'll probably do that as well.

    alright...I'll be posting updates regularly as to what I'm adding to this thing. Don't want to release it until I'm happy with it.

    cheers.

  5. #5
    Join Date
    Mar 2005
    Posts
    27
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    I'd be interested in checkng it out. I currently am trying to get Virtuemart working with Canada Post and Fedex in Joomla but might go back to my Zen Cart installation if I don't have any success on the Joomla end of things.

    Thanks!
    Chris Hutcheson.

  6. #6
    Join Date
    Aug 2005
    Posts
    202
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    Quote Originally Posted by wajdi
    Alright,

    I got it working...

    anyone interested? so far it doesn't seem like it


    I'm just putting in some touch ups to make sure provinces/postal codes match their according regions so someone can't put in British Columbia and have a postal code for Montreal. Just minor things here and there.

    oh if anyone was wondering, this was built for a canada only store. Apparantly shipping in the states is all one rate anyway so it shouldn't be too hard to add it in there. I'll probably do that as well.

    alright...I'll be posting updates regularly as to what I'm adding to this thing. Don't want to release it until I'm happy with it.

    cheers.
    hey wajdi shoot me an PM i will test it for you and can also help a bit if need.
    i am trying writing a module for Bus shiping also.

  7. #7
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    Hey guys,

    Alright, well I put together this zip file with a read me. Should be very straight forward to install. Didn't require too many files to get it working. If you have any problems installing it, then I probably forgot to include a certain file. Just let me know and I'll get it on it asap.

    Anyway, let me know what you think.

    Just as a note. This is a very early release of the module, there are still certain things I want to work on to make it more foolproof. Right now it does exactly what it's suppose to do:

    1) take postal code
    2) get rate
    3) find price based on weight + location

    If you want to edit the rates you have to change it in the table itself (shipping_rates.sql). I didn't include an interface on the admin side to change rates yet. That might be something I will do in the future. For now there is no urgency for me to create one.

    oh, and for now this is Canada only.

    Anyway, enough blabbering, enjoy.

    -wajdi
    Last edited by wajdi; 10 Oct 2006 at 08:36 PM.

  8. #8
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    Hey hey,

    Some errors found in my code that I didn't quite clean up. I'm sorting it all out now. Should be up hopefully tonight, but most likely tomorrow.

    For those who were wondering,

    Quick bugs I found:

    this line:

    // List all postal codes that start with the same letter as the user defined input
    $qry = "select postal from postal_zone where postal like '".this->$postal_code"%'";

    // List all the zones that start with the same letter as the user defined input
    $zne = "select zone from postal_zone where postal like '".this->$postal_code"%'";


    should read:

    // List all postal codes that start with the same letter as the user defined input
    $qry = "select postal from postal_zone where postal like '".substr($postal_code, 0, 1)."%'";
    // List all the zones that start with the same letter as the user defined input
    $zne = "select zone from postal_zone where postal like '".substr($postal_code, 0, 1)."%'";


    More to come....

  9. #9
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    update numero deux:

    Alright, so I found the problem but I can't fix it. Something is going on with the shipping rates that zen-cart seems to be controlling. I verified the calculations in my code and they are popping the final shipping costs properly. Even up to the point where:

    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_PUROLATOR_TEXT_TITLE,
    'methods' => array(array('id' => $this->code,
    'title' => $shipping_method,
    'cost' => $shipping_cost)));

    is called, the $shipping_cost is valid and makes sense. However when it is displayed in the shipping estimator (or checkout, eitherway) the price is always slightly reduced by a certain amount. So something is going on in some script that I'm unaware of.

    any ideas?

  10. #10
    Join Date
    May 2006
    Location
    Montreal, Quebec
    Posts
    41
    Plugin Contributions
    0

    Default Re: Implementing Purolator Shipping Module

    wow am I stupid....


    So turns out the reason why I was getting discrepencies was because..

    DRUM ROOOOLL!!!!!!!!!!


    I didn't change the exchange rate, so I was comparing canadian dollars to US dollars.


    yes....I'm special....in a stupid way.


 

 
Page 1 of 6 123 ... LastLast

Similar Threads

  1. InternetSecure Payment Module RC V3.00 Release
    By IntelCos in forum Addon Payment Modules
    Replies: 0
    Last Post: 4 Jun 2006, 05:22 PM
  2. cardia payment module fails with Group Pricing
    By cakemaker in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 May 2006, 09:51 PM

Bookmarks

Posting Permissions

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