Spalte bei products hinzufügen
Habe eine besondere Schnittstelle, zu der ich in der Tabelle products eine Spalte shipping_module hinzugefügt habe.
Das ganze auch im der new_product.php .
PHP-Code:
<tr>
<td><?php echo TEXT_shipping_module; ?>
<?php echo xtc_draw_input_field('shipping_module',$pInfo->shipping_module,'size="25" value="0"'); ?></td>
</tr>
Ich weiß aber noch aus xt:c Zeiten, dass ich das noch wo definieren muss, irgendwas mit assign oder so, damit Daten aus diesem Feld dann auch in die DB übernommen werden, leider nicht mehr genau wo....
Wer kann helfen?
AW: Spalte bei products hinzufügen
PHP-Code:
$inputField = '<input id="test" name="test" size="25" value="">';
bzw.
PHP-Code:
$inputField = xtc_draw_input_field('shipping_module',$pInfo->shipping_module,'size="25" value="0"');
PHP-Code:
$smarty->assign('SHIPPING_MODULE', $inputField);
oder
PHP-Code:
$smarty->assign('SHIPPING_MODULE',xtc_draw_input_field('shipping_module',$pInfo->shipping_module,'size="25" value="0"'));
AW: Spalte bei products hinzufügen
Nö, irgendwie geht alles nicht.
Ich denke, irgendwo muss ich beim update der Daten die Daten des Feldes shipping_module noch übernehmen, die Frage ist, wo steht das drinnen.
Das Feld ist zwar da, aber das was man darin eingibt, wird nicht in die DB übernommen.
AW: Spalte bei products hinzufügen
So, habs gefunden.
in der categories.php ca Zeile 775 steht
PHP-Code:
$sql_data_array = array ('products_quantity' => xtc_db_prepare_input($products_data['products_quantity']),
in der nachfolgenden Array-Liste folgendes einfügen:
PHP-Code:
'shipping_module' => xtc_db_prepare_input($products_data['shipping_module']),
Das wärs hoffentlich.