Trade Republic - Provisionsfrei Aktien handeln
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Debugging

    umbi

    • Mitglied
    • Beiträge: 163
    • Geschlecht:
    Debugging
    am: 02. Oktober 2018, 04:06:17
    Hallo zusammen

    ich bin mal wieder am debugen und habe folgende errors:

    Notice: Constant SHIPPING_NOT_INCLUDED already defined in lang/french/modules/order_total/ot_gv.php on line 31
    Notice: Constant TAX_NOT_INCLUDED already defined in lang/french/modules/order_total/ot_gv.php on line 32
    Notice: Undefined index: TVA incluse taux d`imp�sition inconnu in includes/modules/order_total/ot_shipping.php on line 93
    Notice: Undefined index: suburb in checkout_process.php on line 103
    Notice: Undefined index: suburb in checkout_process.php on line 118
    Notice: Undefined index: suburb in checkout_process.php on line 131
    Notice: Undefined variable: total_weight in checkout_process.php on line 385
    Notice: Undefined variable: total_products_price in checkout_process.php on line 386
    Notice: Undefined variable: products_tax in checkout_process.php on line 386
    Notice: Undefined variable: total_products_price in checkout_process.php on line 387
    Notice: Undefined variable: total_cost in checkout_process.php on line 387
    Notice: Undefined variable: gv_payment_amount in includes/modules/order_total/ot_gv.php on line 171
    Notice: Constant MODULE_SHIPPING_FLAT_TEXT_TITLE already defined in lang/french/modules/shipping/flat.php on line 19
    Notice: Constant MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION already defined in lang/french/modules/shipping/flat.php on line 20
    Notice: Constant MODULE_SHIPPING_FLAT_TEXT_WAY already defined in lang/french/modules/shipping/flat.php on line 21
    Notice: Constant MODULE_SHIPPING_FLAT_STATUS_TITLE already defined in lang/french/modules/shipping/flat.php on line 23
    Notice: Constant MODULE_SHIPPING_FLAT_STATUS_DESC already defined in lang/french/modules/shipping/flat.php on line 24
    Notice: Constant MODULE_SHIPPING_FLAT_ALLOWED_TITLE already defined in lang/french/modules/shipping/flat.php on line 25
    Notice: Constant MODULE_SHIPPING_FLAT_ALLOWED_DESC already defined in lang/french/modules/shipping/flat.php on line 26
    Notice: Constant MODULE_SHIPPING_FLAT_COST_TITLE already defined in lang/french/modules/shipping/flat.php on line 27
    Notice: Constant MODULE_SHIPPING_FLAT_COST_DESC already defined in lang/french/modules/shipping/flat.php on line 28
    Notice: Constant MODULE_SHIPPING_FLAT_TAX_CLASS_TITLE already defined in lang/french/modules/shipping/flat.php on line 29
    Notice: Constant MODULE_SHIPPING_FLAT_TAX_CLASS_DESC already defined in lang/french/modules/shipping/flat.php on line 30
    Notice: Constant MODULE_SHIPPING_FLAT_ZONE_TITLE already defined in lang/french/modules/shipping/flat.php on line 31
    Notice: Constant MODULE_SHIPPING_FLAT_ZONE_DESC already defined in lang/french/modules/shipping/flat.php on line 32
    Notice: Constant MODULE_SHIPPING_FLAT_SORT_ORDER_TITLE already defined in lang/french/modules/shipping/flat.php on line 33
    Notice: Constant MODULE_SHIPPING_FLAT_SORT_ORDER_DESC already defined in lang/french/modules/shipping/flat.php on line 34

    Notice: Use of undefined constant MODULE_EASYBILL_STATUS - assumed 'MODULE_EASYBILL_STATUS' in includes/external/easybill/modules/module.easybill.php on line 13

    Warning: Cannot modify header information - headers already sent by (output started at lang/french/modules/shipping/flat.php:30) in inc/xtc_redirect.inc.php on line 44

    MYSQL Error log

    02/10/2018 02:33:51 ERROR [0.00007s] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{2}3' at line 1
    02/10/2018 02:33:51 Backtrace #0 - inc/db_functions_mysqli.inc.php called at Line 262
    02/10/2018 02:33:51 Backtrace #1 - inc/db_functions.inc.php called at Line 104
    02/10/2018 02:33:51 Backtrace #2 - includes/extra/seo_url_mod/seo_url_shopstat.php called at Line 202
    02/10/2018 02:33:51 Backtrace #3 - includes/extra/seo_url_mod/seo_url_shopstat.php called at Line 121
    02/10/2018 02:33:51 Backtrace #4 - inc/seo_url_mod.php called at Line 25
    02/10/2018 02:33:51 Backtrace #5 - inc/xtc_href_link.inc.php called at Line 51
    02/10/2018 02:33:51 Backtrace #6 - templates/tpl_responsive/source/boxes/shopping_cart.php called at Line 46
    02/10/2018 02:33:51 Backtrace #7 - templates/tpl_responsive/source/boxes.php called at Line 87
    02/10/2018 02:33:51 Backtrace #8 - checkout_confirmation.php called at Line 39

    vorallem das hier macht mir sorgen:

    02/10/2018 02:33:51 ERROR [0.00007s] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{2}3' at line 1
    ich hab mich im netz wund gesucht finde aber nichts. Hat ein Profi ne idee ? Wäre um jede Hilfe dankbar.

    Greez

    Umbi

    Linkback: https://www.modified-shop.org/forum/index.php?topic=39540.0

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: Debugging
    Antwort #1 am: 03. Oktober 2018, 10:27:51
    Hallo Umbi

    [...]
    vorallem das hier macht mir sorgen:

    02/10/2018 02:33:51 ERROR [0.00007s] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{2}3' at line 1
    ich hab mich im netz wund gesucht finde aber nichts. Hat ein Profi ne idee ? Wäre um jede Hilfe dankbar.
    [...]

    Produkt-ID's dieser Form 134{2}3 werden als GET-Parameter z.B. so ?products_id=134{2}3 bei Links, meist im Warenkorb, zu einem Produkt welches Attribute enthält angehängt, dann ist der erzeugte Link aber kein SEO-URL. Der SQL Syntax-Fehler hat wahrscheinlich seine Ursache in einem SQL-Statement in dem z.B. so etwas products_id=$products_id anstatt so etwas products_id=(int)$products_id oder besser products_id=intval($products_id)  vorkommt, wobei die Variable $products_id beispielhaft einen solchen Wert 134{2}3 enthält.

    Wie sieht in deinem Shop die Zeile 202 in der Datei includes/extra/seo_url_mod/seo_url_shopstat.php aus?

    Gruss
    Hanspeter

    Whiteflash

    • Fördermitglied
    • Beiträge: 186
    • Geschlecht:
    Re: Debugging
    Antwort #2 am: 03. Oktober 2018, 10:31:23
    Pfff…. da war HP schneller als ich!
    :-o

    [...]
    vorallem das hier macht mir sorgen:

    02/10/2018 02:33:51 ERROR [0.00007s] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{2}3' at line 1[...]

    Also von der Struktur des Wertes gehe ich davon aus, dass es sich hierbei um den hinteren Teil einer $pID (products_id) geht - die werden nämlich in einigen POST-Formularen in der Form "x{y}z" übergeben, wobei x die eigentlich products_id, y die Options_id und z die Options_Values_ID ist - der SQL Interpreter stört sich dann an der geschweiften Klammer im Vergleichswert. Irgendwo wird die Variable ungefiltert abgegriffen.

    Gruß Whiteflash

    umbi

    • Mitglied
    • Beiträge: 163
    • Geschlecht:
    Re: Debugging
    Antwort #3 am: 09. Oktober 2018, 00:28:50
    Hi zusammen,

    Danke für Eure Antworten.
    Es ist so, dass die shopstat bei mir von product ID zu Artikelnummer modifiziert wurde.

    Hier meine line 202:

    Code: PHP  [Auswählen]
       $q = xtDBquery("SELECT products_model FROM products WHERE products_id =".$this->params_array['products_id']);
       $r = xtc_db_fetch_array($q,true);
       $model = str_replace(' - ', '-', $r['products_model']); // artikelnummer fix
       $link = implode('/', $products_link_array).ART_DIVIDER.$model;

    LG
    Umbi

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: Debugging
    Antwort #4 am: 09. Oktober 2018, 00:57:56
    Hallo Umbi,

    ersetze in dem von dir geposteten Code folgende Codezeile

    Code: PHP  [Auswählen]
       $q = xtDBquery("SELECT products_model FROM products WHERE products_id =".$this->params_array['products_id']);

    mit dieser Codezeile.

    Code: PHP  [Auswählen]
       $q = xtDBquery("SELECT products_model FROM products WHERE products_id =".intval($this->params_array['products_id']));

    Gruss
    Hanspeter

    umbi

    • Mitglied
    • Beiträge: 163
    • Geschlecht:
    Re: Debugging
    Antwort #5 am: 10. Oktober 2018, 12:44:48
    Hallo hpzeller

    Vielen herzlichen Dank für Deine Hilfe  :-)

    Dass eine Artikelnummer als ganzer Wert übergeben werden soll, leuchtet mir irgendwie ein.

     Ich habe es mal eingefügt und sehe mir am Abend die Logfiles nochmals an. Wenn ich meine Zeilen so anschaue, gefällt mir aber nicht dass die art. nr. ohne Trueprüfung ausgegeben wird. Wäre diese Lösung hier nicht besser?:

    Code: PHP  [Auswählen]
       $q = xtDBquery("SELECT products_model FROM products WHERE products_id =".intval($this->params_array['products_id']));
       $r = xtc_db_fetch_array($q,true);
       $model = str_replace(' - ', '-', $r['products_model']); // artikelnummer fix

    //neu checkt ob art_no da, wenn nicht gibt art_id aus
    if ($model !="") {  
     $link = implode('/', $products_link_array).ART_DIVIDER.$model;
    }else{
      $link = implode('/', $products_link_array).ART_DIVIDER.$this->params_array['products_id'];
    }

    was denkst Du ?

    Gruess
    Umbi

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: Debugging
    Antwort #6 am: 10. Oktober 2018, 20:16:13
    Wenn es nicht sicher ist das alle Produkte eine Artikelnummer haben, halte ich deine Idee für sehr sinnvoll.

    Gruss
    Hanspeter
    8 Antworten
    4926 Aufrufe
    09. Mai 2012, 14:51:14 von misterwong
    7 Antworten
    2548 Aufrufe
    25. Mai 2019, 17:16:06 von hpzeller
    7 Antworten
    6025 Aufrufe
    18. Januar 2011, 10:54:21 von swolfram [templatix]
               
    anything