Jump to content
Dr. Rolex

jQuery/Ajax Advanced Order Handler for osCommerce 2.3.3

Recommended Posts

Hi,

I have a problem with product quantities when printing multiple invoices. I have not been able find fix for this and not sure if this is a bug or install problem.
If I choose to print multiple invoices and first invoice has 3 different products and rest has only 1 product when printing these out all will show 3 products.
Order totals are correct in all invoices, but all invoices shows 3 products even when there should be only 1 product.


Best regards,
Antti

Share this post


Link to post
Share on other sites

I cannot figure this out.

I am on 2.3.3.4BS - Gary Burton Edition

 

The left_column and the text in the header are EXTREMELY Small

It's as if something has been altered in the css, but the add-on only adds to the css. It doesn't change anything.

PLEASE! PLEASE! Help

Share this post


Link to post
Share on other sites

Hi,

 

I have a problem with product quantities when printing multiple invoices. I have not been able find fix for this and not sure if this is a bug or install problem.

If I choose to print multiple invoices and first invoice has 3 different products and rest has only 1 product when printing these out all will show 3 products.

Order totals are correct in all invoices, but all invoices shows 3 products even when there should be only 1 product.

 

 

Best regards,

Antti

 

Which PHP MySQL Module are you using? Regular (php5-mysql) or Native Driver (php5-mysqlnd)?

 

I'm guessing that you're using the older php5-mysql Module, so if this is true then you should start by installing php5-mysqlnd instead.

 

Anyhow, I notice that there was some errors in two pages that are used in the "Compatible without mysqlnd" release of this Add-On.

 

​Replace those files with the code below and I think that should solve your problems.

 

Replace admin/includes/modules/order_handler/general_functions.php With This:

<?php
/*
  Advanced Order Handler Rev3 for osCommerce 2.3.3
  Copyright (C) 2014  Jonas jonas@jholmster.com

  This file is part of Advanced Order Handler Rev3.

  Advanced Order Handler Rev3 is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  Advanced Order Handler Rev3 is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Advanced Order Handler Rev3.  If not, see <http://www.gnu.org/licenses/>.
*/

////
// The HTML href link with Static Content
  function tep_static_link($script, $type, $catalog = false, $cookieless = '', $version = null, $connection = 'SSL') {

    if ($catalog == true)
      $script = tep_catalog_href_link($script, (is_numeric($version) ? $version : ''), $connection);
    else
      $script = (($cookieless == true) ? HTTP_COOKIELESS_DOMAIN : '') . $script;
    if ($type == 'script')
      return '<script src="' . (($cookieless == true) ? HTTP_COOKIELESS_DOMAIN : '') . $script . '"></script>';

    if ($type == 'link')
      return '<link rel="stylesheet" href="' . (($cookieless == true) ? HTTP_COOKIELESS_DOMAIN : '') . $script . '" />';

    return "No link found";
  }

  function tep_address($address_format, $address, $html, $boln, $eoln, $skip_name = false) {
    $company = tep_output_string_protected($address['company']);
    if ( ! $skip_name ) {
      if (isset($address['firstname']) && tep_not_null($address['firstname'])) {
        $firstname = tep_output_string_protected($address['firstname']);
        $lastname = tep_output_string_protected($address['lastname']);
      } elseif (isset($address['name']) && tep_not_null($address['name'])) {
        $firstname = tep_output_string_protected($address['name']);
        $lastname = '';
      } else {
        $firstname = '';
        $lastname = '';
      }
    }
    $street = tep_output_string_protected($address['street_address']);
    $suburb = tep_output_string_protected($address['suburb']);
    $city = tep_output_string_protected($address['city']);
    $state = tep_output_string_protected($address['state']);
    if (isset($address['country_id']) && tep_not_null($address['country_id'])) {
      $country = tep_get_country_name($address['country_id']);

      if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) {
        $state = tep_get_zone_code($address['country_id'], $address['zone_id'], $state);
      }
    } elseif (isset($address['country']) && tep_not_null($address['country'])) {
      $country = tep_output_string_protected($address['country']);
    } else {
      $country = '';
    }
    $postcode = tep_output_string_protected($address['postcode']);
    $zip = $postcode;

    if ($html) {
// HTML Mode
      $HR = '<hr />';
      $hr = '<hr />';
      if ( ($boln == '') && ($eoln == "\n") ) { // Values not specified, use rational defaults
        $CR = '<br />';
        $cr = '<br />';
        $eoln = $cr;
      } else { // Use values supplied
        $CR = $eoln . $boln;
        $cr = $CR;
      }
    } else {
// Text Mode
      $CR = $eoln;
      $cr = $CR;
      $HR = '----------------------------------------';
      $hr = '----------------------------------------';
    }

    $statecomma = '';
    $streets = $street;
    if ($suburb != '') $streets = $street . $cr . $suburb;
    if ($country == '') $country = tep_output_string_protected($address['country']);
    if ($state != '') $statecomma = $state . ', ';

    $fmt = $address_format;
    eval("\$address = \"$fmt\";");

    if ( (ACCOUNT_COMPANY == 'true') && (tep_not_null($company)) ) {
      $address = $company . $cr . $address;
    }

    return $address;
  }

