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: ANLEITUNG: Einzelfelder für Vor- & Nachname für Afterbuy in der orders_edit.php

    mickserde

    • Fördermitglied
    • Beiträge: 71
    Hallo,

    ich habe vor einiger Zeit einen der xtc angepasst, so dass man neben den Kundennamen (der steht in der Datenbank zusammengesetzt Vorname+Nachname) auch die Einzelfelder Vorname und Nachname angezeigt werden.

    Hintergrund: die Bestellübertragung an Afterbuy fragt nur die Einzelfelder, weil die Daten dort getrennt benötigt werden.

    Wenn die Daten nicht eingetragen sind wird die Bestellung nicht angenommen.

    Zur Änderung:

    admin/orders_edit.php
    *************************
    Suchen:

    Code: PHP  [Auswählen]
            $sql_data_array = array ('customers_vat_id' => xtc_db_prepare_input($_POST['customers_vat_id']), 'customers_status' => xtc_db_prepare_input($_POST['customers_status']), 'customers_status_name' => xtc_db_prepare_input($status['customers_status_name']), 'customers_company' => xtc_db_prepare_input($_POST['customers_company']), 'customers_name' => xtc_db_prepare_input($_POST['customers_name']), 'customers_street_address' => xtc_db_prepare_input($_POST['customers_street_address']), 'customers_city' => xtc_db_prepare_input($_POST['customers_city']), 'customers_postcode' => xtc_db_prepare_input($_POST['customers_postcode']), 'customers_country' => xtc_db_prepare_input($_POST['customers_country']), 'customers_telephone' => xtc_db_prepare_input($_POST['customers_telephone']), 'customers_email_address' => xtc_db_prepare_input($_POST['customers_email_address']), 'delivery_company' => xtc_db_prepare_input($_POST['delivery_company']), 'delivery_name' => xtc_db_prepare_input($_POST['delivery_name']), 'delivery_street_address' => xtc_db_prepare_input($_POST['delivery_street_address']), 'delivery_city' => xtc_db_prepare_input($_POST['delivery_city']), 'delivery_postcode' => xtc_db_prepare_input($_POST['delivery_postcode']), 'delivery_country' => xtc_db_prepare_input($_POST['delivery_country']), 'billing_company' => xtc_db_prepare_input($_POST['billing_company']), 'billing_name' => xtc_db_prepare_input($_POST['billing_name']), 'billing_street_address' => xtc_db_prepare_input($_POST['billing_street_address']), 'billing_city' => xtc_db_prepare_input($_POST['billing_city']), 'billing_postcode' => xtc_db_prepare_input($_POST['billing_postcode']), 'billing_country' => xtc_db_prepare_input($_POST['billing_country']));
     
    ersetzen durch:

    Code: PHP  [Auswählen]
            $sql_data_array = array ('customers_vat_id' => xtc_db_prepare_input($_POST['customers_vat_id']), 'customers_status' => xtc_db_prepare_input($_POST['customers_status']), 'customers_status_name' => xtc_db_prepare_input($status['customers_status_name']), 'customers_company' => xtc_db_prepare_input($_POST['customers_company']),
            'customers_name' => xtc_db_prepare_input($_POST['customers_name']),
            'customers_firstname' => xtc_db_prepare_input($_POST['customers_firstname']),
            'customers_lastname' => xtc_db_prepare_input($_POST['customers_lastname']),
            'customers_street_address' => xtc_db_prepare_input($_POST['customers_street_address']), 'customers_city' => xtc_db_prepare_input($_POST['customers_city']), 'customers_postcode' => xtc_db_prepare_input($_POST['customers_postcode']), 'customers_country' => xtc_db_prepare_input($_POST['customers_country']), 'customers_telephone' => xtc_db_prepare_input($_POST['customers_telephone']), 'customers_email_address' => xtc_db_prepare_input($_POST['customers_email_address']), 'delivery_company' => xtc_db_prepare_input($_POST['delivery_company']),
            'delivery_name' => xtc_db_prepare_input($_POST['delivery_name']),
                    'delivery_firstname' => xtc_db_prepare_input($_POST['delivery_firstname']),
            'delivery_lastname' => xtc_db_prepare_input($_POST['delivery_lastname']),
            'delivery_street_address' => xtc_db_prepare_input($_POST['delivery_street_address']), 'delivery_city' => xtc_db_prepare_input($_POST['delivery_city']), 'delivery_postcode' => xtc_db_prepare_input($_POST['delivery_postcode']), 'delivery_country' => xtc_db_prepare_input($_POST['delivery_country']), 'billing_firstname' => xtc_db_prepare_input($_POST['billing_firstname']),
            'billing_lastname' => xtc_db_prepare_input($_POST['billing_lastname']), 'billing_company' => xtc_db_prepare_input($_POST['billing_company']), 'billing_name' => xtc_db_prepare_input($_POST['billing_name']), 'billing_street_address' => xtc_db_prepare_input($_POST['billing_street_address']), 'billing_city' => xtc_db_prepare_input($_POST['billing_city']), 'billing_postcode' => xtc_db_prepare_input($_POST['billing_postcode']), 'billing_country' => xtc_db_prepare_input($_POST['billing_country']));
     
    orders_edit_adress.php
    *************************
    nach:

    Code: PHP  [Auswählen]
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('billing_name', $order->billing['name']);?>
    </td>
    </tr>

    <tr class="dataTableRow">
     
    einfügen:

    Code: PHP  [Auswählen]
    <td class="dataTableContent" align="left">Vorname
    <?php echo TEXT_NAME;?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('customers_firstname', $order->customer['firstname']);?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('delivery_firstname', $order->delivery['firstname']);?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('billing_firstname', $order->billing['firstname']);?>
    </td>
    </tr>

    <tr class="dataTableRow">
    <td class="dataTableContent" align="left">Nachname
    <?php echo TEXT_NAME;?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('customers_lastname', $order->customer['lastname']);?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('delivery_lastname', $order->delivery['lastname']);?>
    </td>
    <td class="dataTableContent" align="left">
    <?php echo xtc_draw_input_field('billing_lastname', $order->billing['lastname']);?>
    </td>
    </tr>

    <tr class="dataTableRow">
     
    Die Datei admin/includes/classes/order.php scheint in modified eCommerce Shopsoftware schon angepasst zu sein

    Code: PHP  [Auswählen]
    ("select customers_name,
              customers_firstname,
              customers_lastname,
    [...]
    [EDIT Tomcraft 28.07.2010: Ergänzt um billing_firstname & billing_lastname]



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

    speedy

    • Viel Schreiber
    • Beiträge: 3.214
    Hallo mickserde,

    vielen Dank für deine Verbesserung.
    Bitte nutze aber den "PHP" Button, um den PHP-Teil lesbarer / übersichtlicher zu gestalten.

    P.S. du kannst deinen Post 60 Minuten lang editieren.

    @Mods: Bitte Thread dann zwecks Übersichtlichkeit bereinigen.

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.367
    • Geschlecht:
    Editiert, formatiert und umbenannt... ;-)

    Danke für die Anleitung! :thx:

    Grüße

    Torsten

    mickserde

    • Fördermitglied
    • Beiträge: 71
    Danke für den Hinweis, habe das irgendwie nicht gepeilt, war wohl gestern abend zu spät...  :morning:

    Würde mich freuen wenn Ihr das auch in den Fork aufnehmt  :)

    1 Antworten
    2297 Aufrufe
    09. Oktober 2013, 10:33:46 von MW
    1 Antworten
    1691 Aufrufe
    02. Mai 2016, 21:44:34 von fishnet
    0 Antworten
    1511 Aufrufe
    18. September 2014, 18:25:00 von Godzilla