Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    If anyone is interested , or having Interlink do their shipping , I have now altered the original mod to create a true CSV file that the ship@ease client accepts , alo included order comments on the outputted labels , and give you the option to only print labels for certain shipment types.

    James or Calljj still gets the respect he deserves for creating this original mod, I have simply altered it with help from the IT guys at Interlink to fit thier product.
    Various Zen cart sites !

  2. #12
    Join Date
    Feb 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Hi,

    I am trying to do the same thing myself at the moment. Do you have the module you have worked on publicly available? I spotted this mod:- Geopost/Interlink SHIP@EASEIintegration, but it hasn't been updated since 2007.

    There dosnt seem to be a great deal of open source out there yet to work with Interlink Express.

    Mik

  3. #13
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Here is the altered file , its set up for how I need to use it , but its commented in places and pretty generic anyway. Any problems let me know and I will see if I can help.
    PHP Code:
    <?php
    /**
     * shipease.php
     *
     * @package ship @ ease
     * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @copyright Portions Copyright 2003 Andrew Berezin 
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: shipease.php, v 1.0 15.8.2007 5:54 James Fitch [email protected]$
     
    /*

    TODO List

    */
        
    require('includes/application_top.php');

        @
    define('SHIP_EASE_DIRECTORY''ship/');
        @
    define('SHIP_EASE_OUTPUT_BUFFER_MAXSIZE'1024*1024);
        @
    define('SHIP_EASE_USE_CPATH''false');

        
    define('NL'"<br />\n");

    $count=0;

        require(
    zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] .'/''shipease.php''false'));

        echo 
    TEXT_SHIP_EASE_STARTED NL;
        echo 
    TEXT_SHIP_EASE_FILE_LOCATION DIR_FS_CATALOG SHIP_EASE_DIRECTORY SHIP_EASE_OUTPUT_FILENAME NL;

    if (isset(
    $_GET['feed']) && $_GET['feed'] == "yes") {
        if (
    is_dir(DIR_FS_CATALOG SHIP_EASE_DIRECTORY)) {
            if (!
    is_writeable(DIR_FS_CATALOG SHIP_EASE_DIRECTORY)) {
                echo 
    ERROR_SHIP_EASE_DIRECTORY_NOT_WRITEABLE NL;
                die;
            }
        } else {
            echo 
    ERROR_SHIP_EASE_DIRECTORY_DOES_NOT_EXIST NL;
            die;
        }

        
    $stimer_feed microtime_float();
        @
    set_time_limit(0);

        
    $output_buffer "";

        if(!
    zen_ship_fwrite('''open')) {
            echo 
    ERROR_SHIP_EASE_OPEN_FILE NL;
            die;
        }



        
    $orders_query "SELECT * 
     FROM " 
    TABLE_ORDERS 
     ORDER BY orders_id ASC"
    ;


    $stimer microtime_float();
        
    $orders $db->Execute($orders_query);
    $timer['$orders->mySQL'] += microtime_float()-$stimer;

        while (!
    $orders->EOF) {

    $statustoship=$orders->fields['orders_status'];
    $datestatus $orders->fields['date_purchased'];
    $shiptype $orders->fields['shipping_module_code'];

    $sum=0;
    $totalweight =0;



    //if ($statustoship <SHIP_EASE_STATUS) { this was the original line
    // the next line means it only creates the file for those orders set to SHIP_EASE_STATUS ( processing ) 
    if ($statustoship == SHIP_EASE_STATUS) { 
    //if (($statustoship == SHIP_EASE_STATUS) and ($shiptype != "rm1stpacketsf")) {   I use this to not ship stuff sent royalmail

    $orderid=$orders->fields['orders_id'];

    $proid_query="SELECT *
    FROM " 
    TABLE_ORDERS_PRODUCTS " as t1 WHERE t1.orders_id = $orderid";
    // next line grabs the comments to output on the interlink labels
    $comments_query ="SELECT comments FROM orders_status_history WHERE `orders_id` = $orderid ORDER BY orders_status_history_id
    LIMIT 1"
    ;


    $Orderedproduct $db->Execute($proid_query);
    // sum total weight

    while (!$Orderedproduct->EOF) {

    $prodid $Orderedproduct->fields['products_id'];
    $prodnum $Orderedproduct->fields['products_quantity'];

    $Ordercomments $db->Execute($comments_query);
    $actualcomment1 substr($Ordercomments->fields['comments'], 025);$Ordercomments->fields['comments'];
    $actualcomment2 substr($Ordercomments->fields['comments'], 2525);$Ordercomments->fields['comments'];

    $proids_query="SELECT *
    FROM " 
    TABLE_PRODUCTS." as t2 WHERE t2.products_id = $prodid ";

    $Orderedproductweight $db->Execute($proids_query) ;

    $sum $Orderedproductweight->fields['products_weight'];

    $sum=$sum $prodnum;

    $totalweight=$totalweight+$sum;


    $Orderedproduct->MoveNext();

    }


    if (
    $totalweight SHIP_EASE_MINWEIGHT) {
    if (
    $totalweight SHIP_EASE_MAXWEIGHT) {






    $stimer microtime_float();
        
    $orderref=$orders->fields['orders_id'];    

            
    $output = array();
            
    $output["orderid"]="000$orderref";
            
    $output["jobtype"]= SHIP_EASE_JOB;
            
    $output["custacc"]= SHIP_EASE_ACC;
            
    $output["title"] = zen_ship_sanita($orders->fields['customers_name'], true);
            
    $output["address1"] = zen_ship_sanita($orders->fields['delivery_street_address']);
            
    $output["address2"] = zen_ship_sanita($orders->fields['delivery_suburb']);
            
    $output["town"] = zen_ship_sanita($orders->fields['delivery_city']);
            
    $output["county"] = zen_ship_sanita($orders->fields['delivery_state']);
            
    $output["Postcode"] = zen_ship_sanita($orders->fields['delivery_postcode']);
            
    $output["Instructions"] = zen_ship_sanita($actualcomment1);
            
    $output["Instructions2"] = zen_ship_sanita($actualcomment2);
            
    $output["Qtyoflabels"] = SHIP_EASE_QUAN;
            
    $output["Service"] =SHIP_EASE_CODE ;
            
    //$output["Timeslot"] ="" ;
            //$output["total_weight"] = $totalweight;
            
    $output["total_weight"] = 1// I set the total weight to 1kg but you can have this as teh line above
            
    $output["Delivery_date"] = $orders->fields['date_purchased'];
            
    $output["User_Field_1"] = zen_ship_sanita(SHIP_EASE_INFO);
            
    $output["User_Field_2"] ="";
            
    $output["Workstn"] ="";
            
    $output["Email"] =zen_ship_sanita($orders->fields['customers_email_address']);
            
    $output["Email2"] ="";
            
    $output["Telephone"] =SHIP_EASE_TEL;
            
    $output["Contact"] ="";
            
    $output["Description"] ="";
            
    $output["Currency"] ="";
            
    $output["Consignment value"] =($orders->fields['order_total']);
            
    $output["Country"] =zen_ship_sanita($orders->fields['delivery_country']);
            
    $output["Insurance"] =zen_ship_sanita(SHIP_EASE_INS);
            
    $output["Userfield 3"] ="";
            
    $output["Userfield 4"] ="";
            
    $output["Account"] =000;
            
    zen_ship_fwrite($output);

    $count=$count+1;
        
    }

    }

    }


    $stimer microtime_float();
            
    $orders->MoveNext();

    $timer['$orders->mySQL'] += microtime_float()-$stimer;
    }
        


    zen_ship_fwrite('''close');

    //    @chmod(DIR_FS_CATALOG . SHIP_EASE_DIRECTORY . SHIP_EASE_OUTPUT_FILENAME, 0644);

    $timer_feed microtime_float()-$stimer_feed;
    $percent_other 0;
    $time_other $timer_feed;
    if(
    SHIP_EASE_STAT === true) {
        echo 
    'Execution time:<br />';
        echo 
    '<table cellspace="2" border="1px">';
        echo 
    '<tr><td>Function</td><td>Execution time</td><td>Percent</td></tr>';
        foreach(
    $timer as $func => $time) {
            
    $percent_total += ($time*100)/$timer_feed;
            
    $time_other -= $time;
            echo 
    '<tr><td>' $func '</td><td align="right">' number_format($time6) . '</td><td align="right">' round(($time*100)/$timer_feed2) . '%</td></tr>';
        }
        echo 
    '<tr><td><i>Other</i></td><td align="right"><i>' number_format($time_other6) . '</i></td><td align="right"><i>' round(($time_other*100)/$timer_feed2) . '%</i></td></tr>';
        echo 
    '<tr><td><b>Total</b></td><td align="right"><b>' number_format($timer_feed6) . '</b></td><td align="right"><b>' round(($timer_feed*100)/$timer_feed2) . '%</b></td></tr>';
        echo 
    '</table>';
    }
    //$orders->RecordCount()
        
    echo TEXT_SHIP_EASE_FEED_COMPLETE ' ' SHIP_EASE_TIME_TAKEN ' ' sprintf("%f " TEXT_SHIP_EASE_FEED_SECONDSnumber_format($timer_feed6) ) . ' ' $count TEXT_SHIP_EASE_FEED_RECORDS NL;

    }

        function 
    zen_ship_fwrite($output$op='fwrite') {
            global 
    $timer;$stimer microtime_float();
            static 
    $fp;
            static 
    $output_buffer "";
            static 
    $title_row false;
            switch (
    $op) {
                case 
    'open':
                    
    $retval $fp fopen(DIR_FS_CATALOG SHIP_EASE_DIRECTORY SHIP_EASE_OUTPUT_FILENAME"wb");
                    break;
                case 
    'fwrite':
                    if(!
    $title_row) {
                        
    $title_row $output;
                    }
                    
    $buf = array();
                    foreach(
    $title_row as $key=>$val) {
                        
    $buf[] = (isset($output[$key]) ? $output[$key] : '');
    //                    var_dump($key, $output[$key]);echo '<br />';
                    
    }
                    
    $output implode(","$buf);
                    if(
    strlen($output_buffer) > SHIP_EASE_OUTPUT_BUFFER_MAXSIZE) {
                        
    $retval fwrite($fp$output_bufferstrlen($output_buffer));
                        
    $output_buffer "";
                    }
                    
    //$output = rtrim($output) . "\n";
                    
    $output rtrim($output) . "\r\n";
                        if(
    strtolower(CHARSET) != 'utf-8')
                        
    $output_buffer .= utf8_encode($output);
                    else
                        
    $output_buffer .= $output;
                    break;
                case 
    'close':
                    if(
    strlen($output_buffer) > 0) {
                        
    $retval fwrite($fp$output_bufferstrlen($output_buffer));
                        
    $output_buffer "";
                    }
                    
    fclose($fp);
                    break;
            }
            
    $timer[__FUNCTION__] += microtime_float()-$stimer;
            return 
    $retval;
        }

        function 
    zen_ship_sanita($str$rt=false) {
            global 
    $timer;$stimer microtime_float();
            
    $str strip_tags($str);
            
    $str str_replace(array("\t" "\n""\r"), ' '$str);
            
    $str str_replace(","" "$str); 
            
    $str preg_replace('/\s\s+/'' '$str);
    //    $str = str_replace(array("&reg;", "®", "&copy;", "©", "&trade;", "™"), ' ', $str);
            
    $str htmlentities(html_entity_decode($str));
            
    $in $out = array();
            
    $in[] = "&reg;"$out[] = '(r)';
            
    $in[] = "&copy;"$out[] = '(c)';
            
    $in[] = "&trade;"$out[] = '(tm)';
    //        $str = str_replace($in, $out, $str);
            
    if($rt$str str_replace(array('>'), ' '$str);
            
    $str trim($str);
            
    //$str =  "\"$str\"";

            
    $timer[__FUNCTION__] += microtime_float()-$stimer;
            return 
    $str;
        }


        function 
    ftp_get_error_from_ob() {
            
    $out ob_get_contents();
            
    ob_end_clean();
            
    $out str_replace(array('\\''<!--error-->''<br>''<br />'"\n"'in <b>'),array('/'''''''''''),$out);
            if(
    strpos($outDIR_FS_CATALOG) !== false){
                
    $out substr($out0strpos($outDIR_FS_CATALOG));
        }    
            return 
    $out;
        }

    function 
    microtime_float() {
       list(
    $usec$sec) = explode(" "microtime());
       return ((float)
    $usec + (float)$sec);
    }
    ?>
    Various Zen cart sites !

  4. #14
    Join Date
    Dec 2007
    Location
    London
    Posts
    184
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Hi,

    Someone asked this earlier in the thread but I couldn't see a reply...

    Is this mod in any way compatible with Interlink's Ship@Ease online system or do we need to use their standalone software? We were never offered this software when we switched to Interlink but I guess it's available from their IT dept.

    We've been manually entering details into the online version of Interlink's Ship@Ease system for a while but order volumes have reached the point where we really need to automate the process.

  5. #15
    Join Date
    Nov 2009
    Posts
    80
    Plugin Contributions
    2

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    A bit late but you can download the most up-to-date version from here...http://www.stevedunne.co.uk/dsl/index.htm (the creator)

    Along with good interfacing guides. You will however need to contact interlink/dpd/geopost for master access codes to input your contract/acc number, label settings etc.

    we took our own tack and set up buttons within the orders to simply extract the address information and service from the database, then used ssh2 for php extension to directly send the files to the computer where the software/thermal printers live.

    Cheers

  6. #16
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Desperate for a working version of this on 1.5+

    Does anyone know what needs to be changed for this to work?

  7. #17
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    In case someone comes across this post looking for the same thing, I am currently writing a shipping module which connects to the API to insert the shipping details ready to print the labels. I will package it up into an add on at some point and upload it.

  8. #18
    Join Date
    Apr 2011
    Posts
    18
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Hi Joe

    I am looking to implement interlink shipping so that would be really great. What are you using for the rating? Do you have API access for this?

    Thanks for any help etc!

    Simon

  9. #19
    Join Date
    Aug 2011
    Posts
    121
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Hi,

    I'm not sure if you need interlink to enable access, or if it is already enabled. The username and password for the API is the same as the one you will use to log in to their control panel.

    What I have done, is added the code which will add the shipment to Interlink to the checkout_process.php file just after emails are sent out.

    It is one class file, and one file you will need to insert code into. If you have multiple payment methods, you will need to put the code in the relevant checkout_process files.

    My code is a bit bodged at the moment, and can be done better. I can't guarantee how well it's going to work for you either, but it's a place to start

    http://www.imglnk.uk/files/zencart_interlink_v0.1.zip

    It works fine for us at the moment, new orders automatically get put into the "Shipment Review" page on interlink, you will likely need to go in and amend the service you require.
    Last edited by joecooper; 24 Nov 2015 at 01:52 PM.

  10. #20
    Join Date
    Apr 2011
    Posts
    18
    Plugin Contributions
    0

    Default Re: Interlink /Geopost Ship@Ease Export Module for Zen

    Hi That is great I will give that a go.

    Thanks

    Simon

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Multiple Ship - From addresses for Shipping (UPS module)
    By samueljjs in forum Addon Shipping Modules
    Replies: 1
    Last Post: 22 Apr 2014, 03:03 PM
  2. Sage Line 50 Zen export module
    By Calljj in forum All Other Contributions/Addons
    Replies: 78
    Last Post: 15 Jan 2013, 11:07 AM
  3. Candapost Desktop EST Export module - does not export
    By oxxyfx in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Sep 2009, 02:11 PM
  4. Color key for ship module icons?
    By Woodymon in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 1 Jun 2007, 04:32 AM
  5. Miva to Zen Cart transition ease?
    By mikejs in forum General Questions
    Replies: 1
    Last Post: 1 Jun 2006, 11:48 AM

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