////
// Returns AJAX Editable Address
// TABLES: address_format
  function tep_editable_address( $address_format_id, $address, $html, $boln = '', $eoln = '', $ajax = '' ) {
    $tablename_af   = TABLE_ADDRESS_FORMAT;
    $address_format = mysqli_prepared_query( "SELECT address_format AS format FROM $tablename_af WHERE address_format_id = ?", "i", array( $address_format_id ) );

    $company        = ( ( isset( $address['company'] ) && $address['company'] != '' ) ? ( ( $ajax != '' ) ? '<span id="company" data-table="orders" data-field="'.$ajax.'company" class="ajaxLink">' : '' ) . tep_output_htmlspecialchars( $address['company'] ) . ( ( $ajax != '' ) ? '</span>' : '' ) : '' );
    if ( isset( $address['firstname'] ) && tep_not_null( $address['firstname'] ) ) {
      $firstname      = tep_output_htmlspecialchars( $address['firstname'] );
      $lastname       = tep_output_htmlspecialchars( $address['lastname'] );
    } elseif ( isset( $address['name'] ) && tep_not_null( $address['name'] ) ) {
      $firstname      = ( ( $ajax != '' ) ? '<span id="delivery_name" data-table="orders" data-field="'.$ajax.'name" class="ajaxLink">' : '' ) . tep_output_htmlspecialchars( $address['name'] ) . ( ( $ajax != '' ) ? '</span>' : '' );
      $lastname       = '';
    } else {
      $firstname      = '';
      $lastname       = '';
    }
    $street         = ( ( $ajax != '' ) ? '<span id="street_address" data-table="orders" data-field="'.$ajax.'street_address" class="ajaxLink">' : '' ) . tep_output_htmlspecialchars( $address['street_address'] ) . ( ( $ajax != '' ) ? '</span>' : '' );

    //Suburb
    $suburb         = ! empty( $ajax ) ? '<span id="suburb" data-table="orders" data-field="'.$ajax.'suburb" class="ajaxLink">' : '';
    if ( isset( $address['suburb'] ) && ! empty( $address['suburb'] ) ) {
      $suburb         .= tep_output_htmlspecialchars( $address['suburb'] ) . ( ! empty( $ajax ) ? '</span>' : '' );
    } elseif ( ! empty( $ajax ) ) {
      $suburb         .= '___</span>';
    }

    $city       = ( ( $ajax != '' ) ? '<span id="city" data-table="orders" data-field="'.$ajax.'city" class="ajaxLink">' : '' ) . ( isset( $address['city'] ) ? tep_output_htmlspecialchars( $address['city'] ) : '' ) . ( ( $ajax != '' ) ? '</span>' : '' );
    $state      = ( ( $ajax != '' ) ? '<span id="state" data-table="orders" data-field="'.$ajax.'state" class="ajaxLink">' : '' ) . ( isset( $address['state'] ) ? tep_output_htmlspecialchars( $address['state'] ) : '' ) . ( ( $ajax != '' ) ? '</span>' : '' );
    if ( isset( $address['country_id'] ) && tep_not_null( $address['country_id'] ) ) {
      $country  = tep_get_country_name( $address['country_id'] );

      if ( isset( $address['zone_id'] ) && tep_not_null( $address['zone_id'] ) ) {
        $state  = tep_get_zone_code( $address['country_id'], $address['zone_id'], $state );
      }
    } elseif ( isset( $address['country'] ) && tep_not_null( $address['country'] ) ) {
      $country_name = ( is_array( $address['country'] ) ? $address['country']['title'] : $address['country'] );
      $country  = ( ( $ajax != '' ) ? '<span id="country" data-table="orders" data-field="'.$ajax.'country" class="ajaxLink">' : '' ) . tep_output_htmlspecialchars( $country_name ) . ( ( $ajax != '' ) ? '</span>' : '' );
    } else {
      $country  = '';
    }
    $postcode   = ( ( $ajax != '' ) ? '<span id="postcode" data-table="orders" data-field="'.$ajax.'postcode" class="ajaxLink">' : '' ) . tep_output_htmlspecialchars( $address['postcode'] ) . ( ( $ajax != '' ) ? '</span>' : '' );
    $zip        = $postcode;

    if ( $html ) {
      // HTML Mode
      $HR = '<hr />';
      $hr = '<hr />';
      if ( ( $boln == '' ) && ( $eoln == "\n" ) ) { // Values not specified, use rational defaults
        $CR = '<br />';
        $cr = '<br />';
        $eoln = $cr;
      } else { // Use values supplied
        $CR = $eoln . $boln;
        $cr = $CR;
      }
    } else {
      // Text Mode
      $CR = $eoln;
      $cr = $CR;
      $HR = '----------------------------------------';
      $hr = '----------------------------------------';
    }

    $statecomma = '';
    $streets = $street;
    if ( isset( $suburb ) && $suburb != '' ) $streets = $street . $cr . $suburb;
    if ( $country == '' ) $country = tep_output_htmlspecialchars( $address['country'] );
    if ( isset( $address['state'] ) && $address['state'] != '' ) $statecomma = $state . ', ';

    $fmt = $address_format[0]['format'];
    eval( "\$address = \"$fmt\";" );

    if ( ( ACCOUNT_COMPANY == 'true' ) && ( tep_not_null( $company ) ) ) {
      $address = $company . $cr . $address;
    }

    return $address;
  }


////
// Returns an array with countries
// TABLES: countries
  function tep_get_countries_jtable( $link = 'db_link' ) {
    global $$link;

    $countries_array    = '';
    $tablename_c        = TABLE_COUNTRIES;
    $var = array();

    $countries_query    = tep_db_fetch_all( "SELECT countries_name FROM $tablename_c ORDER BY countries_name" );

    $sql="SELECT countries_name AS Value, countries_name AS DisplayText FROM $tablename_c ORDER BY countries_name";

    $rs=$$link->query( $sql );

    if ( $rs === false ) {
      trigger_error( 'Wrong SQL: ' . $sql . ' Error: ' . $$link->error, E_USER_ERROR );
    }

    $rs->data_seek( 0 );
    while ( $row = $rs->fetch_assoc() ) {
      $var[] = $row;
    }

    return substr( json_encode( $var ), 1, -1 );

  }

////
// Returns a jTable formatted pull down menu with payment methods
  function tep_cfg_pull_down_payment( $selected_payment_module = '', $parameters = '', $custom = false, $required = false ) {
    global $language;
    if ( defined( 'MODULE_PAYMENT_INSTALLED' ) && tep_not_null( MODULE_PAYMENT_INSTALLED ) ) {
      $installed_modules       = explode( ';', MODULE_PAYMENT_INSTALLED );

      $include_modules         = array();
      $modules                 = array();

      reset( $modules );
      while ( list( , $value ) = each( $installed_modules ) ) {
        $class                 = substr( $value, 0, strrpos( $value, '.' ) );
        $include_modules[]     = array( 'class' => $class, 'file' => $value );
      }

      for ( $i=0, $n=sizeof( $include_modules ); $i<$n; $i++ ) {
        include_once DIR_FS_CATALOG . DIR_WS_LANGUAGES . $language . '/modules/payment/' . $include_modules[$i]['file'];
        include_once DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];

        $modules[] = new $include_modules[$i]['class'];
      }
    }

    $payment_array = array();
    $default = '';
    $manual_default = '';
    if ( true === $custom ) {
      $payment_array[] =
        array(
        'id' => json_encode( array( "_custom", $selected_payment_module ) ),
        'text' => $selected_payment_module,
      );
    }
    foreach ( $modules as $value ) {
      $payment_array[] =
        array(
        'id' => json_encode( array( $value->code, $value->title ) ),
        'text' => $value->title,
      );

      if ( $selected_payment_module == $value->title ) {
        $default = json_encode( array( $value->code, $selected_payment_module ) );
        $manual_default = $selected_payment_module;
      }
    }

    array_push( $payment_array,
      array(
        'id' => json_encode( array( '_manual', $manual_default ) ),
        'text' => 'Manual Input',
      )
    );

    return tep_draw_pull_down_menu( 'payment_method_selection', $payment_array, $default, $parameters, $required );
  }

