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: {$item_data.EAN} in order_details.html

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    {$item_data.EAN} in order_details.html
    am: 17. März 2013, 21:01:16
    Hallo,

    ich nutze bei meinen Attributen ein zusätzliches Feld welches EAN heisst. Ich nutze es für eine Beschreibung. Diese wird in der product_info auch angezeigt. Nun möchte ich gerne dieses Feld auch im Warenkorb und in der Mail zur Bestellung anzeigen lassen.
    Könnt ihr mir einen Tip geben, wo ich was ändern muss?

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

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #1 am: 18. März 2013, 20:21:46
    Ist es richtig, dass ich die Änderung in der order_details_cart.php machen muss?

    Ich denke, dass ich in dem folgenden Code bestimmen muss, dass das Feld attributes_ean aus der Tabelle products_attributes holen muss.

    Code: PHP  [Auswählen]
     $attr_query=xtc_db_query("SELECT products_options_values_id,products_options_values_name FROM ". TABLE_PRODUCTS_OPTIONS_VALUES." pov, ".TABLE_PRODUCTS_ATTRIBUTES." pa
                                            WHERE pa.products_id = "
    .$products_id."
                                            AND pa.options_values_id = pov.products_options_values_id
                                            AND pov.language_id = "
    . $_SESSION['languages_id'] ."
                                            AND pa.options_id = "
    . $option . "
                                            ORDER BY pov.products_options_values_id"
    );

                    $select='<select name="attributes" onChange="this.form.submit()">';

                    while ($attr_res=xtc_db_fetch_array($attr_query)) {
                        $selected=$products[$i]['attributes'][$option]==$attr_res['products_options_values_id']?' selected="selected"':'';
                        $select.='<option value="'.$i.'-'.$products[$i]['attributes'][$option].'-'.$attr_res['products_options_values_id'].'-'.$opt.'"'.$selected.'>'.$attr_res['products_options_values_name'].'</option>';
                    } //EOWHILE

                    $select.='</select>';
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'VALUE_NAME' => $select, //$products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="send" class="alter">'
                    );
                } else {
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'VALUE_NAME' => $products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="' . $i . '-' . $option . '" class="alter">'
                    );
                }

    Aber wie?

    web28

    • modified Team
    • Beiträge: 9.404
    Re: {$item_data.EAN} in order_details.html
    Antwort #2 am: 18. März 2013, 20:48:03
    Bei 106 ist Attribute EAN sereinmäßig in order_details_cart.php verfügbar.

    Vor 106 muss die Datenbankabfrage in shopping_cart.php (Hauptverzeichnis) erweiteret werden, anschließend das Übergabe Array und in order_details_cart.php erneut eine Arrayzuweisung, alles total umständlich und fehleranfällig.

    in 106 sind viele Verbesserungen eingeflossen, die Änderungen wesentlich erleichtern.

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #3 am: 18. März 2013, 20:58:27
    Also lieber updaten?

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #4 am: 21. März 2013, 21:15:19
    Das mit dem update ist ja auch nicht so einfach!

    Alsoe ich habe in der shopping_cart.php folgendes mit ean hinter model geändert:

    Code: PHP  [Auswählen]
            // Push all attributes information in an array
                    if (isset ($products[$i]['attributes'])) {
                            while (list ($option, $value) = each($products[$i]['attributes'])) {
                                    $hidden_options .= xtc_draw_hidden_field('id['.$products[$i]['id'].']['.$option.']', $value);
                                    $attributes = xtc_db_query("select popt.products_options_name,
                                               poval.products_options_values_name,
                                               pa.options_values_price,
                                               pa.price_prefix,
                                               pa.attributes_stock,
                                               pa.products_attributes_id,
                                               pa.attributes_model,
                                               pa.attributes_ean
                                        from "
    .TABLE_PRODUCTS_OPTIONS." popt,
                                             "
    .TABLE_PRODUCTS_OPTIONS_VALUES." poval,
                                             "
    .TABLE_PRODUCTS_ATTRIBUTES." pa
                                                                where pa.products_id = '"
    .$products[$i]['id']."'
                                                                and pa.options_id = '"
    .$option."'
                                                                and pa.options_id = popt.products_options_id
                                                                and pa.options_values_id = '"
    .$value."'
                                                                and pa.options_values_id = poval.products_options_values_id
                                                                and popt.language_id = '"
    .(int) $_SESSION['languages_id']."'
                                                                and poval.language_id = '"
    .(int) $_SESSION['languages_id']."'");
                                    $attributes_values = xtc_db_fetch_array($attributes);
                                    $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];
                                    $products[$i][$option]['options_values_id'] = $value;
                                    $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
                                    $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
                                    $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
                                    $products[$i][$option]['weight_prefix'] = $attributes_values['weight_prefix'];
                                    $products[$i][$option]['options_values_weight'] = $attributes_values['options_values_weight'];
                                    $products[$i][$option]['attributes_stock'] = $attributes_values['attributes_stock'];
                                    $products[$i][$option]['products_attributes_id'] = $attributes_values['products_attributes_id'];
                                    //BOF - web28 - 2011-04-17 - BUGFIX attributes_model
            //$products[$i][$option]['products_attributes_model'] = $attributes_values['products_attributes_model'];
            $products[$i][$option]['attributes_model'] = $attributes_values['attributes_model'];
            $products[$i][$option]['attributes_ean'] = $attributes_values['attributes_ean'];
            //EOF  - web28 - 2011-04-17 - BUGFIX attributes_model

    Weiterhin habe ich in der includes/modules/order_details_cart.php folgendes gemacht:

    Code: PHP  [Auswählen]
    $module_content[$i] = array ('PRODUCTS_NAME' => $products[$i]['name'].$mark_stock,
                                   'PRODUCTS_QTY' => xtc_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"')
                                                    .xtc_draw_hidden_field('products_id[]', $products[$i]['id'])
                                                    .xtc_draw_hidden_field('old_qty[]', $products[$i]['quantity']),
                                    'PRODUCTS_MODEL' => $products[$i]['model'],
                                    'PRODUCTS_EAN' => $products[$i]['ean'],
                                    'PRODUCTS_SHIPPING_TIME'=>$products[$i]['shipping_time'],
                                    'PRODUCTS_TAX' => number_format($products[$i]['tax'], TAX_DECIMAL_PLACES),
                                    'PRODUCTS_IMAGE' => $image, 'IMAGE_ALT' => $products[$i]['name'],
                                    'DELETE' => xtc_draw_checkbox_field('cart_delete[]', $products[$i]['id']),
    'PLUS' => '<input type="submit" name="plus" value="'.$i.'" class="plus" />',
    'MINUS' => '<input type="submit" name="minus" value="'.$i.'" class="minus" />',
    'BOX_DELETE' => '<input type="submit" name="delete" value="'.$i.'" class="delete" />',  
                                    'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($products[$i]['id'], $products[$i]['name'])),
      //BOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
                                    'BUTTON_DELETE' => $del_button,
                                    'LINK_DELETE' => $del_link,                                                                      
      //EOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
                                    'PRODUCTS_PRICE' => $xtPrice->xtcFormat($products[$i]['price'] * $products[$i]['quantity'], true),
                                    'PRODUCTS_SINGLE_PRICE' =>$xtPrice->xtcFormat($products[$i]['price'], true),
                                    'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($products[$i]['id']),
                                    'ATTRIBUTES' => '');
            // Product options names

    und

    Code: PHP  [Auswählen]
                    $select.='</select>';
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'EAN' => $products[$i][$option]['products_options_ean'],
                    'VALUE_NAME' => $select, //$products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="send" class="alter">'
                    );
                } else {
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'EAN' => $products[$i][$option]['products_options_ean'],
                    'VALUE_NAME' => $products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="' . $i . '-' . $option . '" class="alter">'
                    );
                }

                    }
            }
     

    Trotzdem wird in der order_details.html mit {$item_data.EAN} nichts angezeigt.

    Was habe ich falsch gemacht?

    web28

    • modified Team
    • Beiträge: 9.404
    Re: {$item_data.EAN} in order_details.html
    Antwort #5 am: 22. März 2013, 11:45:18
    Die Indexbezeichnungen stimmen nicht überein.

    shipping.php
    Code: PHP  [Auswählen]
    $products[$i][$option]['attributes_ean'] = ...

    order_details_cart
    Code: PHP  [Auswählen]
    'EAN' => $products[$i][$option]['products_options_ean'],

    Dann kann man auch erkennen das dieser Code Bullshitt ist:
    Code: PHP  [Auswählen]
    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']),

    Da vorher bereits abgefragt und zugewiesen kann man einfach schreiben:
    Code: PHP  [Auswählen]
    'MODEL'=>$products[$i][$option]['attributes_model'],

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #6 am: 22. März 2013, 12:01:31
    Also muss ich in der shopping_cart.php dies ändern?

    Code: PHP  [Auswählen]
    $products[$i][$option]['attributes_ean'] = $attributes_values['attributes_ean'];

    web28

    • modified Team
    • Beiträge: 9.404
    Re: {$item_data.EAN} in order_details.html
    Antwort #7 am: 22. März 2013, 12:35:05
    Nein in order_details_cart statt
    products_options_ean
    attribute_ean

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #8 am: 22. März 2013, 12:59:01
    Trotz Änderung gibt es keine Anzeige.

    kann es sein, dass hier noch was fehlt...

    Code: PHP  [Auswählen]
    $attr_query=xtc_db_query("SELECT products_options_values_id,products_options_values_name FROM ". TABLE_PRODUCTS_OPTIONS_VALUES." pov, ".TABLE_PRODUCTS_ATTRIBUTES." pa
                                            WHERE pa.products_id = "
    .$products_id."
                                            AND pa.options_values_id = pov.products_options_values_id
                                            AND pov.language_id = "
    . $_SESSION['languages_id'] ."
                                            AND pa.options_id = "
    . $option . "
                                            ORDER BY pov.products_options_values_id"
    );
     

    web28

    • modified Team
    • Beiträge: 9.404
    Re: {$item_data.EAN} in order_details.html
    Antwort #9 am: 22. März 2013, 16:20:46
    Dieser Codeblock befindet sich in keiner der bisher besprochenen Dateien.

    Mache ein Update auf 106

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #10 am: 22. März 2013, 16:26:58
    Doch, dieser Codeblock ist in der order_details_cart.php

    Da ich im Shop einige wichtige Erweiterungen habe, würde das update auf 1.06 sehr umständlich sein. Zumal ich dann vor dem gleichen Problem stehe, denn es wird in der 1.06 Version die EAN vom Artikel angezeigt, nicht jedoch wie bei mir notwendig das Feld attributes_ean aus der Tabelle products_attributes.

    Es würde mich also nicht weiterbringen. Ich denke, dass da nur noch irgendwo ein kleiner Fehler ist, den ich nicht finde.

    Die komplette order_details_cart.php sieht jetzt so aus

    Code: PHP  [Auswählen]
    <?php

    /* -----------------------------------------------------------------------------------------
       $Id: order_details_cart.php 1281 2005-10-03 09:30:17Z mz $  

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(order_details.php,v 1.8 2003/05/03); www.oscommerce.com
       (c) 2003      nextcommerce (order_details.php,v 1.16 2003/08/17); www.nextcommerce.org

       Released under the GNU General Public License
       -----------------------------------------------------------------------------------------
       Third Party contribution:

       Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

       Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
       http://www.oscommerce.com/community/contributions,282
       Copyright (c) Strider | Strider@oscworks.com
       Copyright (c  Nick Stanko of UkiDev.com, nick@ukidev.com
       Copyright (c) Andre ambidex@gmx.net
       Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    $module_smarty = new Smarty;
    $module_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
    // include needed functions
    require_once (DIR_FS_INC.'xtc_check_stock.inc.php');
    require_once (DIR_FS_INC.'xtc_get_products_stock.inc.php');
    require_once (DIR_FS_INC.'xtc_remove_non_numeric.inc.php');
    require_once (DIR_FS_INC.'xtc_get_short_description.inc.php');
    require_once (DIR_FS_INC.'xtc_format_price.inc.php');
    require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');

    $module_content = array ();
    $any_out_of_stock = '';
    $mark_stock = '';

    for ($i = 0, $n = sizeof($products); $i < $n; $i ++) {

            if (STOCK_CHECK == 'true') {
                    $mark_stock = xtc_check_stock($products[$i]['id'], $products[$i]['quantity']);
                    if ($mark_stock)
                            $_SESSION['any_out_of_stock'] = 1;
            }

            $image = '';
            if ($products[$i]['image'] != '') {
                    $image = DIR_WS_THUMBNAIL_IMAGES.$products[$i]['image'];
            }

      //BOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
            $del_button = '<a href="'
                                      . xtc_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&prd_id=' . $products[$i]['id'], 'NONSSL') // web28 - 2010-09-20 - change SSL -> NONSSL
                                      . '">' . xtc_image_button('cart_del.gif', IMAGE_BUTTON_DELETE) . '</a>';

            $del_link = '<a href="'
                                      . xtc_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&prd_id=' . $products[$i]['id'], 'NONSSL') // web28 - 2010-09-20 - change SSL -> NONSSL
                                      . '">' . IMAGE_BUTTON_DELETE . '</a>';
      //EOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
           
            $module_content[$i] = array ('PRODUCTS_NAME' => $products[$i]['name'].$mark_stock,
                                   'PRODUCTS_QTY' => xtc_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"')
                                                    .xtc_draw_hidden_field('products_id[]', $products[$i]['id'])
                                                    .xtc_draw_hidden_field('old_qty[]', $products[$i]['quantity']),
                                    'PRODUCTS_MODEL' => $products[$i]['model'],
                                    'PRODUCTS_SHIPPING_TIME'=>$products[$i]['shipping_time'],
                                    'PRODUCTS_TAX' => number_format($products[$i]['tax'], TAX_DECIMAL_PLACES),
                                    'PRODUCTS_IMAGE' => $image, 'IMAGE_ALT' => $products[$i]['name'],
                                    'DELETE' => xtc_draw_checkbox_field('cart_delete[]', $products[$i]['id']),
    'PLUS' => '<input type="submit" name="plus" value="'.$i.'" class="plus" />',
    'MINUS' => '<input type="submit" name="minus" value="'.$i.'" class="minus" />',
    'BOX_DELETE' => '<input type="submit" name="delete" value="'.$i.'" class="delete" />',  
                                    'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($products[$i]['id'], $products[$i]['name'])),
      //BOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
                                    'BUTTON_DELETE' => $del_button,
                                    'LINK_DELETE' => $del_link,                                                                      
      //EOF - Dokuman - 15.08.2009 - show 'delete button' in shopping cart
                                    'PRODUCTS_PRICE' => $xtPrice->xtcFormat($products[$i]['price'] * $products[$i]['quantity'], true),
                                    'PRODUCTS_SINGLE_PRICE' =>$xtPrice->xtcFormat($products[$i]['price'], true),
                                    'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($products[$i]['id']),
                                    'ATTRIBUTES' => '');
            // Product options names
            $attributes_exist = ((isset ($products[$i]['attributes'])) ? 1 : 0);

            if ($attributes_exist == 1) {
                    reset($products[$i]['attributes']);

                    while (list ($option, $value) = each($products[$i]['attributes'])) {

                            if (ATTRIBUTE_STOCK_CHECK == 'true' && STOCK_CHECK == 'true') {
              $attribute_stock_check = xtc_check_stock_attributes($products[$i][$option]['products_attributes_id'], $products[$i]['quantity']);
              if ($attribute_stock_check)
                $_SESSION['any_out_of_stock'] = 1;
            }
                if ($_SESSION['alter'] && $_SESSION['alter_prod']==$i."-".$option) {
                    $_SESSION['alter'] = false;
                    unset($_SESSION['alter_prod']);
                    $temp=preg_split("(\{|\})",$products[$i]['id']);
                    $products_id=$temp[0];
                    for ($j = 1; $j<sizeof($temp); $j=$j+2) {
                      if ($option == (int) $temp[$j]) {
                        $opt = (int) $temp[$j+1];
                      }
                    }
                    $attr_query=xtc_db_query("SELECT products_options_values_id,products_options_values_name FROM ". TABLE_PRODUCTS_OPTIONS_VALUES." pov, ".TABLE_PRODUCTS_ATTRIBUTES." pa
                                            WHERE pa.products_id = "
    .$products_id."
                                            AND pa.options_values_id = pov.products_options_values_id
                                            AND pov.language_id = "
    . $_SESSION['languages_id'] ."
                                            AND pa.options_id = "
    . $option . "
                                            ORDER BY pov.products_options_values_id"
    );

                    $select='<select name="attributes" onChange="this.form.submit()">';

                    while ($attr_res=xtc_db_fetch_array($attr_query)) {
                        $selected=$products[$i]['attributes'][$option]==$attr_res['products_options_values_id']?' selected="selected"':'';
                        $select.='<option value="'.$i.'-'.$products[$i]['attributes'][$option].'-'.$attr_res['products_options_values_id'].'-'.$opt.'"'.$selected.'>'.$attr_res['products_options_values_name'].'</option>';
                    } //EOWHILE

                    $select.='</select>';
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'EAN' =>$products[$i][$option]['products_attributes_ean'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'VALUE_NAME' => $select, //$products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="send" class="alter">'
                    );
                } else {
                    $module_content[$i]['ATTRIBUTES'][]=array(
                    'ID' =>$products[$i][$option]['products_attributes_id'],
                    'EAN' =>$products[$i][$option]['products_attributes_ean'],
                    'MODEL'=>xtc_get_attributes_model(xtc_get_prid($products[$i]['id']), $products[$i][$option]['products_options_values_name'],$products[$i][$option]['products_options_name']),
                    'NAME' => $products[$i][$option]['products_options_name'],
                    'VALUE_NAME' => $products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                    'ALTER' => '<input type="submit" name="alter" value="' . $i . '-' . $option . '" class="alter">'
                    );
                }

                    }
            }

    }

    $total_content = '';
    $total =$_SESSION['cart']->show_total();
    if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') {
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
                    $price = $total-$_SESSION['cart']->show_tax(false);
            } else {
                    $price = $total;
            }
            $discount = $xtPrice->xtcGetDC($price, $_SESSION['customers_status']['customers_status_ot_discount']);
            $total_content = $_SESSION['customers_status']['customers_status_ot_discount'].' % '.SUB_TITLE_OT_DISCOUNT.' -'.xtc_format_price($discount, $price_special = 1, $calculate_currencies = false).'<br />';
    }

    if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) $total-=$discount;
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) $total-=$discount;
            if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) $total-=$discount;
            $total_content .= SUB_TITLE_SUB_TOTAL.$xtPrice->xtcFormat($total, true).'<br />';
    } else {
            $total_content .= NOT_ALLOWED_TO_SEE_PRICES.'<br />';
    }

    if (SHOW_SHIPPING == 'true') {
      //BOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true
            //$module_smarty->assign('SHIPPING_INFO', ' '.SHIPPING_EXCL.'<a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'?KeepThis=true&TB_iframe=true&height=400&width=600"').' title="Information" class="thickbox""> '.SHIPPING_COSTS.'</a>');
            //BOF - web28 - 2010-11-05 fixed unsecure Links on SSL Pages
            //$module_smarty->assign('SHIPPING_INFO', ' '.SHIPPING_EXCL.' <a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'&KeepThis=true&TB_iframe=true&height=400&width=600').'" title="Information" class="thickbox">'.SHIPPING_COSTS.'</a>');
            $module_smarty->assign('SHIPPING_INFO', ' '.SHIPPING_EXCL.' <a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'&KeepThis=true&TB_iframe=true&height=400&width=600', $request_type).'" title="Information" class="thickbox">'.SHIPPING_COSTS.'</a>');
            //EOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true
    }
    if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
    $module_smarty->assign('UST_CONTENT', $_SESSION['cart']->show_tax());
    }
    // Versandkosten im Warenkorb
    include DIR_FS_CATALOG.'/includes/shipping_estimate.php';
    //-
    $module_smarty->assign('TOTAL_CONTENT', $total_content);
    $module_smarty->assign('language', $_SESSION['language']);
    $module_smarty->assign('module_content', $module_content);

    $module_smarty->caching = 0;
    $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/order_details.html');

    $smarty->assign('MODULE_order_details', $module);
    ?>

    lullifatz

    • Fördermitglied
    • Beiträge: 474
    Re: {$item_data.EAN} in order_details.html
    Antwort #11 am: 22. März 2013, 18:17:33
    Ich habe die Lösung!

    In der xtc_get_attributes.inc.php habe ich folgendes geändert

    Code: PHP  [Auswählen]
    $options_value_id_query=xtc_db_query("SELECT
                    pa.attributes_model,
        pa.attributes_ean
                    FROM
                    "
    .TABLE_PRODUCTS_ATTRIBUTES." pa
                    INNER JOIN "
    .TABLE_PRODUCTS_OPTIONS." po ON po.products_options_id = pa.options_id
                    INNER JOIN "
    .TABLE_PRODUCTS_OPTIONS_VALUES." pov ON pa.options_values_id = pov.products_options_values_id
                    WHERE
                    po.language_id = '"
    .$language."' AND
                    pa.products_id = '"
    .$product_id."' AND         
                    po.products_options_name = '"
    .addslashes($options_name)."' AND
                    pov.language_id = '"
    .$language."' AND
                    pov.products_options_values_name = '"
    .addslashes($attribute_name)."' AND
                    pa.products_id='"
    .$product_id."'");
            //EOF - Hetfield - 2009-08-11 - BUGFIX: #0000211 wrong modelnumbers on atrributes
            //EOF - Tomcraft - 2009-10-06 - ADDED addslashes by $option_name, $attribute_name
        $options_attr_data = xtc_db_fetch_array($options_value_id_query);
        return $options_attr_data['attributes_model'] . $options_attr_data['attributes_ean'] ;     

    Jetzt habe ich nur noch ein kleines Problem mit der Darstellung. Im Warenkorb zeigt er mir nun die Artikelnummer und ean ohne Freifeld. Dort möchte ich gerne einen <br> hinbekommen.

    Kann mir jemand sagen, wie ich das bei diesem Ausdruck hinbekomme:

    Code: PHP  [Auswählen]
    return $options_attr_data['attributes_model'] . $options_attr_data['attributes_ean'] ;
    Trade Republic - Provisionsfrei Aktien handeln
    1 Antworten
    1375 Aufrufe
    25. Januar 2017, 12:33:32 von Tomcraft
    14 Antworten
    5127 Aufrufe
    07. Januar 2016, 19:40:57 von HaldOn
    0 Antworten
    1033 Aufrufe
    01. August 2019, 12:06:16 von HaldOn
    0 Antworten
    1933 Aufrufe
    08. August 2012, 13:14:19 von Mellowbag
               
    anything