Also ich mach mal den Anfang fürs Admin, das is ja echt einfach:
in der SQL Datenbank den Befehl ausführen:
ALTER TABLE products_attributes ADD COLUMN attributes_ean VARCHAR(64);
Datei: /admin/new_attributes.php
Das suchen:$attrib_query = xtc_db_query("SELECT products_id, options_id, options_values_id, options_values_price, price_prefix, attributes_model, attributes_stock, options_values_weight, weight_prefix, sortorder FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id = " . $_POST['copy_product_id']);
while ($attrib_res = xtc_db_fetch_array($attrib_query)) {
xtc_db_query("INSERT into ".TABLE_PRODUCTS_ATTRIBUTES." (products_id, options_id, options_values_id, options_values_price, price_prefix, attributes_model, attributes_stock, options_values_weight, weight_prefix, sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $attrib_res['options_id'] . "', '" . $attrib_res['options_values_id'] . "', '" . $attrib_res['options_values_price'] . "', '" . $attrib_res['price_prefix'] . "', '" . $attrib_res['attributes_model'] . "', '" . $attrib_res['attributes_stock'] . "', '" . $attrib_res['options_values_weight'] . "', '" . $attrib_res['weight_prefix'] . "', '" . $attrib_res['sortorder'] . "')");
Ersetzen mit:$attrib_query = xtc_db_query("SELECT products_id, options_id, options_values_id, options_values_price, price_prefix, attributes_model, attributes_ean, attributes_stock, options_values_weight, weight_prefix, sortorder FROM ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id = " . $_POST['copy_product_id']);
while ($attrib_res = xtc_db_fetch_array($attrib_query)) {
xtc_db_query("INSERT into ".TABLE_PRODUCTS_ATTRIBUTES." (products_id, options_id, options_values_id, options_values_price, price_prefix, attributes_model, attributes_ean, attributes_stock, options_values_weight, weight_prefix, sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $attrib_res['options_id'] . "', '" . $attrib_res['options_values_id'] . "', '" . $attrib_res['options_values_price'] . "', '" . $attrib_res['price_prefix'] . "', '" . $attrib_res['attributes_model'] . "', '" . $attrib_res['attributes_ean'] . "' , '" . $attrib_res['attributes_stock'] . "', '" . $attrib_res['options_values_weight'] . "', '" . $attrib_res['weight_prefix'] . "', '" . $attrib_res['sortorder'] . "')");
Datei: /admin/includes/modules/new_attributes_include.php
Das suchen:echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_MODEL."</strong></TD>";
danach einfügen:echo "<TD class=\"dataTableHeadingContent\"><strong>".ATTR_EAN."</strong></TD>";
Das suchen:echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_model\" value=\"" . $attribute_value_model . "\" size=\"15\"></TD>";
danach einfügen:echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_ean\" value=\"" . $attribute_value_ean . "\" size=\"15\"></TD>";
Datei: /admin/includes/modules/new_attributes_functions.php
Das Suchen:global $attribute_value_price,$sortorder, $attribute_value_weight, $attribute_value_weight_prefix, $attribute_value_prefix, $attribute_value_model, $attribute_value_stock, $posCheck, $negCheck, $posCheck_weight, $negCheck_weight,$attribute_value_download_count, $attribute_value_download_expire,$attribute_value_download_filename;
Ersetzen mit:global $attribute_value_price,$sortorder, $attribute_value_weight, $attribute_value_weight_prefix, $attribute_value_prefix, $attribute_value_model, $attribute_value_ean, $attribute_value_stock, $posCheck, $negCheck, $posCheck_weight, $negCheck_weight,$attribute_value_download_count, $attribute_value_download_expire,$attribute_value_download_filename;
Das suchen:$attribute_value_model = $line['attributes_model'];
danach einfügen:$attribute_value_ean = $line['attributes_ean'];
Das suchen:$attribute_value_model = '';
danach einfügen:$attribute_value_ean = '';
Datei: /admin/includes/modules/new_attributes_change.php
das suchen:$value_model = $_POST[$cv_id . '_model'];
danach einfügen:$value_ean = $_POST[$cv_id . '_ean'];
das suchen: xtc_db_query
("INSERT INTO ".TABLE_PRODUCTS_ATTRIBUTES
." (products_id, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."')") or
die(mysql_error()); ersetzen mit:xtc_db_query
("INSERT INTO ".TABLE_PRODUCTS_ATTRIBUTES
." (products_id, options_id, options_values_id, options_values_price, price_prefix ,attributes_model, attributes_ean, attributes_stock, options_values_weight, weight_prefix,sortorder) VALUES ('" . $_POST['current_product_id'] . "', '" . $optionsID . "', '" . $_POST['optionValues'][$i] . "', '" . $value_price . "', '" . $value_prefix . "', '" . $value_model . "', '" . $value_ean . "', '" . $value_stock . "', '" . $value_weight . "', '" . $value_weight_prefix . "','".$value_sortorder."')") or
die(mysql_error()); Datei: /lang/german/admin/new_attributes.php
suchen:define('ATTR_MODEL','Artikel Nr.'); danach einfügen:Datei: /lang/english/admin/new_attributes.php
suchen:define('ATTR_MODEL','Attribute Model'); danach einfügen:FERTIG! Jetzt kann man die EANs schon mal eintragen bei den Attributen und die werden in der DB gespeichert.