////
// Returns a pull down menu with payment methods
  function tep_cfg_pull_down_payment_methods( $payment_module = null ) {

    require DIR_WS_CLASSES . 'payment.php';
    $payment_modules = new payment;
    $selection = $payment_modules->selection();

    if ( sizeof( $selection ) > 1 ) {
      $SelectPaymentBox = '<select name="payment" style="max-width: 300px;">' . "\n";
      for ( $i=0, $n=sizeof( $selection ); $i<$n; $i++ ) {
        $SelectPaymentBox .= '<option value="' . $selection[$i]['id'] .'">' . $selection[$i]['module'];
      }
      $SelectPaymentBox .= "</select>\n";
    } else {
      $SelectPaymentBox = tep_draw_hidden_field( 'payment', $selection[$i]['id'] ) . '<span id="payment_module_selected">' . $selection[$i]['id'] . '</span>';
    }

    return $SelectPaymentBox;
  }

////
// Function used by Shopping Cart Class
  function tep_create_random_value( $length, $type = 'mixed' ) {
    if ( ( $type != 'mixed' ) && ( $type != 'chars' ) && ( $type != 'digits' ) ) $type = 'mixed';

    $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $digits = '0123456789';

    $base = '';

    if ( ( $type == 'mixed' ) || ( $type == 'chars' ) ) {
      $base .= $chars;
    }

    if ( ( $type == 'mixed' ) || ( $type == 'digits' ) ) {
      $base .= $digits;
    }

    $value = '';

    if ( !class_exists( 'PasswordHash' ) ) {
      include DIR_WS_CLASSES . 'passwordhash.php';
    }

    $hasher = new PasswordHash( 10, true );

    do {
      $random = base64_encode( $hasher->get_random_bytes( $length ) );

      for ( $i = 0, $n = strlen( $random ); $i < $n; $i++ ) {
        $char = substr( $random, $i, 1 );

        if ( strpos( $base, $char ) !== false ) {
          $value .= $char;
        }
      }
    } while ( strlen( $value ) < $length );

    if ( strlen( $value ) > $length ) {
      $value = substr( $value, 0, $length );
    }

    return $value;
  }

////
// Return the tax description for a zone / class
// TABLES: tax_rates;
  function tep_get_tax_description( $class_id, $country_id, $zone_id = 0 ) {
    static $tax_rates = array();

    if ( !isset( $tax_rates[$class_id][$country_id][$zone_id]['description'] ) ) {
      $tax_query = tep_db_query( "select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' order by tr.tax_priority" );
      if ( tep_db_num_rows( $tax_query ) ) {
        $tax_description = '';
        while ( $tax = tep_db_fetch_array( $tax_query ) ) {
          $tax_description .= $tax['tax_description'] . ' + ';
        }
        $tax_description = substr( $tax_description, 0, -3 );

        $tax_rates[$class_id][$country_id][$zone_id]['description'] = $tax_description;
      } else {
        $tax_rates[$class_id][$country_id][$zone_id]['description'] = TEXT_UNKNOWN_TAX_RATE;
      }
    }

    return $tax_rates[$class_id][$country_id][$zone_id]['description'];
  }

  function tep_count_modules($modules = '') {
    $count = 0;

    if (empty($modules)) return $count;

    $modules_array = explode(';', $modules);

    for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) {
      $class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.'));

      if (isset($GLOBALS[$class]) && is_object($GLOBALS[$class])) {
        if ($GLOBALS[$class]->enabled) {
          $count++;
        }
      }
    }

    return $count;
  }

  function tep_count_payment_modules() {
    return tep_count_modules(MODULE_PAYMENT_INSTALLED);
  }

  function tep_count_shipping_modules() {
    return tep_count_modules(MODULE_SHIPPING_INSTALLED);
  }

////
// Make a variable javascript compatible - ish1301 at gmail doooot com
  function tep_jsspecialchars( $string = '' ) {
    $string = preg_replace( "/\r*\n/", "\\n", $string );
    $string = preg_replace( "/\//", "\\\/", $string );
    $string = preg_replace( "/\"/", "\\\"", $string );
    $string = preg_replace( "/'/", " ", $string );
    return $string;
  }

////
// Convert special characters to HTML entities
// Will convert both double and single quotes.
// Since the "charset" argument IS case sensitive, CONSTANT CHARSET is avoided
  function tep_output_htmlspecialchars( $string ) {
    return htmlspecialchars( $string, ENT_QUOTES, ( true === mb_http_output() ? mb_http_output() : 'UTF-8' ) );
  }


////
// Invoke Preload Scripts
  function tep_preload_scripts( $countries_iso_code_2, $minimized = false ) {
    if ( $minimized ) {
      echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/01_order_handler_rev3.min.js', 'script', false, false, '0928' );
      if ( file_exists( DIR_WS_MODULES . "order_handler/jTable/localization/jquery.jtable.$countries_iso_code_2.js" ) )
        echo tep_static_link( DIR_WS_MODULES . "order_handler/jTable/localization/jquery.jtable.$countries_iso_code_2.js", 'script', false, false, '0928' );
      return;
    }

  echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/01_01_bootstrap-3.1.1.min.js', 'script', false, false, '0928' );
  echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/01_02_jquery.jtable.js', 'script', false, false, '0928' );

  if ( file_exists( DIR_WS_MODULES . "order_handler/jTable/localization/jquery.jtable.$countries_iso_code_2.js" ) )
    echo tep_static_link( DIR_WS_MODULES . "order_handler/jTable/localization/jquery.jtable.$countries_iso_code_2.js", 'script', false, false, '0928' );

  echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/01_03_order_handler_rev3_module.js', 'script', false, false, '0928' );
  echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/01_04_jquery.cookie.js', 'script', false, false, '0928' );
  }

////
// Invoke Preload Scripts
  function tep_afterload_scripts( $minimized = false ) {
    if ( $minimized ) {
      echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_order_handler_rev3.min.js', 'script', false, false, '0928' );
      return;
    }

    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_01_jquery.gritter.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_02_jquery.contextMenu.js', 'script', false, false, '0928' );

    // Bootstrap MultiSelect
    // echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_03_bootstrap-3.1.1.min.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_04_bootstrap-multiselect-3.1.1.js', 'script', false, false, '0928' );

    // Qtip
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_05_jquery.qtip.js', 'script', false, false, '0928' );

    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_06_select2.rev3.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_07_icheck.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_08_switchery.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_09_tikslusdialog.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_10_history.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_11_jquery.simplemodal.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_12_amcharts.js', 'script', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/js/02_13_serial.js', 'script', false, false, '0928' );
  }

