Ankündigung

Einklappen
Keine Ankündigung bisher.

Edit Orders 4.3.0 PHP Warning: Illegal string offset 'id'

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Edit Orders 4.3.0 PHP Warning: Illegal string offset 'id'

    Hi zusammen,

    ich habe gerade mal mein Modul Edit Orders "erneuert" auf die Version 4.3.0 vom 10.11.2017. Ich hatte vorher schon 4.3.0 drauf, aber von einem etwas früheres Datum. Scheint auch soweit zu funktionieren.

    Bei der Durchsicht der Logs ist mir aufgefallen, dass bei jeder EO-Aktion ADM-Logs produziert werden. Ist ne PHP Warning "Illegal string offset 'id' ...". Das Ganze in der Datei /includes/modules/order_total/ot_shipping.php. Ich habe Euch mal drei der Logs angehängt, sehen immer ähnlich aus.

    myDEBUG-adm-1511781647-812060.txt
    myDEBUG-adm-1511781647-693041.txt
    myDEBUG-adm-1511781639-603397.txt

    Da ich nicht der begnadete Programmiere vor dem Herrn bin, wollte ich das hier mal in die Runde geben, ggf. ist es nicht wichtig oder auch leicht zu korrigieren... Ich kann die Auswirkungen nicht abschätzen.

    BTW: den Fehler hatte ich bei der bereits installierten Version vor dem Update auch schon, daher dachte ich, dass die neuen Dateiversionen ggf. das Problem lösen.

    Falls ich was checken, testen oder probieren soll, immer her damit...

    LG
    Lutz
    Zuletzt geändert von ldiemer; 27.11.2017, 12:40.

    #2
    Poste die PHP Version.
    Und den kompletten Inhalt der includes/modules/order_total_ot_shipping.php als Code (# Schaltfläche verwenden)

    Kommentar


      #3
      Moin,

      PHP Version = 7.0.20-nmm1 (Zend: 3.0.0)

      Code:
      <?php
      /**
       * ot_shipping order-total module
       *
       * @package orderTotal
       * @copyright Copyright 2003-2016 Zen Cart Development Team
       * @copyright Portions Copyright 2003 osCommerce
       * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
       * @version $Id: ot_shipping.php for UID 2.6 2016-10-05 17:05:25Z webchills $
       */
        class ot_shipping {
          var $title, $output;
          function __construct() {
            global $order, $currencies;
            $this->code = 'ot_shipping';
            $this->title = MODULE_ORDER_TOTAL_SHIPPING_TITLE;
            $this->description = MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION;
            $this->sort_order = MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER;
            unset($_SESSION['shipping_tax_description']);
            $this->output = array();
            if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
              switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
                case 'national':
                  if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
                case 'international':
                  if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
                case 'both':
                  $pass = true; break;
                default:
                  $pass = false; break;
              }
              if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
                $order->info['shipping_method'] = $this->title;
                $order->info['total'] -= $order->info['shipping_cost'];
                $order->info['shipping_cost'] = 0;
              }
            }
            $module = (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) ? substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_')) : '';
            if (is_object(($order)) && zen_not_null($order->info['shipping_method'])) {
      // TVA_INTRACOM REPLACE BEGIN
      //if ($GLOBALS[$module]->tax_class > 0) {
      $tva_tax = $order->customer['tva_intracom_tax'];
      if (!$tva_tax) {
      $shipping_tax = 0;
      $shipping_tax_description = TEXT_NO_TAX;
      } else {
      $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
      $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
      // TVA_INTRACOM REPLACE END
                if (!isset($GLOBALS[$module]->tax_basis)) {
                  $shipping_tax_basis = STORE_SHIPPING_TAX_BASIS;
                } else {
                  $shipping_tax_basis = $GLOBALS[$module]->tax_basis;
                }
                  
                if ($shipping_tax_basis == 'Billing') {
                  $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                  $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                } elseif ($shipping_tax_basis == 'Shipping') {
                  $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                  $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                } else {
                  if (STORE_ZONE == $order->billing['zone_id']) {
                    $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                    $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                  } elseif (STORE_ZONE == $order->delivery['zone_id']) {
                    $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                    $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                  } else {
                    $shipping_tax = 0;
                  }
           
                               
                        
                     
                                        
                                 
                          
                         
                                           
         
              if ($_SESSION['shipping']['id'] == 'free_free') {
                $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
                $order->info['shipping_cost'] = 0;
              }
      // TVA_INTRACOM REPLACE BEGIN
      }
      }
      $calculated_tax = zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
      if($tva_tax){
      $order->info['tax'] += $calculated_tax;
      $order->info['tax_groups']["$shipping_tax_description"] += $calculated_tax;
      $order->info['total'] += $calculated_tax;
      }
                if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
              //}
      // UID REPLACE END
              if ($_SESSION['shipping']['id'] == 'free_free') $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
            }
          }
          function process() {
            global $order, $currencies;
            $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                    'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                    'value' => $order->info['shipping_cost']);
          }
          function check() {
            global $db;
            if (!isset($this->_check)) {
              $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_STATUS'");
              $this->_check = $check_query->RecordCount();
            }
            return $this->_check;
          }
          function keys() {
            return array('MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION');
          }
          function install() {
            global $db;
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '200', 'Sort order of display.', '6', '2', now())");
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Do you want to allow free shipping?', '6', '3', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'zen_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
          }
          function remove() {
            global $db;
            $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
          }
        }

      Kommentar


        #4
        ändere mal Zeile 82
        von
        Code:
        if ($_SESSION['shipping']['id'] == 'free_free') {
        auf
        Code:
        if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free') {
        und Zeile 98 von
        Code:
        if ($_SESSION['shipping']['id'] == 'free_free') $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
        auf
        Code:
        if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free') $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
        Danach ok?

        Kommentar


          #5
          Nee, leider immer noch der gleiche Fehler. Hier nochmal der jetzt geänderte Code - mit ein paar Leerzeilen weniger:

          Code:
          <?php
          /**
           * ot_shipping order-total module
           *
           * @package orderTotal
           * @copyright Copyright 2003-2016 Zen Cart Development Team
           * @copyright Portions Copyright 2003 osCommerce
           * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
           * @version $Id: ot_shipping.php for UID 2.6 2016-10-05 17:05:25Z webchills $
           */
            class ot_shipping {
              var $title, $output;
              function __construct() {
                global $order, $currencies;
                $this->code = 'ot_shipping';
                $this->title = MODULE_ORDER_TOTAL_SHIPPING_TITLE;
                $this->description = MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION;
                $this->sort_order = MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER;
                unset($_SESSION['shipping_tax_description']);
                $this->output = array();
                if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
                  switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
                    case 'national':
                      if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
                    case 'international':
                      if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
                    case 'both':
                      $pass = true; break;
                    default:
                      $pass = false; break;
                  }
                  if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
                    $order->info['shipping_method'] = $this->title;
                    $order->info['total'] -= $order->info['shipping_cost'];
                    $order->info['shipping_cost'] = 0;
                  }
                }
                $module = (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) ? substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_')) : '';
                if (is_object(($order)) && zen_not_null($order->info['shipping_method'])) {
          // TVA_INTRACOM REPLACE BEGIN
          //if ($GLOBALS[$module]->tax_class > 0) {
          $tva_tax = $order->customer['tva_intracom_tax'];
          if (!$tva_tax) {
          $shipping_tax = 0;
          $shipping_tax_description = TEXT_NO_TAX;
          } else {
          $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
          $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
          // TVA_INTRACOM REPLACE END
                    if (!isset($GLOBALS[$module]->tax_basis)) {
                      $shipping_tax_basis = STORE_SHIPPING_TAX_BASIS;
                    } else {
                      $shipping_tax_basis = $GLOBALS[$module]->tax_basis;
                    }
                      
                    if ($shipping_tax_basis == 'Billing') {
                      $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                      $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                    } elseif ($shipping_tax_basis == 'Shipping') {
                      $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                      $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                    } else {
                      if (STORE_ZONE == $order->billing['zone_id']) {
                        $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                        $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                      } elseif (STORE_ZONE == $order->delivery['zone_id']) {
                        $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                        $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                      } else {
                        $shipping_tax = 0;
                      }
                  if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free') {
                    $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
                    $order->info['shipping_cost'] = 0;
                  }
          // TVA_INTRACOM REPLACE BEGIN
          }
          }
          $calculated_tax = zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
          if($tva_tax){
          $order->info['tax'] += $calculated_tax;
          $order->info['tax_groups']["$shipping_tax_description"] += $calculated_tax;
          $order->info['total'] += $calculated_tax;
          }
                    if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
                  //}
          // UID REPLACE END
                  if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free') $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
                }
              }
              function process() {
                global $order, $currencies;
                $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                        'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                        'value' => $order->info['shipping_cost']);
              }
              function check() {
                global $db;
                if (!isset($this->_check)) {
                  $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_STATUS'");
                  $this->_check = $check_query->RecordCount();
                }
                return $this->_check;
              }
              function keys() {
                return array('MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION');
              }
              function install() {
                global $db;
                $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
                $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '200', 'Sort order of display.', '6', '2', now())");
                $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Do you want to allow free shipping?', '6', '3', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
                $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
                $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'zen_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
              }
              function remove() {
                global $db;
                $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
              }
            }
          Hier noch die jetzt entstandenen Log-Files dazu.

          myDEBUG-adm-1511864554-19097.txt
          myDEBUG-adm-1511864609-61926.txt
          myDEBUG-adm-1511864609-554370.txt

          Ausgeführt habe ich folgende Aktion mit EO:

          • Aufruf der Bestellung durch "Mit EDIT ORDERS bearbeiten" -> da entstand schon das erste Log-File
          • Änderung der Versandkosten auf 0 EUR
          • Aktualisieren der Bestellung


          Im Backend sieht alles gut aus, der Betrag ändert sich, Mwst stimmt...

          Kommentar


            #6
            Es sind ohnehin keine Errors.
            Welche zusätzlichen order_total Module hast Du unter Module > Zusammenfassung aktiv, die in der Grundversion nicht vorkommen?
            Welche zusätzlichen Versandmodule hast Du unter Module > Versandarten aktiv, die in der Grundversion nicht vorkommen?
            Eins davon scheint nicht für PHP 7 angepasst zu sein

            Kommentar


              #7
              mmmh, ich glaube, da habe ich nix besonderes drin...

              Klicke auf die Grafik für eine vergrößerte Ansicht

