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: Modul funktioniert nur mit xt:Commerce und nicht mit modified eCommerce Shopsoftware

    Boris

    • Fördermitglied
    • Beiträge: 102
    Hallo,
    das Modul funktioniert leider nicht mit modified eCommerce Shopsoftware.
    Das Modul kann keine Artikel abfragen.
    Unterschied doch so groß?  :?
    Hir mal das Modul

    Code: PHP  [Auswählen]
    <?php

    /* -----------------------------------------------------------------------------------------
       $Id: quick_stockupdate.php  $

       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 (account.php,v 1.59 2003/05/19); www.oscommerce.com
       (c) 2003      nextcommerce (account.php,v 1.12 2003/08/17); www.nextcommerce.org

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


    include('includes/application_top.php');

    $max_cols = 1;
    $languages_id = $_SESSION['languages_id'];

    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
    <SCRIPT LANGUAGE="JavaScript1.2" SRC="jsgraph/graph.js"></SCRIPT>
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->

    <!-- body //-->
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
            <tr>
            <td width="<?php echo BOX_WIDTH; ?>" valign="top">
                            <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
                            <!-- left_navigation //-->
                            <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
                            <!-- left_navigation_eof //-->
                    </table>
                    </td>
    <!-- body_text //-->
                    <td width="100%" valign="top">

    <table style="border:none" border="0" width="90%" align="center" class="none"><tr><td>
    <?php

     if ($HTTP_POST_VARS['stock_update']) {

         $stock = 0;
         $status_a = 0;
         $status_d = 0;

      while (list($key, $items) = each($HTTP_POST_VARS['stock_update'])) {
       echo "key".$key;
       $sql = "UPDATE products SET products_sort = '".$items['sort']."', products_quantity = '".$items['stock']."', products_model = '".$items['model']."', products_price = '".$items['price']."', products_weight = '".$items['weight']."' WHERE products_id = $key";
       $update = xtc_db_query($sql);
       $stock_i++;

       if ($HTTP_POST_VARS['update_status']) {
         if ($items['stock']>= 1 ) {
                           $dereac = xtc_db_query("UPDATE products SET products_status = 1 WHERE products_id = $key");
         $status_a++;
         }else{
                           $dereac = xtc_db_query("UPDATE products SET products_status = 0 WHERE products_id = $key");
         $status_d++;
        }
       }
      }
     }
    ?>
    <br><form method="post" action="quick_stockupdate.php">
    <?php

          $sql = xtc_db_query("SELECT c.categories_id, cd.categories_name from categories c, categories_description cd WHERE c.parent_id = 0 AND c.categories_id = cd.categories_id AND cd.language_id = ".$languages_id." ");
           echo '<center><font face="Genvea,Arial"><b>Lagerverwaltung und Sortierungsbearbeitung</b>'. xtc_draw_separator('pixel_trans.gif', '100%', '3') . '</center><table border="0" align="center"><tr>';
            while ($parents = xtc_db_fetch_array($sql)) {
               $check = xtc_db_query("SELECT products_id FROM products_to_categories WHERE categories_id = '" . $parents['categories_id'] . "'");
               if (xtc_db_num_rows($check)> 0) {

                  $tree = xtc_get_category_tree();
                  $dropdown= xtc_draw_pull_down_menu('cat_id', $tree, '', 'onChange="this.form.submit();"'); //single
                  $all_list = '<form method="post" action="quick_stockupdate.php"><th class="smallText" align="left" valign="top">Alle Kategorien:<br>' . $dropdown . '</form></th>';

               } else {

            }
           }
           echo $list . $all_list . '</form></tr></table><p>';

      if ($HTTP_POST_VARS['cat_id']) {

          echo '<form method="post" action="quick_stockupdate.php"><table border="0" width="100%" cellspacing=2 cellpadding=2>';
           $i = 0;

                         $sql2 = xtc_db_query("SELECT p.products_sort, p.products_model, p.products_id, p.products_quantity, p.products_status, p.products_weight, p.products_price, pd.products_name, pd.products_short_description from products p, products_to_categories ptc, products_description pd where p.products_id = ptc.products_id and p.products_id = pd.products_id and language_id = ".$languages_id." and ptc.categories_id = '" . $HTTP_POST_VARS['cat_id'] . "'order by p.products_model");
                     $sql3 = xtc_db_query("SELECT cd.categories_name from categories_description cd WHERE cd.categories_id = '" . $HTTP_POST_VARS['cat_id'] . "' AND cd.language_id = ".$languages_id." limit 1");
    $resultscat = xtc_db_fetch_array($sql3);
             echo '<th class="smallText">Kategorie: <font color="red">' . $resultscat['categories_name'] . '</th>';
                     echo '<tr class="dataTableHeadingRow"><td class="dataTableContent" align="left"><b>Artikel-Nr.</b></td><td class="dataTableContent" align="left"><b>Reihung</b></td><td class="dataTableContent" align="left"><b>ID#</b></td><td class="dataTableContent" align="left"><b>Bezeichnung</b></td><td class="dataTableContent" align="left"><b>Gewicht</b></td><td class="dataTableContent" align="left"><b>Preis</b></td><td class="dataTableContent" align="left"><b>Artikelanzahl</b></td></tr>';
         while ($results = xtc_db_fetch_array($sql2)) {
               $i++;
                 echo '<tr class="dataTableRow"><td class="dataTableContent" align="left"><input type="text" size="16" name="stock_update[' . $results['products_id'] . '][model]" value="' . $results['products_model'] . '"><i>';
                             echo '</td><td class="dataTableContent" align="left"><input type="text" size="5" name="stock_update[' . $results['products_id'] . '][sort]" value="' . $results['products_sort'] . '"></i><i>';
                             echo '</td><td class="dataTableContent" align="left">' . $results['products_id'] . '</td><td class="dataTableContent" align="left">' . $results['products_name'] . ' - ' . $results['products_short_description'];
                             echo '</td><td class="dataTableContent" align="left"><input type="text" size="3" name="stock_update[' . $results['products_id'] . '][weight]" value="' . $results['products_weight'] . '"></i><i>';
                             echo '</td><td class="dataTableContent" align="left"><input type="text" size="5" name="stock_update[' . $results['products_id'] . '][price]" value="' . $results['products_price'] . '"></i><i>';
                             echo '</td><td class="dataTableContent" align="left"><input type="text" size="4" name="stock_update[' . $results['products_id'] . '][stock]" value="' . $results['products_quantity'] . '"></i><i>';
                 echo (($results['products_status'] == 0) ? '<font color="ff0000"><b>deaktiviert</b>' : '<font color="009933"><b>aktiviert</b>');
                 echo '</i></td></tr>';
              if ($i == $max_cols) {
                   $i =0;
             }
        }
      echo '</table><table border="0" width="100%" cellspacing=2 cellpadding=2><tr>';
      echo '<input type="hidden" name="cat_id" value="' . $HTTP_POST_VARS['cat_id'] . '">';
      echo '</tr><br><td align="center" colspan="10" class="smallText">';
      echo '<input type="checkbox" name="update_status" checked>Makieren um die Artikel abhängig von der Lagermenge zu aktivieren oder zu deaktivieren.<br><i>(Lagermenge 1 oder mehr <font color="009933"><b>aktiviert</b> den Artikel / Lagermenge von 0 <font color="ff0000"><b>deaktiviert</b> den Artikel)</i><p>';
      echo '<input type="submit" value="Update"></td></tr></form>';
      }
    ?>
        </tr></table>
      </td>
    </tr></table>
                    </td>
    <!-- body_text_eof //-->
            </tr>
    </table>
    <!-- body_eof //-->

    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
     


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

    DokuMan

    • modified Team
    • Beiträge: 6.669
    • Geschlecht:
    Besteht das Modul nur aus dieser 1 Datei?
    Kannst du das mal als Dateianhang zu deinem Forenposting anfügen?
    So ist es leider sehr unübersichtlich.

    vr

    • modified Team
    • Beiträge: 2.664
    Bist Du mit dem Shop auf einem neuen Server? Die Abfrage der $HTTP_POST_VARS ist veraltet, vielleicht liegt es daran, schau mal bitte hier

    Grüße, Volker

    Boris

    • Fördermitglied
    • Beiträge: 102
    JA, ist nur die

    Local mit xampp und XTC funktioniert es ja.

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.369
    • Geschlecht:
    Hier hat jemand das selbe Problem, wobei das Modul angeblich mit modified eCommerce Shopsoftware funktionieren soll: MODUL: Schnelle Artikel Lagerverwaltung & Sortierungsbearbeitung

    Grüße

    Torsten
               
    anything