////
// Invoke CSS
  function tep_load_css( $minimized = false ) {
    if ( $minimized ) {
      echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_order_handler_rev3.min.css', 'link', false, false, '0928' );
      return;
    }

    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_01_font-awesome.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_02_bootstrap-3.1.1.min.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_03_bootstrap-multiselect-3.1.1.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_04_bootstrap-theme-custom.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_05_tikslusdialog.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_06_select2.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_07_red.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_08_jquery.contextMenu.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_09_orange.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_10_jtable-custom.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_11_contact.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_12_jquery.qtip.css', 'link', false, false, '0928' );
    echo tep_static_link( DIR_WS_MODULES . 'order_handler/css/01_13_order_handler.css', 'link', false, false, '0928' );
  }

////
//Error Handling
  function error_message( $title, $message ) {
    $error_message =
      '<script>
          window.opener.oHandler.gritter( "' . $title . '", "' . $message . '", "fa-warning" );
          self.close();
          $( ".progress" ).show();
        </script>';
    die( $error_message );
  }

Replace ./admin/print_batch_process_3.php With This:

<?php
/*
  Advanced Order Handler Rev3 for osCommerce 2.3.3
  Copyright (C) 2014  Jonas jonas@jholmster.com

  This file is part of Advanced Order Handler Rev3.

  Advanced Order Handler Rev3 is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  Advanced Order Handler Rev3 is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with Advanced Order Handler Rev3.  If not, see <http://www.gnu.org/licenses/>.
*/

  require 'includes/application_top.php';
  require_once DIR_WS_MODULES . 'order_handler/general_functions.php';

  require DIR_WS_CLASSES . 'currencies.php';
  $currencies    = new currencies();

  //Define Tables to Variables
  $tablename_o   = TABLE_ORDERS;
  $tablename_ot  = TABLE_ORDERS_TOTAL;
  $tablename_c   = TABLE_COUNTRIES;
  $tablename_osh = TABLE_ORDERS_STATUS_HISTORY;


  unset( $batch_order_numbers );
  if ( $_POST['batch_order_numbers'] ) {
    foreach ( $_POST['batch_order_numbers'] as $order_number => $print_order ) {
      $batch_order_numbers[] = $order_number;
    }
  }

  // Uncomment this if you always want your orders sorted by order number
  //sort( $batch_order_numbers );

  

  if ( !( is_array( $batch_order_numbers ) ) && !isset( $_POST['order_nums'] ) ) {
    error_message( "404: Not Found", "Error: no orders selected!" );
  } else if ( isset( $_POST['batch_delete_x'] ) || isset( $_POST['batch_delete_y'] ) ) {
      include DIR_WS_LANGUAGES . $language . '/order_handler.php';
      if ( isset( $_POST['batch_confirm_x'] ) || isset( $_POST['batch_confirm_y'] ) ) {
        die( include DIR_WS_MODULES . 'order_handler/oc_batch_delete.php' );
      } else {
        die( include DIR_WS_MODULES . 'order_handler/oc_batch_delete_confirm.php' );
      }
    }

  include DIR_WS_MODULES . 'order_handler/order_prepared.php';
  $order = new order;
  
  if ( 'envelope' == $_POST['target_file'] ) {
    require DIR_WS_MODULES . 'order_handler/print_batch_envelope.php';
  } elseif( 'export' == $_POST['target_file'] ) {

      #Export to XML
      header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
      header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
      header("Cache-Control: no-store, no-cache, must-revalidate");
      header("Cache-Control: post-check=0, pre-check=0", false);
      header("Pragma: no-cache");
      header('Content-Type: text/xml');
      header('Content-Disposition: attachment; filename="'.date('Ymdhis').'.xml"');
      $buffer[] = '<?xml version="1.0" encoding="utf-8"?>'."\r\n";
      $buffer[] = '<your_shipping_here>'."\r\n";
      foreach ($batch_order_numbers as $order_id) {
        if($order_id != "null")
        {
          $db_get = "SELECT o.orders_id,o.customers_id,o.customers_name,o.payment_method,o.delivery_name,o.delivery_company,o.delivery_street_address,o.delivery_suburb,o.delivery_city,o.delivery_postcode,o.delivery_state,o.delivery_country,o.customers_telephone,o.customers_email_address,ot.value,c.countries_iso_code_2 FROM $tablename_o o, $tablename_ot ot, $tablename_c c WHERE (o.orders_id = ot.orders_id AND ot.class = 'ot_total') AND (o.orders_id = ? AND o.delivery_country = c.countries_name) ORDER BY orders_id DESC LIMIT 1";
          $db_res = mysqli_prepared_query($db_get, "i", array($order_id));
          $db_ary = $db_res[0];
          $buffer[] = "\t".'<receiver rcvid="'.$db_ary['orders_id'].'">'."\r\n";
          $buffer[] = "\t\t".'<val n="name">'.$db_ary['delivery_name'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="address1">'.$db_ary['delivery_street_address'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="address2">'.$db_ary['delivery_suburb'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="zipcode">'.$db_ary['delivery_postcode'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="city">'.$db_ary['delivery_city'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="country">'.$db_ary['countries_iso_code_2'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="contact">'.$db_ary['customers_name'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="phone">'.$db_ary['customers_telephone'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="email">'.$db_ary['customers_email_address'].'</val>'."\r\n";
          $buffer[] = "\t\t".'<val n="sms">'.$db_ary['customers_telephone'].'</val>'."\r\n";
          $buffer[] = '</val>'."\r\n";
          $buffer[] = "\t\t".'</container>'."\r\n";
          $buffer[] = "\t".'</shipment>'."\r\n";
        }
      }
      $buffer[] = '</your_shipping_here>'."\r\n";
      die( implode('',$buffer) );

    } elseif ( $_POST['target_file'] == 'labels' ) {

      //Create CSV for Envelope
      header( 'Content-type: application/csv' );
      header( 'Content-Disposition: inline; filename="'.date( "ymd" ).'.csv"' );

      echo "Name;Street address;Postcode;City;Country\n";

      $order->prepare_query();

      foreach ( $batch_order_numbers as $order_id ) {
        $order->query( $order_id );

        echo "" . $order->delivery['name'] . ";" . $order->delivery['street_address'] . ";" . $order->delivery['postcode'] . ";" . $order->delivery['city'] . ";" . $order->delivery['country'] . "\n";
      }
      $order->close_query();
      exit;

    }

    $total_invoices = count( $batch_order_numbers );
  ?>
      <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html <?php echo HTML_PARAMS; ?>>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
        <meta name="robots" content="noindex,nofollow">
        <title><?php echo 'Invoices (' . $total_invoices . ')'; ?></title>
        <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

        <script src="<?php echo tep_catalog_href_link( 'ext/jquery/jquery-2.1.0.min.js' ); ?>"></script>
      </head>
      <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
        <div id="ajax_loader" style="display:block;">
          <div id="loader_content">
            <div class="circle"></div>
            <div class="circle1"></div>

            <div class="progress progress-striped active">
              <div class="progress-bar" id="progress-bar"  role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
                <span class="" style="color: rgb(255, 255, 255);font-weight: 400;">0 Updated</span>
              </div>
            </div>
          </div>
        </div>
        <script>
          $( ".progress" ).show();
        </script>

        <?php
    $firstinvoice=1;
    $invoice = 0;

    $order->prepare_query();

    //Let's iterate the Invoices
    foreach ( $batch_order_numbers as $order_id ) {
      $order->query( $order_id );
      if ( $firstinvoice ) {
        $firstinvoice = 0;
      } else {
        echo '<br style="">';
      }

      $invoice++;
      include DIR_WS_MODULES . 'order_handler/print_batch_invoice.php';
    }

    $order->close_query();

  ?>

        <script>
        $(function(){
          $( "#ajax_loader" ).remove();
          // Required for Print Page to work in Chrome
          <?php if ( "true" == $_POST['print'] ) { ?>
            setTimeout( function(){ window.print(); /*window.close();*/ }, 1 );
          <?php } ?>

        });
        </script>
      </body>
      </html>
      <?php
  //}

  // //Close open connections
  // $stmt_se->close();
  // $stmt_o->close();
  // $stmt_ot->close();
  // $stmt_op->close();
  // $stmt_opa->close();

  require DIR_WS_INCLUDES . 'application_bottom.php';

Share this post


Link to post
Share on other sites

I cannot figure this out.

I am on 2.3.3.4BS - Gary Burton Edition

 

The left_column and the text in the header are EXTREMELY Small

It's as if something has been altered in the css, but the add-on only adds to the css. It doesn't change anything.

PLEASE! PLEASE! Help

 

Which browser are you using?

 

In Google Chrome > Right click on the element that has the "wrong" size > select "Inspect Element" (I don't have the correct English term but it should be one of the bottom selections).

 

Now make sure that you're on the "Elements" tab on the left part of the debugger tools and click on the "Computed" tab on the right.

Find the offending CSS attribute and when you do find it, then expand it (by clicking the triangle shaped figure sitting to the left of the attribute).

 

Now you should be able to see what file and specifically which line that made the offending CSS modification.

Share this post


Link to post
Share on other sites

hello there

 

I don't know if someone already mentioned this before but I have 2 questions.

 

1. Advanced Order Handler Rev3 - Envelope Module (16 Jul 2014) is empty. I download it and nothing is there. Would you please let me know where I can download it.

2. Is this package also lets admin to make an order, create order, and create customer??

 

Thanks

Share this post


Link to post
Share on other sites

 

Hello Raz

 

It's not empty, download the latest package from 16 Jul 2014. It contains a Gzip archive containing a xz archive.

So, first extract the downloaded file with your default archiver and then e.g. use 7-Zip to decompress the .xz file to get the installation files.

 

 

 

2. Is this package also lets admin to make an order, create order, and create customer??

 

Thanks

 

You can create orders manually by entering all the details by hand, duplicate old orders (and then edit them if necessary) and create orders for existing customers but I never added a function to add a new customer to the database.

Share this post


Link to post
Share on other sites

When I try to add a new record / order I get this error:

 

An error occured while communicating to the server.

 

This is my php error log:

[15-Jun-2015 21:11:09 America/New_York] PHP Warning:  Missing argument 1 for order::order(), called in /admin/includes/modules/order_handler/ajax_update.php on line 1432 and defined in /admin/includes/classes/order.php on line 16

[15-Jun-2015 21:11:09 America/New_York] PHP Fatal error:  Cannot redeclare class order in /includes/classes/order.php on line 13

I have seen others ask about this, but has there been a solution or any ideas?

Share this post


Link to post
Share on other sites

When I try to add a new record / order I get this error:

 

An error occured while communicating to the server.

 

This is my php error log:

[15-Jun-2015 21:11:09 America/New_York] PHP Warning:  Missing argument 1 for order::order(), called in /admin/includes/modules/order_handler/ajax_update.php on line 1432 and defined in /admin/includes/classes/order.php on line 16

[15-Jun-2015 21:11:09 America/New_York] PHP Fatal error:  Cannot redeclare class order in /includes/classes/order.php on line 13

I have seen others ask about this, but has there been a solution or any ideas?

 

You could start with replacing all these instances in ajax_update.php

include DIR_WS_CLASSES . 'order.php';
require DIR_FS_DOCUMENT_ROOT . DIR_WS_CLASSES . 'order.php';
require DIR_WS_CLASSES . 'shipping.php';
require DIR_WS_CLASSES . 'order_total.php';

To these

include_once DIR_WS_CLASSES . 'order.php';
require_once DIR_FS_DOCUMENT_ROOT . DIR_WS_CLASSES . 'order.php';
require_once DIR_WS_CLASSES . 'shipping.php';
require_once DIR_WS_CLASSES . 'order_total.php';

You can do the same thing if you find more instance of include and require. Change them to include_once and require_once

Share this post


Link to post
Share on other sites

All right, for the past months I've been doing lots of updates and created many new features for this Add-On which I needed for my own shop and now I guess I might have some time to also make a new revision of this Add-On.

 

I've worked on a lot of things but the main reason for me to update the order handler was because I needed it to work with a really wacko tax law on shipping costs that the regime has inflicted upon us [citizens]. The only sane way of doing this was to remake the function that updates order totals to do the same steps as a 'regular' checkout process would if a customer placed the order 'manually'.

 

So long story short

 the order handler now make a (more or less) regular checkout routine on any update to an order that changes order totals. This should fix problems for anyone who get wrong calculations in the updating process and should make it compatible with all shipping & payment modules.

 

There's (of course) much more, here's a selection of new features

 

  • 'Hold Search' - New button which can be used if you want more than one filter to your search, e.g. searching for orders from customers named Adam that also has order status Pending.
  • AmCharts and AmMaps are now both annotatable and can be exported to PNG, JPG, SVG and PDF.
  • AmMap - Animated Javascript Maps with Geographical data from your orders where you can both check orders for individual postal codes/delivery cities or get the data as a heat map with stronger color for regions with more sales
  • Autoresize - <textarea> will automatically grow/shrink when you write.
  • Autosize.js - Comment field <textarea> will now automatically resize when you write
  • Back/Forward buttons in browser will now take you to prev/next order filter/search term
  • Barcode generation on invoices - Order number will be present as a scannable barcode.
  • Comment field can now optionally be displayed in a collapsed jQuery Accordion to save space.
  • Comments field - automatic positioning of cursor.
  • Default comments with automatic positioning of cursor.
  • Default template for textarea which adds 'Hello [Customers_name]' and Signature block
  • Fixed Firefox CSS bug that prevents table cell borders to be displayed
  • Improved Bootstrap style/look for order details
  • jQuery-UI Theme (optional)
  • Locale Support for 29 languages (jTable & AmCharts Translations)
  • Many new ways to filter orders, e.g. search multiple order numbers, orders with specific product, specific customers_id
  • More table fields
  • New 'Advanced Statistics' - AmCharts generated Yearly/Monthly/Daily graphs with
    • Average Order Total per Order
    • Average Orders per Customer
    • Average Purchased Products per Order
    • Customers Average Age
    • Customers with 0 orders
    • New Male/Female Customers
    • Total New Customers  
  • New look for the Right Click Context Menu
  • New Optional Compact Layout
  • New Row/Order Tools - Get a modal with a list of all purchased products from customer
  • New Row/Order Tools - Link to customers page of customer
  • New Row/Order Tools - List all orders from selected customer
  • New Row/Order Tools - Quick comments - Quickly get a tooltip with all order comments
  • New Search Option - Configurable Min/Max Order Totals
  • New Table Field - Customers Age and Date of Birth as Tooltip
  • New Table Field - Number (%) of Returned Orders (or other order status)
  • New Table Field - Number of Orders from Customer
  • Order Management - Make Table Rows Sortable
  • Order Management - Minimize Navbar Size
  • Order Management - Unlock Top/Bottom Navbar Buttons for repositioning
  • Pick list Generated on batch printing invoices
  • Quick change Payment/Shipping Methods
  • Quick Select Order Status from table
  • Quick Select Payment Method from table
  • Quick Select Shipping Method from table
  • Quotable comments - Click the quote symbol next to the comment to automatically add it as a quote.
  • Quotable comments - Right click on order comments to copy them as 'Quoted'
  • Right Click Menu - Make ellipsis off columns with long text
  • Right click on address field and automatically copy formatted to clipboard Only works in recently updated browsers
  • Saved User Data - List and Delete Cookies and data saved in localStorage
  • Search History - Previous searches will be saved to memory and accessible from a modal
  • Smoother Animation when expanding Order
  • Sortable Table Columns - both horizontally and vertically.
  • Stock Update - Stock quantity will properly be updated on any modification to the order.
  • Two new Add new Customer options - when creating new order - order fields from your create_account.php will automatically be fetched and incorporated to the form.
  • Warning Filtration System - Highlight rows that satisfy filter rule, e.g. Customers Birthday within ± n days
  • When changing shipping and/or payment method the order totals will be recalculated accordingly, just like it would be a new order made on catalog side.

 

So, there you have it. I'll upload the new revision as soon as I have updated instructions etc..

Share this post


Link to post
Share on other sites

Wonder if this will work with Discount Coupons? Hmmmm....

 

I don't use the Discount Coupons Add-On myself so I don't know.

 

But I would guess that no, you probably need to add comparability for them to work together. You can, of course, change price and add your own order total fields to the order but if the Coupon Add-On works by manually inserting something like a code then there's nowhere to do that so that's something that you have to add.

 

This shouldn't be to much of a hassle, look on the original instructions for the Discount Add-On and find the same places to modify this Add-On.

Share this post


Link to post
Share on other sites

jQuery/Ajax Advanced Order Handler Rev4

 

Download Add-On here: http://addons.oscommerce.com/info/9055

 

Since the package was so big and the maximum file upload is only 3 MB I had to make a multipart RAR archive and then zip each of the split RAR files to get files with .zip as file extension since that's the only one that osC allow to upload.

 

So.. Download all 8 files, unzip them and you should get 8 new RAR files, jQuery Advanced Order Handler 2.3 Rev4.part01.rar ... jQuery Advanced Order Handler 2.3 Rev4.part08.rar.

 

Unrar jQuery Advanced Order Handler 2.3 Rev4.part01.rar and you will get a directory called jQuery Advanced Order Handler 2.3 Rev4 which has all the installation files, screenshots etc..

 

Screenshots

post-318284-0-58351700-1446246891_thumb.post-318284-0-91278800-1446246902_thumb.post-318284-0-32108700-1446246914_thumb.post-318284-0-47466500-1446246919_thumb.

post-318284-0-58351700-1446246891_thumb.jpg

post-318284-0-91278800-1446246902_thumb.jpg

post-318284-0-32108700-1446246914_thumb.jpg

post-318284-0-47466500-1446246919_thumb.jpg

Share this post


Link to post
Share on other sites

@@Dr. Rolex Thank you for your continued contribution to this community with this great Addon.

 

I use it and Really Appreciate the Hard Work it took to create it!

 

Thank you Sir!

Share this post


Link to post
Share on other sites

I've played around with the new Clipboard API and made a new function that copies the content from all table columns to clipboard so that the data can easily be pasted into e.g. a spreadsheet or document.

 

To add this feature, find this in 01_03_order_handler_rev3_module.js (Tested on Rev4, will probably work on Rev3 as well...)

                    // iconCSS: 'fa fa-copyright',
                    iconCSS: '',
                    cssClass: 'copyrightModal',
                    click: function() {
                        $( "#copyright-modal-button" ).click();
                    },
                }, {

Replace With

                    // iconCSS: 'fa fa-copyright',
                    iconCSS: '',
                    cssClass: 'copyrightModal',
                    click: function() {
                        $( "#copyright-modal-button" ).click();
                    },
                }, {
                    text: 'Copy Table',
                    iconCSS: 'fa fa-copy',
                    click: function() {
                        // Copy jTable
                        var tdIndex, copyDiv = $( "#jTable" ).clone();

                        // Find & Remove all columns with an empty heading
                        var emptyColumns = [];
                        copyDiv.find( ">thead th" ).each( function( tdIndex ) {
                            if ( "" === $( this ).text() )
                                emptyColumns.push(tdIndex+1);
                        });

                        // Reverese so that we can start from last empty column
                        emptyColumns.reverse();

                        emptyColumns.forEach(function( tdIndex ) {
                            copyDiv.find( "th:nth-child(" + tdIndex + "), td:nth-child(" + tdIndex + ")" ).remove();
                        });

                        // Show all hidden columns
                        copyDiv.find( ":css(display=none)" ).show();

                        // Replace <select> with it's selected value
                        // copyDiv.find( "select" ).each(function( index ) {
                        //     $( this ).closest( "td" )
                        //     .html( $( this ).find( "option:selected" ).text() );
                        // });

                        // Nah.. Remove them instead since we have otherwise get duplicates
                        copyDiv.find( "select" ).each( function() {
                            tdIndex = $( this ).closest( "td" ).index() + 1;
                            copyDiv.find( "th:nth-child(" + tdIndex + "), td:nth-child(" + tdIndex + ")" ).remove();
                        });

                        // Remove all inner elements
                        copyDiv.find( "td" ).each( function() {
                            $( this ).html( $( this ).text() );
                        });

                        // Remove all Columns with nothing in them
                        var columns = {};
                        copyDiv.find( "tbody td" ).each(function() {
                            tdIndex = $( this ).index() + 1;
                            if ( undefined === columns[ tdIndex ] )
                                columns[ tdIndex ] = 0;
                            if ( "" !== $( this ).text() )
                                columns[ tdIndex ] += 1;
                        });

                        for ( tdIndex in columns ) {
                            if ( 0 === columns[ tdIndex ] )
                                copyDiv.find( "th:nth-child(" + tdIndex + "), td:nth-child(" + tdIndex + ")" ).remove();
                        }

                        // In order to copy to clipboard element must be visible in DOM
                        $( "body" ).append( copyDiv );

                        selectText( copyDiv[0] );

                        // Copy Address and output success/error to console
                        try {
                            var successful = document.execCommand('copy');
                            log(successful);
                            var msg = successful ? 'successful' : 'unsuccessful';
                            console.log('Copying text command was ' + msg);
                        } catch (err) {
                            console.log('Oops, unable to copy');
                        }

                        // Remove Selection
                        deSelectText();

                        // Remove copied element when done
                        copyDiv.remove();

                        // Send Gritter Notification
                        oHandler.gritter( "Table Copied to Clipboard", "", "fa-clipboard" );
                    },
                }, {

Find this

            range = doc.createRange();
            range.selectNodeContents(text);
            selection.removeAllRanges();
            selection.addRange(range);
        }
    },

Replace With

            range = doc.createRange();
            range.selectNodeContents(text);
            selection.removeAllRanges();
            selection.addRange(range);
        }
    },

    /* DeSelect All Selections
    *************************************************************************/
    deSelectText = function() {
        var range, selection, doc = document;

        if (doc.body.createTextRange) { //ms
            range = doc.body.createTextRange();
            range.select();
        } else if (window.getSelection) { //all others
            selection = window.getSelection();
            range = doc.createRange();
            selection.removeAllRanges();
            selection.addRange(range);
        }
    },

Usage

Click on the 'Copy Table' jTable Toolbar button (under the Order Handler Rev4 heading and to the left of the 'Configuration' button) and then paste to a spreadsheet or document.

 

---

 

 

I also made a new context menu selection that copies the data from only the selected column, e.g. copying from the 'Order #' column will yield a list with one order number per row.

 

To add this feature, find this in 01_03_order_handler_rev3_module.js (Tested on Rev4, will probably work on Rev3 as well...)

        items.delete = {
            cssIcon: "",
            icon: "delete",
            name: "Delete",
        }

        items.make_ellipsis = { name: "Show this Column as Ellipsis", cssIcon: "fa-ellipsis-h" };

Replace With

        items.delete = {
            cssIcon: "",
            icon: "delete",
            name: "Delete",
        }

        items.make_ellipsis      = { name: "Show this Column as Ellipsis", cssIcon: "fa-ellipsis-h" };
        items.copy_column_values = { name: "Copy all values from this column", cssIcon: "fa-clipboard" };

Find This

                    }
                    return true;
                }

                if ( "delete" === action )
                    action = "jtable-delete-command-button";

