Jump to content
xt:Commerce Community Forum

Übersicht Lagerbestand


pascalclement71

Recommended Posts

Hallo

Ich habe nach einer Übersicht für einen Lagerbestand im Admin Bereich gesucht und nichts gefunden. Ich habe mir desshalb selber so ein Lagerbestand gemacht.

Ich ahbe mir daher einen Menüpunt unter Statistiken eingebaut.

Dass Ergebnis dann der Übersicht:

Area.bmp

lagerbestand.bmp

Hier noch meine Anleitung:

Tabelle admin_access erweitern:

ALTER TABLE `Deinen_datenbank_namen`.`admin_access` MODIFY COLUMN `econda` INT(1) UNSIGNED NOT NULL DEFAULT 0,

ADD COLUMN `stats_products_stock` INT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER `econda`;

Denn Wert von customer_id auf “1” setzen und die Gruppe auf “5”, je nach Anzahl der Kundengruppen.

Datei column_left unter /admin/includes/erweitern

nach

  echo ('<div class="dataTableHeadingContent"><b>'.BOX_HEADING_STATISTICS.'</b></div>');
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['stats_products_viewed'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_VIEWED . '</a><br>';
if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['stats_products_purchased'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_PURCHASED . '</a><br>';[/PHP]

[b]dieser code einfügen:[/b]

[PHP] if (($_SESSION['customers_status']['customers_status_id'] == '0') && ($admin_access['stats_products_stock'] == '1')) echo '<a href="' . xtc_href_link(FILENAME_STATS_PRODUCTS_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_STOCK . '</a><br>';[/PHP]

[b]Unter /lamg/german/admin/ eine Datei stats_products_stock.php amlegen, mit folgendem Inhalt.[/b]

[PHP]<?php
define('HEADING_TITLE', 'Lagerbestand');
define('TABLE_HEADING_NUMBER', 'Artikelnummer');
define('TABLE_HEADING_PRODUCTS', 'Artikel');
define('TABLE_HEADING_STOCK', 'Lagerbestand');
?>[/PHP]

[b]In der Datei /lang/admin/german.php folgende Zeile einfügen:[/b]

[PHP]define('BOX_PRODUCTS_STOCK', 'Laberbestand');[/PHP]

[b]In der Datei /admin/includes/applications_top.php folgede Zeile einfügen.[/b]

[PHP] define('FILENAME_STATS_PRODUCTS_STOCK', 'stats_products_stock.php');[/PHP]

[b]Datei stats_pruducts_stock.php unter /admin/ anlegeen[/b]

Inhalt.

[PHP]<?php
require('includes/application_top.php');
?>
<!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 $_SESSION['language_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">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" 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 class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS.'heading_statistic.gif'); ?></td>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
</tr>
<tr>
<td class="main" valign="top">XT Statistics</td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MODEL; ?></td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
<td class="dataTableHeadingContent" align="center">
<?php echo TABLE_HEADING_STOCK; ?> </td>
</tr>
<?php
$products_query = xtc_db_query("SELECT p.products_model, p.products_id, p.products_quantity, pd.products_name FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE pd.language_id = '" . $_SESSION['languages_id'] . "' AND pd.products_id = p.products_id ORDER BY products_quantity");

while ($products_values = xtc_db_fetch_array($products_query))
{
echo '<tr>';
echo '<td width="10%" class="dataTableContent">' .$products_values.'products_model'].'</td>';
echo '<td width="85%" class="dataTableContent"><a href="' . xtc_href_link(FILENAME_CATEGORIES, 'pID=' . $products_values['products_id'] . '&action=new_product') . '"><b>' . $products_values['products_name'] . '</b></a></td>';
echo '<td width="5%" class="dataTableContent">'.$products_values['products_quantity'].'</td>';
echo '</tr>';
$products_attributes_query = xtc_db_query("SELECT
pov.products_options_values_name,
pa.attributes_stock
FROM
" . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
WHERE
pa.products_id = '".$products_values['products_id'] . "' AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '" . $_SESSION['languages_id'] . "' ORDER BY pa.attributes_stock");
while ($products_attributes_values = xtc_db_fetch_array($products_attributes_query))
{
echo '<tr>';
echo '<td width="10%" class="dataTableContent">' .$products_values['products_model'].'</td>';
echo '<td width="50%" class="dataTableContent">    -' . $products_attributes_values['products_options_values_name'] . '</td><td width="50%" class="dataTableContent">';
if ($products_attributes_values['attributes_stock'] <= '0') {
echo '<font color="ff0000"><b>' . $products_attributes_values['attributes_stock'] . '</b></font>';
} else {
echo $products_attributes_values['attributes_stock'];
}
echo '</td></tr>';
}
}
?>
</table>
</td>
</tr>
</table></td>
</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'); ?>[/PHP]

[color="Red"]Diese Beschreibung ist nur für die Deutsche Version. Für alle anderen Sprachen natürlich die jeweiligen dateien anpassen oder erstellen.[/color]

Ich hoffe ich habe nichts vergessen :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...