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: Attributartikelnummer anzeigen

    Nils

    • Schreiberling
    • Beiträge: 422
    • Geschlecht:
    Attributartikelnummer anzeigen
    am: 07. Mai 2015, 18:33:40
    Hallo,

    ich gebs nach 8 Stunden rumprobieren auf. Ich wollte in der box_cart die Artikelattributnummer angezeigt bekommen. Ich habs einmal hinbekommen, aber dann wieder was verändert und dann wurd es wieder nicht mehr angezeigt. Lange Rede. Kann mir jemand helfen?
    Ich hab mittlerweile so fast alles, was mir einfällt in die shopping_cart.php eingefügt und es klappt dennoch nicht. So sieht meine shopping_cart.php derzeit aus:

    Code: PHP  [Auswählen]
    <?php
      /* -----------------------------------------------------------------------------------------
       $Id: shopping_cart.php 3072 2012-06-18 15:01:13Z hhacker $

       modified eCommerce Shopsoftware
       http://www.modified-shop.org

       Copyright (c) 2009 - 2013 [www.modified-shop.org]
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(shopping_cart.php,v 1.18 2003/02/10); www.oscommerce.com
       (c) 2003 nextcommerce (shopping_cart.php,v 1.15 2003/08/17); www.nextcommerce.org
       (c) 2006 XT-Commerce (shopping_cart.php 1281 2005-10-03); www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

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


      $box_smarty = new smarty;

      $box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
    $box_smarty->assign('options', $products_options_data);
    $box_smarty->assign('TOTAL_CONTENT', $total_content);
    $box_smarty->assign('language', $_SESSION['language']);
    $box_smarty->assign('module_content', $module_content);
    $box_smarty->assign('TOTAL_WEIGHT', $_SESSION['cart']->weight + SHIPPING_BOX_WEIGHT);
    $box = $box_smarty->fetch(CURRENT_TEMPLATE.'/module/order_details.html');
    $smarty->assign('MODULE_order_details', $module);






      // define defaults
      $products_in_cart = array ();
      $module_content = array ();
      $discount = $qty = 0;
      $total = 0.0;
    $any_out_of_stock = '';
    $mark_stock = '';
    $hidden_options = '';
      // include needed files
    require_once (DIR_FS_INC.'xtc_recalculate_price.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');
    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_draw_separator.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_form.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_input_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_checkbox_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_selection_field.inc.php');
    require_once(DIR_FS_INC . 'xtc_draw_hidden_field.inc.php');


      if ($_SESSION['cart']->count_contents() > 0) {

        $total = $_SESSION['cart']->show_total();






        // build array with cart content and count quantity  
        if (strpos($PHP_SELF, FILENAME_LOGOFF) === false) {
          $products = $_SESSION['cart']->get_products();
          $sizeof_products = sizeof($products);
          for ($i = 0, $n = $sizeof_products; $i < $n; $i++) {
            $qty += $products[$i]['quantity'];
                   
                   
                   
                     //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>';
      //show 'delete link' in shopping cart
      $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>';
                     
                     
                   
            $products_in_cart[] = array (
                                                                             
                                                                             
                                                                             'QTY' => $products[$i]['quantity'],
                                         'LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($products[$i]['id'], $products[$i]['name'])),
                                                                             'NAME' => $products[$i]['name'],
                                                                             'PRODUCTS_MODEL' => $products[$i]['model'],
                                                                             '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'],
                                    'BOX_DELETE' => xtc_draw_checkbox_field('cart_delete[]', $products[$i]['id']),
                                    'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($products[$i]['id'], $products[$i]['name'])),
                                    'BUTTON_DELETE' => $del_button,
                                    'LINK_DELETE' => $del_link,                  
                                    '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']),
                                                                    'MODEL' => $products_options[$i]['attributes_model'],
                                                                    'ID2' => $products[$i][$option]['products_attributes_id'],
                                                                    'MODEL2' => $products[$i][$option]['attributes_model'],
                                                                    'NAME2' => $products[$i][$option]['products_options_name'],
                                                                    'VALUE_NAME' => $products[$i][$option]['products_options_values_name'].$attribute_stock_check,
                                                                    'ATTR' => '1',
                                                                               'ATTRIBUTES' => '',
                                                                    'ID' => $attributes['products_attributes_id'],
                                                                 'MODEL3' => $attributes['attributes_model'],
                                                                 'EAN' => $attributes['attributes_ean'],
                                                                 'NAME2' => $attributes['products_options_name'],
                                                                 'VALUE_NAME2' => $attributes['products_options_values_name'].$attribute_stock_check
                                                                                                                   
                         
                                                   
                                                                             
                                                                             );
          }
        }

        // sales discount
        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']);
          $box_smarty->assign('DISCOUNT', $xtPrice->xtcFormat(($discount * (-1)), $price_special = 1, $calculate_currencies = false));
        }
       
        // generate total price
        if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
          if ($discount) {
            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;
          }
          $box_smarty->assign('TOTAL', $xtPrice->xtcFormat($total, true));
        }

        $box_smarty->assign('UST', $_SESSION['cart']->show_tax());
        $box_smarty->assign('SHIPPING_INFO', SHOW_SHIPPING == 'true' ? $main->getShippingLink() : '');

      }

      $box_smarty->assign('deny_cart', strpos($PHP_SELF, 'checkout') !== false ? 'true' : 'false'); // no cart at the checkout
      $box_smarty->assign('products', $products_in_cart);
      $box_smarty->assign('PRODUCTS', $qty);
      $box_smarty->assign('empty', $qty > 0 ? 'false' : 'true');
      $box_smarty->assign('ACTIVATE_GIFT', ACTIVATE_GIFT_SYSTEM == 'true' ? 'true' : false);

      // GV Code
      if (isset($_SESSION['customer_id'])) {
        $gv_query = xtc_db_query("-- /templates/".CURRENT_TEMPLATE."/source/boxes/shopping_cart.php
                                  SELECT amount
                                    FROM "
    .TABLE_COUPON_GV_CUSTOMER."
                                   WHERE customer_id = '"
    .(int)$_SESSION['customer_id']."'");
        $gv_result = xtc_db_fetch_array($gv_query);
        if ($gv_result['amount'] > 0) {
          $box_smarty->assign('GV_AMOUNT', $xtPrice->xtcFormat($gv_result['amount'], true, 0, true));
          $box_smarty->assign('GV_SEND_TO_FRIEND_LINK', '<a href="'.xtc_href_link(FILENAME_GV_SEND).'">');
        }
        if (isset($_SESSION['gv_id'])) {
          $gv_query = xtc_db_query("-- /templates/".CURRENT_TEMPLATE."/source/boxes/shopping_cart.php
                                    SELECT coupon_amount
                                      FROM "
    .TABLE_COUPONS."
                                     WHERE coupon_id = '"
    .(int)$_SESSION['gv_id']."'");
          $coupon = xtc_db_fetch_array($gv_query);
          $box_smarty->assign('COUPON_AMOUNT2', $xtPrice->xtcFormat($coupon['coupon_amount'], true, 0, true));
        }
        if (isset($_SESSION['cc_id'])) {
          $box_smarty->assign('COUPON_HELP_LINK', '<a target="_blank" class="thickbox" title="Information" href="'.xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID='.$_SESSION['cc_id']. '&KeepThis=true&TB_iframe=true&height=400&width=600', $request_type).'">Information</a>');
        }
      }

      $box_smarty->assign('LINK_CART', xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
      $box_smarty->caching = 0;
      $box_smarty->assign('language', $_SESSION['language']);
      $box_shopping_cart = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_cart.html');
      $smarty->assign('box_CART', $box_shopping_cart);
     
     
     
    ?>

    Weiß jemand woran es liegt, dass das nicht angezeigt wird?

    MFG
    Nils

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

    Nils

    • Schreiberling
    • Beiträge: 422
    • Geschlecht:
    Re: Attributartikelnummer anzeigen
    Antwort #1 am: 11. Mai 2015, 02:33:37
    Hallo,

    ich habe mal eine Frage an die Profis mit Informatikstudium oder Ähnlichem, die sich in folgender Hinsicht auskennen:
    Ich habe den "Fehler" gefunden:

    Ich habe eine Shopping_Cart mit einer anderen Dateigröße und einem anderen Hash-Wert als in meinem vorherigen Backup und beide Dateien sind mit WinMerge nicht unterscheidbar und beide haben dieselbe Codierung. Wie kann es dann dazu kommen, dass Hash und Dateigröße unterschiedlich sind und die eine Datei sehr merkwürdige Probleme verursacht und die andere Datei funktioniert?

    MFG
    Nils
    Modulshop - Eine große Auswahl an neuen und hilfreichen Modulen für die modified eCommerce Shopsoftware
    4 Antworten
    2700 Aufrufe
    21. April 2015, 18:14:09 von Nils
    1 Antworten
    2804 Aufrufe
    07. September 2010, 13:59:37 von Tomcraft
    2 Antworten
    2785 Aufrufe
    15. Juli 2014, 10:54:13 von thenew
               
    anything