Replace With

                    }
                    return true;
                }

                if ( "delete" === action )
                    action = "jtable-delete-command-button";

                if ( "copy_column_values" === action ) {
                    var tdIndex = ( options.items[key].tdIndex + 1 );
                    var columns = $( "#jTable" ).find( "td:nth-child(" + tdIndex + ")" );

                    // Put column values to a div
                    var copyDiv = $('<div />');
                    columns.each(function( index ) {
                        copyDiv.append( $( this ).text() + "<br />\n" );
                    });

                    // In order to copy to clipboard element must be visible in DOM
                    $( "body" ).append( copyDiv );

                    // Select newly created element with formatted address
                    selectText( copyDiv[0] );

                    // Copy Address and output success/error to console
                    try {
                        var successful = document.execCommand('copy');
                        log(successful);
                        var msg = successful ? 'successful' : 'unsuccessful';
                        console.log('Copying text command was ' + msg);
                    } catch (err) {
                        console.log('Oops, unable to copy');
                    }

                    // Remove copied element when done
                    copyDiv.remove();

                    // Send Gritter Notification
                    oHandler.gritter( "Column '" + $( "#jTable" ).find( ">thead th:nth-child(" + tdIndex + ")" ).text() + "' Copied", "", "fa-clipboard" );

                    return true;
                }

