Page 9 of 9 FirstFirst ... 789
Results 81 to 85 of 85
  1. #81
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    database error Re: help with Fastway Shipping Module

    Need to be changed to
    if ($rec->fields['f_delivery'] == 'xxx') {

    For this code to have any hope of working.
    OK, so I have tested the suggestion mentioned. It simply gives me a blank page.

    The original code in the includes/modules/shipping/fastway.php file reads
    PHP Code:
    $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'];

    It is plainly obvious that this module is not working as originally intended (given that it was modified from the original OSC fastway module). Given I am not a coder I feel I have little choice but to attempt to get this module working properly anyway.

    What logs am I looking at to establish where the code is failing, that's if it is logging anything.

    What tools can I used to assist me in getting this module to work?
    What other resources can/should I be using?

    Regards

    Fred

  2. #82
    Join Date
    Jan 2007
    Posts
    66
    Plugin Contributions
    0

    Default Re: help with Fastway Shipping Module

    After some considerable help from a programmer friend of mine I have a solution to the shipping days problem.

    PHP Code:
    $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']); 
        } 
    I am now working on the rest of the module for correct function. These include the use of f-region and f-suburb to validate the customers address.

    I suspect f-satchel isn't working either.

    Regards

    Fred

  3. #83
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: help with Fastway Shipping Module

    Quote Originally Posted by FredZ View Post
    if ($rec->fields['f_delivery'] == '') {
    $days = 'unknown';
    This line isn't needed. It does nothing useful.
    The 'else' part of the code takes care of the 'unknown'.
    Quote Originally Posted by FredZ View Post
    if ($rec->fields['f_delivery'] == 'S/D') {
    $days = 'same';
    }
    This MAY get set, but it get's reset by the next couple of lines. This is a coding error/bug
    Last edited by RodG; 1 Jul 2010 at 04:19 AM.

  4. #84
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: help with Fastway Shipping Module

    Quote Originally Posted by FredZ View Post
    OK, so I have tested the suggestion mentioned. It simply gives me a blank page.
    Must've done something wrong.

    Quote Originally Posted by FredZ View Post
    The original code in the includes/modules/shipping/fastway.php file reads
    PHP Code:
    $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'];

    You only had to make two changes to fix this. (adding the '=')

    PHP Code:
    $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'];


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

    Default Re: help with Fastway Shipping Module

    Quote Originally Posted by RodG View Post
    Must've done something wrong.



    You only had to make two changes to fix this. (adding the '=')

    PHP Code:
    $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'];


    Not at all. If I simply added the = signs as mentioned all I got was a blank page. I needed to modify the last line to get it to display the contents of f-delivery

    Regards

    Fred

 

 
Page 9 of 9 FirstFirst ... 789

Similar Threads

  1. Fastway Courier, PostCode based shipping method
    By FredZ in forum Addon Shipping Modules
    Replies: 41
    Last Post: 24 Apr 2012, 05:24 AM
  2. Postcode validation on login with Fastway modules.
    By mikecnz in forum Addon Shipping Modules
    Replies: 2
    Last Post: 17 Nov 2010, 11:23 PM
  3. Help with shipping module
    By estyles in forum Built-in Shipping and Payment Modules
    Replies: 11
    Last Post: 26 Sep 2010, 07:40 AM
  4. Help with shipping module
    By atheights in forum Addon Shipping Modules
    Replies: 5
    Last Post: 13 Sep 2010, 10:51 AM
  5. Help With Shipping Module
    By dukecomputerwiz in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 30 Sep 2009, 06:00 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