Antwort #4 am: 14. September 2010, 17:39:12
Hallo rattenfänger,
hier mal eine Lösung.
In /includes/classes/product.php in Z. 390 nach
function buildDataArray(&$array,$image='thumbnail') {
das einfügen:
require_once (DIR_FS_INC.'xtc_check_stock.inc.php');
Dann in Z. 397 nach
$buy_now = ''; //DokuMan: Undefined variable: buy_now
das einfügen:
$products_quantity = '';
if (STOCK_CHECK == 'true') {
$mark_stock = xtc_get_products_stock($array['products_id']);
}
In Zeile 404 das ändern:
if ($_SESSION['customers_status']['customers_status_show_price'] != '0') { if ($_SESSION['customers_status']['customers_fsk18'] == '1') { if (isset($array['products_fsk18']) && $array['products_fsk18'] == '0') $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']); } else { $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']); } } in:
if ($mark_stock> 0) { if ($_SESSION['customers_status']['customers_status_show_price'] != '0') { if ($_SESSION['customers_status']['customers_fsk18'] == '1') { if (isset($array['products_fsk18']) && $array['products_fsk18'] == '0') { $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']); $products_quantity = (int
)$array['products_quantity']; } } else { $buy_now = $this->getBuyNowButton($array['products_id'], $array['products_name']); $products_quantity = (int
)$array['products_quantity']; } } } und als Letzes in Z.474 das:
'PRODUCTS_QUANTITY' => (int)$array['products_quantity'],
ändern in das:
'PRODUCTS_QUANTITY' => $products_quantity,
Dann sollte der Button ausgeblendet sein.
Vielleicht auch interessant für zukünftige Änderungen in den neuen Versionen. (?)
Viele Grüße
Franky