am: 27. März 2012, 14:50:42
Hier kann man den Lagerbestand über die Artikelliste im Adminbereich aktualisieren:
In der categories.php nach (ca. Zeile 88)
//regular actions
if ($_GET['action']) {
switch ($_GET['action']) {
folgendes einfügen:
// stock update in product listing begins case 'new_stock': $pID = xtc_db_prepare_input
($_GET['pID']); xtc_db_query
("update products set products_quantity = " . $_GET["new_stock"]." where products_id = $pID "); xtc_redirect
(xtc_href_link
(FILENAME_CATEGORIES
, xtc_get_all_get_params
(array('pID', 'action')) . 'pID=' . $pID ));// stock update in product listing ends In der categories_view.php nach (ca. Zeile 745)
$contents[] = array('text' => '<div style="padding-left: 30px;">' . $price_string. '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_DISCOUNT_ALLOWED_INFO
. ' ' . $pInfo->products_discount_allowed . '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_QUANTITY_INFO
. ' ' . $pInfo->products_quantity . '</div>'); // END IN-SOLUTION folgendes einfügen:
// stock update in product listing begins $contents[] = array('text' => '<div style="padding-left: 30px; padding-bottom: 10px;"><form action="' . xtc_href_link
(FILENAME_CATEGORIES
, xtc_get_all_get_params
(array('$cPath', 'action')) . 'oID=' . $pInfo->products_id . '&action=new_stock') . ' method="post" name="new_stock"><input type="hidden" name="pID" value="' . $pInfo->products_id . '"><input type="text" name="new_stock" size="7" value="'.$pInfo->products_quantity.'"><input type="hidden" name="action" value="new_stock"><input type="hidden" name="cPath" value="' . $cPath . '"><input type="submit" value="'.TEXT_PRODUCTS_NEW_STOCK
.'">'. '</div>'); // stock update in product listing ends und in der Sprachdatei categories.php noch folgendes einfügen:
// stock update in product listing beginsdefine('TEXT_PRODUCTS_NEW_STOCK', 'Lagerbestand ändern');// stock update in product listing ends Quelle:
http://addons.oscommerce.com/info/4812Linkback: https://www.modified-shop.org/forum/index.php?topic=19168.0