Find This in 02_02_jquery.contextMenu.js

                if ( undefined !== e.data.items.make_ellipsis ) {
                if ( -1 === e.target.className.indexOf( "comments" ) ) {
                    var tdIndex = $( e.target ).closest( "td" ).index();
                    var tdName  = $( "#jTable" ).find( "thead" ).eq(0).find( "th" ).eq( tdIndex ).text();

                        
                    e.data.items.make_ellipsis.tdIndex = tdIndex;

                    if ( true === $( e.target ).closest( "td" ).hasClass( "ellipsis" ) ) {
                        e.data.items.make_ellipsis.name    = "Remove Ellipsis for column '" + tdName + "'";
                        e.data.items.make_ellipsis.action = "remove";
                    } else {
                        e.data.items.make_ellipsis.name    = "Show Column '" + tdName + "' as Ellipsis";
                        e.data.items.make_ellipsis.action = "make";
                    }
                } else {
                    e.data.items.make_ellipsis.disabled = true;
                }
                }

                var showMenu = false;

Replace With

                var tdIndex = $( e.target ).closest( "td" ).index();
                var tdName  = $( "#jTable" ).find( "thead" ).eq(0).find( "th" ).eq( tdIndex ).text();
                if ( undefined !== e.data.items.make_ellipsis ) {
                    if ( -1 === e.target.className.indexOf( "comments" ) ) {
                        e.data.items.make_ellipsis.tdIndex = tdIndex;

                        if ( true === $( e.target ).closest( "td" ).hasClass( "ellipsis" ) ) {
                            e.data.items.make_ellipsis.name    = "Remove Ellipsis for column '" + tdName + "'";
                            e.data.items.make_ellipsis.action = "remove";
                        } else {
                            e.data.items.make_ellipsis.name    = "Show Column '" + tdName + "' as Ellipsis";
                            e.data.items.make_ellipsis.action = "make";
                        }
                    } else {
                        e.data.items.make_ellipsis.disabled = true;
                    }
                }
                if ( undefined !== e.data.items.copy_column_values ) {
                    e.data.items.copy_column_values.tdIndex = tdIndex;
                    e.data.items.copy_column_values.name = "Copy all values from column '" + tdName + "'";
                }

                var showMenu = false;

Find This

            var i = 7;

            if ( true === opt.items.make_ellipsis.disabled )

Replace With

            var i = 8;

            opt.$menu.find( "li" ).eq(0).find( "span" ).text( opt.items.copy_column_values.name );

            if ( true === opt.items.make_ellipsis.disabled )

Usage

Make sure that the Right-Click Menu is activated (green button on top left navbar) => right click on any column and select 'Copy all values from column [name]' => Paste in text editor, spreadsheet or wherever you want the data.

 

post-318284-0-88559600-1446398993_thumb.post-318284-0-77209700-1446398999_thumb.

 

post-318284-0-88559600-1446398993_thumb.jpg

post-318284-0-77209700-1446398999_thumb.jpg

Share this post


Link to post
Share on other sites

Hi Doc

 

Thanks for remembering me. LoL

It's been a while since the last install. To be honest i don't really remember what the problems were. I will install your latest version once and see how it goes. I'll keep you posted...

Share this post


Link to post
Share on other sites

Hi Doc

 

Thanks for remembering me. LoL

It's been a while since the last install. To be honest i don't really remember what the problems were. I will install your latest version once and see how it goes. I'll keep you posted...

 

No, me neither, my memory is not reliable and I'm too lazy to check (even if I would the forum layout doesn't exactly makes it easy...).

 