Name: Versandmodule.JPG
Ansichten: 1
Größe: 39,2 KB
ID: 103155

              Klicke auf die Grafik für eine vergrößerte Ansicht

Name: Zusammenfassung.JPG
Ansichten: 1
Größe: 36,9 KB
ID: 103156

              Kommentar


                #8
                Hi zusammen,

                nachdem ich gerade auf 1.5.5f aktualisiere und die Logs checke, ist mir diese Warning wieder untergekommen. Daher wollte ich das nochmal hochholen. Sollte es ein Versandmodul sein, so habe ich zusätzlich nur "Zusätzliche Versandkosten nach Zonen Module für Zen Cart 1.5.5 deutsch" installiert und angepasst. Der Rest ist Standard.

                Hat noch jemand eine Idee, auch wenn es nur eine Warning ist...?

                LG und DANKE
                Lutz

                Kommentar


                  #9
                  Das aktuelle UID Modul macht die Änderungen in der includes/modules/order_total/ot_shipping.php nicht so, dass sie ohne Warnings für PHP 7.1 geeignet sind.

                  Ändere den Inhalt mal auf folgendes und gib Bescheid, ob die Warning damit nicht mehr kommt

                  Code:
                  <?php
                  /**
                   * ot_shipping order-total module
                   *
                   * @package orderTotal
                   * @copyright Copyright 2003-2018 Zen Cart Development Team
                   * @copyright Portions Copyright 2003 osCommerce
                   * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
                   * @version $Id: ot_shipping.php for UID 2018-10-17 22:05:25Z webchills $
                   */
                  
                    class ot_shipping {
                      var $title, $output;
                  
                      function __construct() {
                        global $order, $currencies;
                        $this->code = 'ot_shipping';
                        $this->title = MODULE_ORDER_TOTAL_SHIPPING_TITLE;
                        $this->description = MODULE_ORDER_TOTAL_SHIPPING_DESCRIPTION;
                        $this->sort_order = MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER;
                        unset($_SESSION['shipping_tax_description']);
                        $this->output = array();
                        if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
                          switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
                            case 'national':
                              if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
                            case 'international':
                              if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
                            case 'both':
                              $pass = true; break;
                            default:
                              $pass = false; break;
                          }
                  
                          if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
                            $order->info['shipping_method'] = $this->title;
                            $order->info['total'] -= $order->info['shipping_cost'];
                            $order->info['shipping_cost'] = 0;
                          }
                        }
                        $module = (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) ? substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_')) : '';
                        if (is_object(($order)) && zen_not_null($order->info['shipping_method'])) {
                  // TVA_INTRACOM REPLACE BEGIN
                  //if ($GLOBALS[$module]->tax_class > 0) {
                  $tva_tax = $order->customer['tva_intracom_tax'];
                  if (!$tva_tax) {
                  $shipping_tax = 0;
                  $shipping_tax_description = TEXT_NO_TAX;
                  } else {
                  $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                  $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                  // TVA_INTRACOM REPLACE END
                            if (!isset($GLOBALS[$module]->tax_basis)) {
                              $shipping_tax_basis = STORE_SHIPPING_TAX_BASIS;
                            } else {
                              $shipping_tax_basis = $GLOBALS[$module]->tax_basis;
                            }
                              
                            if ($shipping_tax_basis == 'Billing') {
                              $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                              $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                            } elseif ($shipping_tax_basis == 'Shipping') {
                              $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                              $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                            } else {
                              if (STORE_ZONE == $order->billing['zone_id']) {
                                $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                                $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->billing['country']['id'], $order->billing['zone_id']);
                              } elseif (STORE_ZONE == $order->delivery['zone_id']) {
                                $shipping_tax = zen_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                                $shipping_tax_description = zen_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
                              } else {
                                $shipping_tax = 0;
                              }
                          if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free') {
                      
                            $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
                            $order->info['shipping_cost'] = 0;
                          }
                  
                  // TVA_INTRACOM REPLACE BEGIN
                  }
                  }
                  $calculated_tax = zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
                  if($tva_tax){
                  $order->info['tax'] += $calculated_tax;
                  $order->info['tax_groups']["$shipping_tax_description"] += $calculated_tax;
                  $order->info['total'] += $calculated_tax;
                  }
                            if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += zen_calculate_tax($order->info['shipping_cost'], $shipping_tax);
                          //}
                  // UID REPLACE END
                  
                          if (isset($_SESSION['shipping']['id']) && $_SESSION['shipping']['id'] == 'free_free')
                      
                       $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
                  
                        }
                      }
                  
                      function process() {
                        global $order, $currencies;
                        $this->output[] = array('title' => $order->info['shipping_method'] . ':',
                                                'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),
                                                'value' => $order->info['shipping_cost']);
                      }
                  
                      function check() {
                        global $db;
                        if (!isset($this->_check)) {
                          $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SHIPPING_STATUS'");
                          $this->_check = $check_query->RecordCount();
                        }
                        return $this->_check;
                      }
                  
                      function keys() {
                        return array('MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION');
                      }
                  
                      function install() {
                        global $db;
                        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_SHIPPING_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
                        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER', '200', 'Sort order of display.', '6', '2', now())");
                        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Free Shipping', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING', 'false', 'Do you want to allow free shipping?', '6', '3', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
                        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Free Shipping For Orders Over', 'MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER', '50', 'Provide free shipping for orders over the set amount.', '6', '4', 'currencies->format', now())");
                        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Provide Free Shipping For Orders Made', 'MODULE_ORDER_TOTAL_SHIPPING_DESTINATION', 'national', 'Provide free shipping for orders sent to the set destination.', '6', '5', 'zen_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())");
                      }
                  
                      function remove() {
                        global $db;
                        $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
                      }
                    }

                  Kommentar


                    #10
                    Danke webchills, habe ich gemacht. Das war es aber nicht. Wenn ich den Code der ot_shipping-php wie oben erwähnt ändere, dann erhalten ich folgenden Log-Eintrag:
                    [18-Oct-2018 07:48:30 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 freeshipper->__construct() called at [/includes/classes/shipping.php:65]
                    #2 shipping->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1607]
                    #3 eo_get_order_by_id() called at [/130169_admin/edit_orders.php:645]
                    [18-Oct-2018 07:48:30 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/shipping/freeshipper.php on line 32
                    [18-Oct-2018 07:48:30 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 freeshipper->__construct() called at [/includes/classes/shipping.php:65]
                    #2 shipping->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1500]
                    #3 eo_get_available_shipping_modules() called at [/130169_admin/edit_orders.php:1228]
                    [18-Oct-2018 07:48:30 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/shipping/freeshipper.php on line 32
                    [18-Oct-2018 07:48:30 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 freeshipper->__construct() called at [/includes/classes/shipping.php:65]
                    #2 shipping->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1500]
                    #3 eo_get_available_shipping_modules() called at [/130169_admin/edit_orders.php:1276]
                    [18-Oct-2018 07:48:30 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/shipping/freeshipper.php on line 32
                    Ich habe dann man den freeshipper (war aktiviert) deaktiviert und der Log-Eintrag verschwindet. Wechsle ich mit deaktiviertem Freeshipper wieder zurück auf die Ursprungsverison von ot_shipping.php, dann erhalte ich wieder Log-Einträge wie folgt:
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1262]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 51
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1262]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 52
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1262]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 61
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1262]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 62
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1265]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 51
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1265]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 52
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1265]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 61
                    [18-Oct-2018 07:56:32 Europe/Berlin] Request URI: /zen_test/130169_admin/edit_orders.php?page=1&oID=520828&action=edit, IP address: 95.89.135.142
                    #1 ot_shipping->__construct() called at [/includes/classes/order_total.php:52]
                    #2 order_total->__construct() called at [/130169_admin/includes/functions/extra_functions/edit_orders_functions.php:1476]
                    #3 eo_get_available_order_totals_class_values() called at [/130169_admin/edit_orders.php:1265]
                    [18-Oct-2018 07:56:32 Europe/Berlin] PHP Warning: Illegal string offset 'id' in /includes/modules/order_total/ot_shipping.php on line 62
                    Es scheint also eine Kombi zu sein aus ot_shipping.php und freeshipper.php. Die von mir verwendete freeshipper.php ist identisch mit der Version aus dem Grundpaket 1.5.5f. Keine Änderungen daran vorgenommen.

                    Ggf. hilft mein Test... Danke sehr auf jeden Fall.

                    LG
                    Lutz

                    Kommentar


                      #11
                      Dann kann ich nur raten bis zum Erscheinen von Edit Orders 5 mit dieser Warning zu leben.
                      Edit Orders 4.3.x ist nicht mit PHP 7.1 getestet und enthält ja etliche bekannte Bugs, z.B.

                      Ein Betatest von Edit Orders 5, das diese Dinge Dinge beheben wird, wird gemeinsam mit der amerikanischen Edit Orders Entwicklerin lat9 in den nächsten Wochen beginnen.
                      Releasetermin derzeit unbekannt.

                      Kommentar


                        #12
                        OK, damit kann ich leben Danke Dir...

                        Kommentar

                        Info zu diesem Forenarchiv:
                        Mit Release von 1.5.7 wurde die deutsche Zen Cart Version auf eine reine DIY-Lösung umgestellt.
                        Für einen Support via Forum stehen keine personellen und zeitlichen Ressourcen mehr zur Verfügung.
                        Dieses Supportforum bleibt im Nur-Lesen-Modus als Wissensarchiv noch online verfügbar.
                        PM Funktionalität, Registrierung und Posten neuer Beiträge sind deaktiviert.
                        Zugriff auf Anhänge in den Postings ist auch ohne Registrierung/Einloggen möglich.
                        FAQ und Downloadbereich des Forums wurden in die neue umfangreiche Knowledgebase auf der zen-cart-pro.at Website übernommen.

                        Das Development der deutschen Zen Cart Version geht wie bisher auf Github weiter.
                        Wir werden auch weiterhin neue Versionen bereitstellen und die Onlinedokumentation/Knowledgebase aktualisieren.
                        Fehler in der Software können auf Github als Issues gemeldet werden.
                        Follow us
                        aktuelle version
                        Zen Cart 1.5.7g deutsch
                        vom 12.12.2023
                        [Download]
                        Lädt...
                        X