я так понимаю что надо добавить новые поля в функцию
function uploadProducts( &$reader, &$database ) {
// find the default language id and default units
$languageId = $this->getDefaultLanguageId($database);
$defaultWeightUnit = $this->getDefaultWeightUnit();
$defaultMeasurementUnit = $this->getDefaultMeasurementUnit();
$defaultStockStatusId = $this->config->get('config_stock_status_id');
$data = $reader->sheets[1];
$products = array();
$product = array();
$isFirstRow = TRUE;
foreach ($data['cells'] as $row) {
if ($isFirstRow) {
$isFirstRow = FALSE;
continue;
}
$productId = trim(isset($row[1]) ? $row[1] : "");
if ($productId=="") {
continue;
}
$name = isset($row[2]) ? $row[2] : "";
$name = htmlentities( $name, ENT_QUOTES, $this->detect_encoding($name) );
$categories = isset($row[3]) ? $row[3] : "";
$sku = isset($row[4]) ? $row[4] : "0";
$location = isset($row[5]) ? $row[5] : "0";
$quantity = isset($row[6]) ? $row[6] : "0";
$model = isset($row[7]) ? $row[7] : " ";
$manufacturer = isset($row[8]) ? $row[8] : "";
$imageName = isset($row[9]) ? $row[9] : "";
$shipping = isset($row[10]) ? $row[10] : "yes";
$price = isset($row[11]) ? $row[11] : "0.00";
$dateAdded = (isset($row[12]) && (is_string($row[12])) && (strlen($row[12])>0)) ? $row[12] : "NOW()";
$dateModified = (isset($row[13]) && (is_string($row[13])) && (strlen($row[13])>0)) ? $row[13] : "NOW()";
$dateAvailable = (isset($row[14]) && (is_string($row[14])) && (strlen($row[14])>0)) ? $row[14] : "NOW()";
$weight = isset($row[15]) ? $row[15] : "0";
$unit = isset($row[16]) ? $row[16] : $defaultWeightUnit;
$length = isset($row[17]) ? $row[17] : "0";
$width = isset($row[18]) ? $row[18] : "0";
$height = isset($row[19]) ? $row[19] : "0";
$measurementUnit = isset($row[20]) ? $row[20] : $defaultMeasurementUnit;
$status = isset($row[21]) ? $row[21] : "true";
$taxClassId = isset($row[22]) ? $row[22] : "0";
$viewed = isset($row[23]) ? $row[23] : "0";
$langId = isset($row[24]) ? $row[24] : "1";
if ($langId!=$languageId) {
continue;
}
$keyword = isset($row[25]) ? $row[25] : "";
$description = isset($row[26]) ? $row[26] : "";
$description = htmlentities( $description, ENT_QUOTES, $this->detect_encoding($description) );
$meta_description = isset($row[27]) ? $row[27] : "";
$meta_description = htmlentities( $meta_description, ENT_QUOTES, $this->detect_encoding($meta_description) );
$meta_keywords = isset($row[28]) ? $row[28] : "";
$meta_keywords = htmlentities( $meta_keywords, ENT_QUOTES, $this->detect_encoding($meta_keywords) );
$additionalImageNames = isset($row[29]) ? $row[29] : "";
$stockStatusId = isset($row[30]) ? $row[30] : $defaultStockStatusId;
$storeIds = isset($row[31]) ? $row[31] : "";
$related = isset($row[32]) ? $row[32] : "";
$tags = isset($row[33]) ? $row[33] : "";
$sort_order = isset($row[34]) ? $row[34] : "0";
$subtract = isset($row[35]) ? $row[35] : "true";
$minimum = isset($row[36]) ? $row[36] : "1";
$cost = isset($row[37]) ? $row[37] : "0.00";
$product = array();
$product[0] = $productId;
$product[1] = $name;
$categories = trim( $this->clean($categories, FALSE) );
$product[2] = ($categories=="") ? array() : explode( ",", $categories );
if ($product[2]===FALSE) {
$product[2] = array();
}
$product[3] = $quantity;
$product[5] = $model;
$product[6] = $manufacturer;
$product[7] = $imageName;
$product[9] = $shipping;
$product[10] = $price;
$product[12] = $dateAdded;
$product[13] = $dateModified;
$product[14] = $dateAvailable;
$product[15] = $weight;
$product[16] = $unit;
$product[17] = $status;
$product[20] = $taxClassId;
$product[21] = $viewed;
$product[22] = $languageId;
$product[23] = $description;
$product[24] = $stockStatusId;
$product[25] = $meta_description;
$product[26] = $length;
$product[27] = $width;
$product[28] = $height;
$product[29] = $keyword;
$product[30] = $measurementUnit;
$product[31] = $sku;
$product[32] = $location;
$storeIds = trim( $this->clean($storeIds, FALSE) );
$product[33] = ($storeIds=="") ? array() : explode( ",", $storeIds );
if ($product[33]===FALSE) {
$product[33] = array();
}
$product[34] = ($related=="") ? array() : explode( ",", $related );
if ($product[34]===FALSE) {
$product[34] = array();
}
$product[35] = ($tags=="") ? array() : explode( ",", $tags );
if ($product[35]===FALSE) {
$product[35] = array();
}
$product[36] = $subtract;
$product[37] = $minimum;
$product[38] = $cost;
$product[39] = $meta_keywords;
$product[40] = $sort_order;
$products[$productId] = $product;
}
return $this->storeProductsIntoDatabase( $database, $products );
}
как и куда надо прописать ?