I have an old PM however that mentions problems with printing envelopes.

 

Are you using the old revision of the Add-On and if so, does it work?

Share this post


Link to post
Share on other sites

@@Dr. Rolex

 

I never got around to use it in my live shop. Just local for testing. But now that you mention it yeah the envelope thing was one of the issues I had.

I will install your latest version in the coming days and see how it goes.

Share this post


Link to post
Share on other sites

@@Dr. Rolex

 

Hi Jonas

 

I installed your Addon. Not all of it, I didn't install the Optional Stuff yet and also the Map thing.

Did this Addon got bigger? It has a lot more functions and features then before. The envelope thing seems to work. And also you added a feature to reduce the size of the buttons on the footer area which was also a problem that I recall.

I found a different bug though. Not sure if it happens because it is installed on a local shop (XAMPP).

I had one order in the list, then I tried to create a "new record" (Add new record) then the moment I choose the street address it loads and closes the modal. Then the order I had is gone from the list and I cannot do anything anymore since I get always this error message.

 

 

 An error occured while communicating to the server.
 
 Warning: stristr(): Empty needle in D:\xampp\htdocs\demo12\admin\includes\modules\order_handler\general_functions.php on line 631
{"Result":"OK","Records":[{"orders_id":1,"customers_id":"1","customers_name":"John Doe","customers_company":"","customers_telephone":"555-12345","customers_email_address":"tsimi@wanokaze.jp","delivery_street_address":"Teststreet 48-7","delivery_suburb":"","delivery_city":"Test City","delivery_postcode":"90210","delivery_state":"California","delivery_country":"United States","date_purchased":"2015-11-11 14:12:16","orders_status":" etc, etc, etc,.........

 

The order is still there when I look at the "normal" osC order.php page.

Also when I try to create a new customer I can see the fields inside the modal but the text is missing.

That is all so far. I will keep testing but this Addon of yours is huge! It takes some while to test all functions and features.

Share this post


Link to post
Share on other sites

Hi,

 

This contribution looks perfect, but with 13 pages of comments/errors/updates I'm a little worried it might be too complicated for me!  Essentially my site is already a mess due to the clumsy addition of a dresscode theme. 

 

Is this contribution difficult for a non-programmer to do, and is it likely to 'break' my live site if i do something wrong?

 

Windows 10 has just 'updated' my pc, and resets my printer on a document to the last printer i used.  I usually have one file open to copy/paste my label info to, whihc is then sent to a thermal printer (small labels), and my invoices go off to my brother A4 printer.  Now if I have to change the printer setting each time to the one i want as it no-long saves the printer choice for the document.

 

Hence the reason i need a batch printing method!

 

thanks

 

Kellie


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

Hi Doctor, 

A really great job! I've been using Rev3 for months and worked perfectly for me.

Then, I've tried to update it to Rev4, but had exactly the same problems than Tsimi: not text on creating customers, error comunicating to the server, empty needle, etc.)

 

Testing on local server (Wampserver: Apache/2.2.22 (Win32) PHP/5.4.45 , MySQL 5.5.24-log ), after those errors, I realize that if I choose any order status it works fine, but troubles come when I select "All orders". It is then when the same errors that I wrote before appear again.
 

Testing on my web hosting, it directly gives an Error 500. If it wasn't for this, I'd use it in my live shops, even with that errors mentioned above. I'm eager of add it to my webs!! Love that new features, since creating customers or editing orders, to statistics or email greeting and signing!! 

 

Well, I hope this could help you. 

 

Thanks again!

Edited by TITO4

Shopowner, not coder, experienced copypaster  :D

Share this post


Link to post
Share on other sites
 

Hola a todos, tengo un error "ocurrió un error al comunicarse con el servidor.", Con código 200: OK. Indique agradecido de que puedo ser. Muchas gracias y lo siento por mi Inglés. Saludos,

Share this post


Link to post
Share on other sites
 

Hi all, I have an error " an error occured while communicating to the server. " with code 200 : OK . Please indicate grateful that I can be. Thank you very much and sorry for my English . Greetings,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×