Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42
  1. #31
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Morning,

    It appears this thread is dead...but I shall try my luck.

    I've been using the Fastway NZ module for a while now - and its mostly been working well. However, it breaks when someone enters and incorrect postcode.

    Does anyone have any ideas of how to put a check in place when the customer enters their postcode or how to put a warning in place when the shipping screen come up telling them that they have entered an incorrect postcode?

    Thanks,

    Mike.

  2. #32
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Hi Mike,

    I have not noticed any problems with the fastway module up to now. Mind you putting in all the postcodes was a bit of a nightmare and I am sure some of it is incorrect.

    I think on reflection it would be easier to divide the country up into areas and apply a shipping fee based on areas. Like or me I am in Auckland so I might have one for Auckland, Another for the rest of the North Island and another for the South Island. Trying to get the extra for rural shipping is hard also so may have to just go with the swings and roundabouts.

    Do you sell by weight, quantity etc?

    John

  3. #33
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Hi,

    We are based in Auckland. I have zones related to post code for the Fastway zones ie, metro, SH, NI, SI and also Auckland Rural, SHR, NIR and SI Rural - and all is working well - apart from those who enter an incorrect postcode getting stuck at checkout.

    I though this code would stop that...

    // First get the dest zip and check the db for our dest zone
    $topcode = $order->delivery['postcode'];

    if ( $topcode == '' ){
    // Something is wrong, we didn't find any dest zip
    $this->quotes['error'] = MODULE_SHIPPING_FASTWAY_NO_POSTCODE_FOUND;
    return $this->quotes;

    but apparently it doesn't do what I thought it did...

    Thanks,

    Mike

  4. #34
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Oh, sorry, forgot to answer your question, I charge by weight.

    Regards,

    Mike.

  5. #35
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Your not reading all the code required.

    PHP Code:
    // First get the dest zip and check the db for our dest zone
        
    $topcode $order->delivery['postcode'];

    if ( 
    $topcode == '' ){
    // Something is wrong, we didn't find any dest zip
        
    $this->quotes['error'] = MODULE_SHIPPING_FASTWAY_NO_POSTCODE_FOUND;
            return 
    $this->quotes;
    }

    // This section has been modified so that the delivery days will display as expected.
    //The original code is still shown for reference.
    //
    //$sql = "SELECT * FROM " . DB_PREFIX . "fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    //$rec = $db->Execute($sql); 
    //
    //    if ($rec->fields['f_delivery'] = 'S/D') {
    //    $days = 'same';
    //    }
    //    if ($rec->fields['f_delivery'] = 'N/D') {
    //    $days = 'next';
    //    } else {
    //    $days = $rec['f_delivery'];
    //}
    //
    $sql "SELECT * FROM " DB_PREFIX "fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
    $rec $db->Execute($sql); 

        if (
    $rec->fields['f_delivery'] == '') {
        
    $days 'unknown';
        }
        if (
    $rec->fields['f_delivery'] == 'S/D') {
        
    $days 'same';
        }
        if (
    $rec->fields['f_delivery'] == 'N/D') {
        
    $days 'next';
        }
        else {
        
    $days = ($rec->fields['f_delivery']);
        }
        if (
    $rec->fields['f_zone'] == '1') {
            
    $shipping = -1;
            
    $dest_zone 1;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_1_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_1_HANDLING');
    }
    elseif (
    $rec->fields['f_zone'] == '2') {
            
    $shipping = -1;
            
    $dest_zone 2;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_2_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_2_HANDLING');
    }
    elseif (
    $rec->fields['f_zone'] == '3') {
            
    $shipping = -1;
            
    $dest_zone 3;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_3_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_3_HANDLING');
    }
    elseif (
    $rec->fields['f_zone'] == '4') {;
            
    $shipping = -1;
            
    $dest_zone 4;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_4_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_4_HANDLING');
    }
    elseif (
    $rec->fields['f_zone'] == 'L') {
            
    $shipping = -1;
            
    $dest_zone 5;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_LOCAL_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_LOCAL_HANDLING');
    }
    elseif (
    $rec->fields['f_zone'] == 'S/H') {
            
    $shipping = -1;
            
    $dest_zone 6;
            
    $zones_cost constant('MODULE_SHIPPING_ZONE_SHORT_COST');
            
    $zones_handling constant('MODULE_SHIPPING_ZONE_SHORT_HANDLING');
    } else {
            
    // Something is wrong, we didn't find any zone
            
    $this->quotes['error'] = MODULE_SHIPPING_FASTWAY_NO_ZONE_FOUND;
            return 
    $this->quotes;
           } 
    You will note that I have modified part of my code so that the delivery days tests and displays properly. This may be your problem.

    Regards

    Fred

  6. #36
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Hi,

    Thanks Fred, I've sorted that bit of code, but it doesn't address the problem I'm having.

    What I need is a piece of code that says: If the post code the customer has entered doesn't exist in the database, display an error and a link to the postcode finder. I've tried, but I'm not that good at (read not any good) at PHP. Any ideas?

    Thanks,

    Mike.

  7. #37
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    I have tested my fastways module and it does the following:

    Displays the following error if the postcode is invalid or there is no other valid shipping method available. This message appears at step 1 of the checkout process.

    Shipping Method:

    This is currently the only shipping method available to use on this order.



    Regards

    Fred

  8. #38
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    After checking the code I noted that the module actually doesn't test for the postcode, it only checks for a valid zone.

    I will add some new code so that it tests for a valid postcode over the next few days. I can't do it immediately as I am busy fixing a problem with my primary server. That's unless someone else wants to volunteer to write the new bit of code themselves.

    Regards

    Fred

  9. #39
    Join Date
    Mar 2009
    Location
    New Zealand
    Posts
    54
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    Thanks Fred,

    Send me a PM with your address and I will send you a jar of Honey.

    I've changed define('TEXT_ENTER_SHIPPING_INFORMATION' to have a message about why the customer can not proceed with their order (IE issue with their postcode) and to please update their account with their correct postcode from NZ Postcode finder.

    Just wondering how many other people have this issue - I've had it come up a few times. Customers have contacted me after being able to proceed with their orders - all of whom have entered incorrect postcode details at the login stage. I know it has also cost me a few orders...

    Now I just have to find a way to stop customers entering invalid postcodes in the first place - but I guess that will have to happen in another thread.

    Regards,

    Mike.

  10. #40
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    Default Re: Shipping in NZ - help to figure this out

    As the module stands, and please remember I am not the author. This is from testing. If a customer enters a postcode that isn't in your database then the customer will receive the following message.

    Shipping Method:

    This is currently the only shipping method available to use on this order.

    Your list of shipping methods will appear without the fastways module. We have fastways and store pickup only.

    However, this does mean that your database must be accurate and have only valid postcodes for the zones you are using.

    So in effect the fastways module is working, it just isn't telling anyone why it isn't available if an invalid postcode is used.

    But as stated, I will have a go at seeing what I can do to remedy that problem.

    Regards

    Fred

 

 
Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. Postcode validation on login with Fastway modules.
    By mikecnz in forum Addon Shipping Modules
    Replies: 2
    Last Post: 17 Nov 2010, 11:23 PM
  2. Basic postcode-based shipping?
    By Lyte in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 16 May 2010, 05:09 PM
  3. Calculating shipping based on postcode (uk)
    By Dunk in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 13 Nov 2008, 02:16 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR