Wenn ich die Attribut-Matrix klicke heißt es:
"Sie haben zur Zeit keine Produkte."
- obwohl ein Artikel sowie Attribute angelegt wurden.
Hat der Artikel den auch 2 unterschiedliche Attribute ?
z.b. Farbe und größe
Die Mysql Fehler sind Folgefehler es wird keine ID übergeben und daher kommt es dann zum Fehler.
Ich kann mal suchen und mache dort eine Sicherheitsabfrage dann kann nix passieren.
Die Lösung für die admin/includes/modules/new_product.php
ist folgender der Code zum Einfügen in diese datei muss lauten:
SUCHEN NACH:
<td><span class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></span></td>
<td><span class="main"><?php echo xtc_draw_input_field('products_quantity', $pInfo->products_quantity, 'style="width: 135px"'); ?></span></td>
ERSETZEN MIT : (Dieser CODE ist der RICHTIGE in den "geänderten dateien" ist diese richtige Version)
<?php
// BOF - Attribut Matrix mit Bild - edit 18.08.2014 by Mr.Mc.Mauser
// Artikelanzahl anhand der Attribute Berechnen
/* ORIGINAL
<td><span class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></span></td>
<td><span class="main"><?php echo xtc_draw_input_field('products_quantity', $pInfo->products_quantity, 'style="width: 135px"'); ?></span></td>
*/
$quantity_field = '
<td><span class="main">'.TEXT_PRODUCTS_QUANTITY.'</span></td>
<td><span class="main">'.xtc_draw_input_field('products_quantity', $pInfo->products_quantity, 'style="width: 135px"').'</span></td>
';
if ($_GET['pID']) {
$attribute = xtc_db_fetch_array(xtc_db_query('SELECT count(*) AS attri FROM '.TABLE_PRODUCTS_ATTRIBUTES.' WHERE products_id ='. $_GET['pID']));
if ($attribute['attri'] <> 0) {
$matrix = xtc_db_fetch_array(xtc_db_query('SELECT count(*) AS matrix FROM '.TABLE_PRODUCTS_OPTIONS_MATRIX.' WHERE products_id ='. $_GET['pID']));
if ($matrix['matrix'] <> 0) {
$quantity_text = TEXT_PRODUCTS_QUANTITY_MATRIX;
} else {
$quantity_text = TEXT_PRODUCTS_QUANTITY_ATTRI;
}
$quantity_field = '
<td><span class="main">'.$quantity_text.'</span></td>
<td><span class="main">'.$pInfo->products_quantity . xtc_draw_hidden_field('products_quantity', $pInfo->products_quantity).'</span></td>
';
}
}
echo $quantity_field;
// EOF - Attribut Matrix mit Bild - edit 18.08.2014 by Mr.Mc.Mauser
?>