Prerequisites
Target
We would like to import a field in product table.
Setup
What is the field ID?: my_field (has to correspond exactly to the field name in the table)
ID: my_field
Name: my_field
if ($switchObject == 'my_field' && $GLOBALS['import_value'] != '') {
$value = $GLOBALS['import_value'];
$sql = "SELECT * FROM " . _DB_PREFIX_ . "product WHERE id_product='" . (int)$id_product . "' ";
$pdt_row = Db::getInstance()->ExecuteS($sql);
if (!empty($pdt_row[0]["id_product"])) {
$TODO[] = "UPDATE " . _DB_PREFIX_ . "product SET `".$switchObject."`='" . psql($value) . "' WHERE id_product='" . (int)$id_product . "'";
}
}
You will need to adapt this code to your needs.