//get element attributes data $el_attr_shapes_data = $class_ea->retrieveListData('sha'); $el_attr_cuts_data = $class_ea->retrieveListData('cut'); $el_attr_size_data = $class_ea->retrieveListData('siz'); $empty_value = array('' => ''); $el_attr_shapes = $empty_value + $class_ea->useGermanNames('element_shape_id', $el_attr_shapes_data); $el_attr_cuts = $empty_value + $class_ea->useGermanNames('element_cut_id', $el_attr_cuts_data); $el_attr_sizes = $empty_value; foreach ($el_attr_size_data as $easzd) { if (strtolower(trim($easzd['name'])) == 'other') { continue; } $el_attr_sizes[$easzd['element_size_id']] = $easzd['name']; } $content .= '<tr><td>Stone Cut</td><td><select id="desc2_sc" class="input">' . loadComboListFromArray($el_attr_cuts, null, $p['pd2']['element_cut_id']) . '</select></td></tr>'; $amde_stone_cut = changeToAmazonDeCut($p['pd2']['element_cut_id']); if ($amde_stone_cut == '') { $amde_stone_cut = 'no value'; } $content .= '<tr><td>AM.DE Stone Cut</td><td><input id="desc2_amdesc" class="input" disabled="disabled" value="' . $amde_stone_cut . '" /> <span class="red">Auto Update</span></td></tr>'; $content .= '<tr><td>Stone Shape</td><td><select id="desc2_ss" class="input">' . loadComboListFromArray($el_attr_shapes, null, $p['pd2']['element_shape_id']) . '</select></td></tr>'; $content .= '<tr><td>Stone Size</td><td><select id="desc2_sz" class="input">' . loadComboListFromArray($el_attr_sizes, $p['pd2']['stone_size']) . '</select></td></tr>'; $content .= '<tr><td colspan="2"> </td></tr>'; $content .= '<tr><td colspan="2"><h2 style="padding:0;">Jewelry - Pearls Info</h2></td></tr>'; $content .= '<tr><td>Pearl Total</td><td><input id="desc2_tp" value="' . $p['pd2']['pearls_total'] . '" class="input" /></td></tr>'; $content .= '<tr><td>Pearl Type</td><td><select id="desc2_pt" class="input">' . loadComboListFromArray($pearls_type_tr, '', keyArraySearch($p['pd2']['pearls_type'], $pearls_type)) . '</select></td></tr>'; $content .= '<tr><td>Pearl Shape</td><td><select id="desc2_pa" class="input">' . loadComboListFromArray($pearls_shape, $p['pd2']['pearls_shape']) . '</select></td></tr>'; $content .= '<tr><td>Pearl Color</td><td><select id="desc2_pc" class="input">' . loadComboListFromArray($pearls_color, $p['pd2']['pearls_color']) . '</select></td></tr>'; $content .= '<tr><td>Pearl Size</td><td><select id="desc2_ps" class="input">' . loadComboListFromArray($pearls_size, $p['pd2']['pearls_size']) . '</select></td></tr>'; $content .= '<tr><td>Pearl Shine</td><td><select id="desc2_ph" class="input">' . loadComboListFromArray($pearls_shine, $p['pd2']['pearls_shine']) . '</select></td></tr>'; $content .= '<tr><td>Pearl Surface</td><td><select id="desc2_pu" class="input">' . loadComboListFromArray($pearls_surface, $p['pd2']['pearls_surface']) . '</select></td></tr>';
function amazonVDConstructXMLRow($is_article, $sp_detail, $pid, $pcode, $pdate, $ean, $nav1, $active_status, $last_active_status, $catid, $shortname, $promoname, $name, $keywords, $colors, $materials, $brand, $brand_id, $length, $price_list, $price_cost, $total_articles, $selling_point, $navigation) { global $navids, $brandlist, $class_s; $result = array(); $label_data = Product::getOldProductFunction()->generateLabelName($pid, $sp_detail['languages_id'], $catid, $brandlist[$brand_id]['brand_name'], '', '', $shortname, $length, $pcode, $promoname); $brand = $brand == '' ? $sp_detail['brand_id'] : $brand; $prodata = Product::getOldProductFunction()->retrieveDetail($pid, 'pd,pd2'); $colors_exploded = $colors == '' ? array() : explode(',', strtolower($colors)); foreach ($colors_exploded as $k => $v) { $colors_exploded[$k] = trim($v); } $colors_exploded_total = count($colors_exploded); $materials_exploded = $materials == '' ? array() : explode(',', $materials); foreach ($materials_exploded as $k => $v) { $materials_exploded[$k] = trim($v); } //check if goldplated and remove goldplate from material $is_goldplate = false; $key_goldplate = array_search('Vergoldet', $materials_exploded); if ($key_goldplate !== false) { $is_goldplate = true; unset($materials_exploded[$key_goldplate]); } $metal_type = 'Silber'; $color_name = ''; if ($is_goldplate) { if (Product::getOldProductFunction()->isUsingFinishing($pid, FINISHING_COLUMN_ROSEGOLDPLATE)) { $color_name = 'Roségold'; $metal_type = 'Silber vergoldet'; } } $data['EAN'] = $ean; $data['SKU'] = $pcode . ($length > 0 ? '_' . textLength($length, false) : ''); $data['LaunchDate'] = date('Y-m-d', strtotime($pdate)); $data['Title'] = $label_data['label_name']; //$data['Description'] = nl2br($desc); $data['VendorCode'] = "Julie & Grace, de jewelry, {$sp_detail['jng_id']}"; $product_symbol = $class_s->getProductStyles($pid); $name_symbol = array(); foreach ($product_symbol['Y'] as $symbol_name) { array_push($name_symbol, $symbol_name); } $data['Collection'] = implode(', ', $name_symbol); $is_beads = Product::getOldProductFunction()->productIsBeads($pid); $cat_data = translateAmazonVDCategory($catid, $price_list, $is_beads); if (count($materials_exploded) > 0) { if (in_array('Emaille', $materials_exploded)) { $material_type = 'Emaille'; } elseif (in_array('Glas', $materials_exploded)) { $material_type = 'Glas'; } elseif (in_array('Kautschuk', $materials_exploded)) { $material_type = 'Gummi'; } elseif (in_array('Holz', $materials_exploded)) { $material_type = 'Holz'; } elseif (in_array('Koralle', $materials_exploded)) { $material_type = 'Koralle'; } elseif (in_array('Kunststoff', $materials_exploded)) { $material_type = 'Kunststoff'; } elseif (in_array('Leder', $materials_exploded)) { $material_type = 'Leder'; } elseif (in_array('Textiles Velourleder', $materials_exploded)) { $material_type = 'Leder'; } elseif (in_array('Muschel', $materials_exploded)) { $material_type = 'Muschel'; } elseif (in_array('Samt', $materials_exploded)) { $material_type = 'Stoff'; } elseif (in_array('Garn', $materials_exploded)) { $material_type = 'Stoff'; } elseif (in_array('Baumwolle', $materials_exploded)) { $material_type = 'Stoff'; } elseif (in_array('Spitze', $materials_exploded)) { $material_type = 'Stoff'; } elseif (in_array('Nylon', $materials_exploded)) { $material_type = 'Stoff'; } elseif (in_array('Band', $materials_exploded)) { $material_type = 'Stoff'; } else { $material_type = 'Andere'; } } else { $material_type = 'Andere'; } //$data['MaterialType'] = (count($materials_exploded)>0) ? $materials_exploded[array_rand($materials_exploded, 1)] : 'Ohne'; $data['MaterialType'] = $material_type; $data['MaterialColor'] = $is_goldplate ? 'Gold' : 'Silber'; $data['ListPrice'] = $price_list; $data['CostPrice'] = $price_cost; $data['CostPrice'] = round($data['CostPrice'], 2); $data['BrowseNode'] = $navids[$nav1]; $data['ProductTypeName'] = $cat_data['ProductTypeName']; $data['ProductSubCategory'] = $cat_data['ProductSubCategory']; $data['ProductType'] = $cat_data['ProductType']; $data['ReplenishmentCategory'] = $last_active_status == '0' ? 'Neues Produkt' : 'Durchläufer'; $data['BrandName'] = $brand; //KEYWORDS maximum 188 chars $data['SubjectKeywords'] = isset($brandlist[$brand_id]) ? $brandlist[$brand_id]['brand_name'] : ''; $keywords_temp = array(); if ($keywords != '') { $keywords_array = explode(',', Product::getOldProductFunction()->keywordsParseRule($keywords)); $kw_length_start = strlen($data['SubjectKeywords']); $kw_length = $kw_length_start; foreach ($keywords_array as $kw) { $kwl = strlen($kw); $kw_length += $kw_length_start == 0 ? $kwl : $kwl + 1; if ($kw_length <= 188) { $keywords_temp[] = $kw; } else { $kw_length -= $kw_length_start == 0 ? $kwl : $kwl + 1; } } if (count($keywords_temp) > 0) { $keywords_temp = array_unique($keywords_temp); $data['SubjectKeywords'] .= ($kw_length_start == 0 ? '' : ',') . implode(",", $keywords_temp); } } //we dont need auto keywords anymore //$data['SubjectKeywords'] = addAutoKeywords($data['SubjectKeywords'], 188, $name, $colors); //$data['BulletPoint'] = explode(';', $selling_points); $data['VariationThemeID'] = ''; $data['RingSize'] = ''; $data['RingResizeable'] = $catid == '29' ? $prodata['pd2']['ring_resizeable'] : ''; $data['ItemDisplayLength'] = ''; $data['ItemDisplayLengthValue'] = ''; $data['ItemDisplayLengthUnit'] = ''; if (intval($length) > 0) { $data['VariationThemeID'] = $catid == '29' ? 'RING_SIZE' : 'ITEM_DISPLAY_LENGTH'; if ($catid == '29') { $size = textLength($length, false); $size2 = ringSizeToDiameter($size); $data['RingSize'] = "{$size} (" . number_format($size2, 1) . ")"; } else { $data['ItemDisplayLength'] = textLengthCentimeters($length); $length_split = explode(' ', $data['ItemDisplayLength']); $data['ItemDisplayLengthValue'] = $length_split[0]; $data['ItemDisplayLengthUnit'] = 'Centimeter'; } } //$data['FulfillmentLatency'] = ($deldays>0) ? $deldays : $sp_detail['delivery_time']; $data['StoneColorName'] = ''; if ($prodata['pd2']['stone_total'] > 0) { if ($colors_exploded_total == 1) { $color = trim($colors_exploded[0]); if ($color != '') { $available_colors = array('beige', 'blau', 'braun', 'creme', 'gelb', 'gold', 'grau', 'grün', 'orange', 'pink', 'rosa', 'rot', 'schwarz', 'silber', 'taupe', 'violett', 'weiß'); if (in_array($color, $available_colors)) { $data['StoneColorName'] = $color; } } } } $data['TotalArticle'] = $total_articles; $topic = Product::getOldProductFunction()->getTopicList(); $pd = $prodata['pd']; if (isset($pd['2']['topic_name'])) { $topic_name = $topic[$pd['2']['topic_name']]; } else { $topic_name = ''; } $desc2_label = Product::getOldProductFunction()->description2_label($prodata['pd2']); $data['ClaspType'] = $desc2_label['Verschluss']; if (!is_null($prodata['pd2']['gem_type']) && $prodata['pd2']['gem_type'] != '') { if ($prodata['pd2']['gem_type'] == 'Koralle' || $prodata['pd2']['gem_type'] == 12) { $gem_type = 'Muschel'; } elseif ($prodata['pd2']['gem_type'] == 'Rauchquarz' || $prodata['pd2']['gem_type'] == 'Rosenquarz' || $prodata['pd2']['gem_type'] == 'grün Quarz' || $prodata['pd2']['gem_type'] == 9 || $prodata['pd2']['gem_type'] == 15 || $prodata['pd2']['gem_type'] == 75) { $gem_type = 'Quarz'; } elseif ($prodata['pd2']['gem_type'] == 'Swarovski Kristalle' || $prodata['pd2']['gem_type'] == 'Bergkristall' || $prodata['pd2']['gem_type'] == 'Kyanit' || $prodata['pd2']['gem_type'] == 4 || $prodata['pd2']['gem_type'] == 13 || $prodata['pd2']['gem_type'] == 70) { $gem_type = 'Kristall'; } elseif ($prodata['pd2']['gem_type'] == 'Blauer Topas' || $prodata['pd2']['gem_type'] == 'Weisstopas' || $prodata['pd2']['gem_type'] == 72) { $gem_type = 'Topas'; } else { $gem_type = $prodata['pd2']['gem_type']; } } $sub_cat_query = "SELECT name FROM jng_sp_navigations WHERE jng_sp_id = 5 AND id = {$navigation}"; $sub_cat_result = tep_db_query($sub_cat_query); $sub_cat_amazon = mysql_fetch_row($sub_cat_result); $data['SubCategory'] = $sub_cat_amazon[0]; //foreach ($data as $key => $dt) $data[$key] = htmlentities($dt); if ($prodata['pd2']['chain_type'] == 'Bead' || $prodata['pd2']['chain_type'] == 6) { $sub_cat_2 = 'Bohnenkette'; } elseif ($prodata['pd2']['chain_type'] == 'Cable' || $prodata['pd2']['chain_type'] == 2 || $prodata['pd2']['chain_type'] == 'Elongated Cable' || $prodata['pd2']['chain_type'] == 5 || $prodata['pd2']['chain_type'] == 'Other' || $prodata['pd2']['chain_type'] == 7) { $sub_cat_2 = 'Standardgliederkette'; } elseif ($prodata['pd2']['chain_type'] == 'Curb' || $prodata['pd2']['chain_type'] == 4) { $sub_cat_2 = 'Panzerkette'; } elseif ($prodata['pd2']['chain_type'] == 'Rollo' || $prodata['pd2']['chain_type'] == 1) { $sub_cat_2 = 'Rolokette'; } elseif ($prodata['pd2']['chain_type'] == 'Snake' || $prodata['pd2']['chain_type'] == 3) { $sub_cat_2 = 'Schlangenkette'; } else { $sub_cat_2 = ''; } if ($prodata['pd2']['setting_type'] == 'Reihenfassung' || $prodata['pd2']['setting_type'] == 'Rahmenfassung' || $prodata['pd2']['setting_type'] == 7 || $prodata['pd2']['setting_type'] == 5) { $setting_type = 'Zargenfassung'; } elseif ($prodata['pd2']['setting_type'] == 'Mantelfassung' || $prodata['pd2']['setting_type'] == 3) { $setting_type = 'Kanalfassung'; } else { $setting_type = $prodata['pd2']['setting_type']; } $data['parent'] = array(); if (!$is_article) { $label_data = Product::getOldProductFunction()->generateLabelName($pid, $sp_detail['languages_id'], $catid, $brandlist[$brand_id]['brand_name'], '', '', $shortname, '0', $pcode, $promoname); $data['parent']['EAN'] = $data['EAN']; $data['parent']['ProductTypeName'] = $catid == '29' ? 'FINERING' : 'FINENECKLACEBRACELETTANKLET'; $data['parent']['VariationThemeID'] = $catid == '29' ? 'RING_SIZE' : 'ITEM_DISPLAY_LENGTH'; $data['parent']['RingSize'] = ''; $data['parent']['ItemDisplayLength'] = ''; $data['parent']['ParentName'] = $label_data['label_name']; $data['parent']['ChildName'] = ''; $data['parent']['PartNumber'] = $data['SKU']; $data['parent']['BrandName'] = $data['BrandName']; } $data['child'] = array(); $data['child']['EAN'] = $data['EAN']; $data['child']['ProductTypeName'] = $catid == '29' ? 'FINERING' : 'FINENECKLACEBRACELETTANKLET'; $data['child']['VariationThemeID'] = $catid == '29' ? 'RING_SIZE' : 'ITEM_DISPLAY_LENGTH'; $data['child']['RingSize'] = $data['RingSize']; $data['child']['ItemDisplayLength'] = $data['ItemDisplayLength']; $data['child']['ParentName'] = ''; $data['child']['ChildName'] = $data['Title']; $data['child']['PartNumber'] = $data['SKU']; $data['child']['BrandName'] = $data['BrandName']; if ($selling_point == '') { Product::getOldProductFunction()->setSellingPointToProducts($pid); $sp_prodata = Product::getOldProductFunction()->retrieveDetail($pid, 'pd'); $selling_point = $sp_prodata['pd'][2]['products_selling_points_amde']; } $amde_selling_points = explode(';', $selling_point); //ADDING ROW ITEM DATA $default_cell_style = ''; //'s93'; $the_cells = array(); // /*A - 1st COLUMN */ //$the_cells[] = ''; // /*B -[M] External Id */ $the_cells[] = $data['EAN']; // /*C -[M] External Id Type */ $the_cells[] = 'EAN'; // /*D -[M] Vendor Code */ $the_cells[] = $data['VendorCode']; // /*E -[O] Brand Name */ $the_cells[] = $data['BrandName']; // /*F -[O] New Brand Name */ $the_cells[] = ''; // /*G -[O] Designer's Name */ $the_cells[] = ''; // /*H -[O] Manufacturer's Name */ $the_cells[] = ''; //JNG_ADDRESS_NAME // /*I -[M] Browse Node */ $the_cells[] = $data['BrowseNode']; // /*J -[M] Product Type Name */ $the_cells[] = $data['ProductTypeName']; // /*K -[M] Product Sub Category */ $the_cells[] = $data['ProductSubCategory']; // /*L -[O] Topic */ $the_cells[] = $topic_name; // /*M -[M] Cost Price */ $the_cells[] = $data['CostPrice']; // /*N -[M] List Price */ $the_cells[] = $data['ListPrice']; // /*O -[O] inner package quantity */ $the_cells[] = ''; // /*P -[M] Official Part Number */ $the_cells[] = $data['SKU']; // /*Q -[O] Official Model Name */ $the_cells[] = ''; // /*R -[M] Subject Keywords */ $the_cells[] = $data['SubjectKeywords']; // /*S -[M] TargetAudienceKeywords */ $the_cells[] = LABEL_TARGET_AUDIENCE; // /*U -[M] Target Gender */ //$the_cells[] = 'Weiblich'; CELL REMOVED // /*U -[M] Product type */ //$the_cells[] = $data['ProductType']; CELL REMOVED // /*T -[O] Clasp Type */ $the_cells[] = $prodata['pd2']['clasp_type']; // /*U -[O] Back Finding */ $the_cells[] = ''; // /*V -[M] Title (item name) */ $the_cells[] = $data['Title']; // /*W -[M] Material Type */ $the_cells[] = $data['MaterialType']; // /*X -[M] Material Color */ $the_cells[] = $data['MaterialColor']; // /*Y -[M] Metal Type */ $the_cells[] = '925 Sterling Silber'; // /*Z -[O] Metal Finishing */ $the_cells[] = ''; // /*AA-[O] Total Metall Weight */ //$the_cells[] = ($prodata['pd2']['weight']>0 && $prodata['pd2']['stone_total']==0 && $prodata['pd2']['pearls_total']==0) ? number_format($prodata['pd2']['weight'], 1) : ''; // /*AA-[O] Total Weight */ $the_cells[] = ($prodata['pd2']['weight']>0) ? $prodata['pd2']['weight'] : ''; // /*AB-[O] Metal Stamp */ $the_cells[] = '925 Sterling Silber'; // /*AC-[O] Ring Size */ $the_cells[] = $data['RingSize']; // /*AD-[O] is ring resizable */ $the_cells[] = $data['RingResizeable']; // /*AE-[O] Item Display Diameter */ $the_cells[] = ''; // /*AF-[O] Item Display Height */ $the_cells[] = ($prodata['pd2']['height']>0) ? intval($prodata['pd2']['height']) : ''; // /*AG-[O] Item Display HeightUnit */ $the_cells[] = ($prodata['pd2']['height']>0) ? 'Millimeter' : ''; // /*AH-[O] Item Display Width */ $the_cells[] = ($prodata['pd2']['width']>0) ? intval($prodata['pd2']['width']) : ''; // /*AI-[O] Item Display WidthUnit */ $the_cells[] = ($prodata['pd2']['width']>0) ? 'Millimeter' : ''; // /*AJ-[O] Item Display Length */ $the_cells[] = $data['ItemDisplayLengthValue']; // /*AK-[O] Item Display LengthUnit */ $the_cells[] = $data['ItemDisplayLengthUnit']; // /*AL-[O] Gem Type */ $the_cells[] = (!is_null($prodata['pd2']['gem_type']) && $prodata['pd2']['gem_type'] != '') ? $prodata['pd2']['gem_type'] : 'Ohne'; // /*AM-[O] Setting Type */ $the_cells[] = $prodata['pd2']['setting_type']; // /*AN-[O] Number of Stones */ $the_cells[] = ($prodata['pd2']['stone_total']>0) ? $prodata['pd2']['stone_total'] : ''; // /*AO-[O] is lab created */ $the_cells[] = ''; // /*AP-[O] Total Gem Weight */ $the_cells[] = ''; // /*AQ-[O] Total Diamond Weight */ $the_cells[] = ($prodata['pd2']['diamond_total_weight']>0) ? $prodata['pd2']['diamond_total_weight'] : ''; // /*AR-[O] Stone Weight */ $the_cells[] = ''; // /*AS-[O] Stone Color (Diamond) */ $the_cells[] = $prodata['pd2']['diamond_color']; // /*AT-[O] Stone Clarity (Diamond) */ $the_cells[] = $prodata['pd2']['diamond_clarity']; // /*AU-[M] Stone Color */ $the_cells[] = $data['StoneColorName']; // /*AV-[O] Stone Shape/Steinschliff*/ //14.03.18 Diamond Stone Cut is hidden requested by Design Team, all stone cut now using Stone Cut Info // //$the_cells[] = ($prodata['pd2']['diamond_stone_cut']!='') ? $prodata['pd2']['diamond_stone_cut'] : changeToAmazonDeCut($prodata['pd2']['element_cut_id']); // $the_cells[] = changeToAmazonDeCut($prodata['pd2']['element_cut_id']); // /*AW-[O] Stone Depth Percentage */ $the_cells[] = ''; // /*AX-[O] Stone Table Percentage */ $the_cells[] = ''; // /*AY-[O] Stone Fluorescence */ $the_cells[] = ''; // /*AZ-[O] Stone Girdle (Diamond) */ $the_cells[] = $prodata['pd2']['diamond_girdle']; // /*BA-[O] Stone Polish (Diamond) */ $the_cells[] = $prodata['pd2']['diamond_polish']; // /*BB-[O] Stone Symmetry */ $the_cells[] = ''; // /*BC-[O] Certificate Type */ $the_cells[] = $prodata['pd2']['diamond_certificate_type']; // /*BD-[O] Certificate Number */ $the_cells[] = ''; // /*BE-[O] Number Of Pearls */ $the_cells[] = ($prodata['pd2']['pearls_total']>0) ? $prodata['pd2']['pearls_total'] : ''; // /*BF-[O] Pearl Type */ $the_cells[] = $prodata['pd2']['pearls_type']; // /*BG-[O] Pearl Minimum Color */ $the_cells[] = $prodata['pd2']['pearls_color']; // /*BH-[O] Size Per Pearl */ $the_cells[] = $prodata['pd2']['pearls_size']; // /*BI-[O] Pearl Lustre */ $the_cells[] = $prodata['pd2']['pearls_shine']; // /*BJ-[O] Pearl Shape */ $the_cells[] = $prodata['pd2']['pearls_shape']; // /*BK-[O] Pearl Surface Blemishes */ $the_cells[] = $prodata['pd2']['pearls_surface']; // /*BL-[O] Pearl Stringing Method */ $the_cells[] = ''; // /*BM-[O] Pearl Uniformity */ $the_cells[] = ''; // /*BN-[M] Replenishment Category */ $the_cells[] = $data['ReplenishmentCategory']; // /*BO-[O] Vendor Sku */ $the_cells[] = ''; // /*BP-[O] Variation of Size */ $the_cells[] = $data['TotalArticle']; // /*BQ-[O] Product highlights */ $the_cells[] = (isset($amde_selling_points[0]) && $amde_selling_points[0] != '') ? $amde_selling_points[0] : ''; // /*BR-[O] Product highlights */ $the_cells[] = (isset($amde_selling_points[1]) && $amde_selling_points[1] != '') ? $amde_selling_points[1] : ''; // /*BS-[O] Product highlights */ $the_cells[] = (isset($amde_selling_points[2]) && $amde_selling_points[2] != '') ? $amde_selling_points[2] : ''; //AMAZON NEW TEMPLATE (18/09/2014) /*A - 1st COLUMN */ //$the_cells[] = ''; /*B -[M] Set Up Type */ $the_cells[] = 'Durchläufer'; /*C -[M] Product Type Name */ $the_cells[] = 'Echtschmuck'; /*D -[M] Brand Name */ $the_cells[] = $data['BrandName']; /*E -[M] Vendor Code */ $the_cells[] = $data['VendorCode']; /*F -[O] Collection */ $the_cells[] = $data['Collection']; /*G -[M] Official Part Number */ $the_cells[] = $data['SKU']; /*H -[M] External Id Type */ $the_cells[] = 'EAN'; /*I -[M] External Id */ $the_cells[] = $data['EAN']; /*J -[O] Title Information */ $the_cells[] = $pd['2']['products_promo_name']; /*K -[M] TargetAudienceKeywords */ $the_cells[] = LABEL_TARGET_AUDIENCE; /*L -[M] Cost Price */ $the_cells[] = $data['CostPrice']; /*M -[M] List Price */ $the_cells[] = $data['ListPrice']; /*N -[O] inner package quantity */ $the_cells[] = ''; /*O -[M] Replenishment Category */ $the_cells[] = $data['ReplenishmentCategory']; /*P -[M] Product Category */ $the_cells[] = $data['ProductType']; /*Q -[M] Product Sub Category */ $the_cells[] = $data['SubCategory']; /*R -[O] Product Sub Category 2 */ $the_cells[] = $sub_cat_2; /*S -[O] Anlass */ $the_cells[] = $catid == '29' ? 'ohne' : ''; /*T -[O] Topic */ $the_cells[] = $topic_name; /*U -[O] Stilrichtung */ $the_cells[] = ''; /*V -[O] Metal Type */ $the_cells[] = $metal_type; /*W -[O] Metal Stamp */ $the_cells[] = '925'; /*X -[O] Metal Finishing */ $the_cells[] = ''; /*Y -[O] Total Weight */ $the_cells[] = $prodata['pd2']['weight'] > 0 ? $prodata['pd2']['weight'] : ''; /*Z -[O] Material Type */ $the_cells[] = $data['MaterialType']; /*AA-[O] Material Color */ $the_cells[] = $data['MaterialColor']; /*AB-[O] Color Name */ $the_cells[] = $color_name; /*AC-[O] Item Display Height */ $the_cells[] = $prodata['pd2']['height'] > 0 ? intval($prodata['pd2']['height']) / 10 : ''; /*AD-[O] Item Display Width */ $the_cells[] = $prodata['pd2']['width'] > 0 ? intval($prodata['pd2']['width']) / 10 : ''; /*AE-[O] Item Display Length */ $the_cells[] = $data['ItemDisplayLengthValue']; $product_diameter = (double) $prodata['pd2']['diameter'] / 10; /*AF-[O] Item Display Diameter */ $the_cells[] = $prodata['pd2']['diameter'] > 0 ? number_format($product_diameter, 1, '.', '') : ''; /*AG-[O] Back Finding */ $the_cells[] = $catid == '4' ? 'gestochen' : ''; /*AH-[O] Clasp Type */ $the_cells[] = $data['ClaspType'] == '' ? $prodata['pd2']['back_finding'] : $data['ClaspType']; /*AI-[M] Number of Stones */ $the_cells[] = $prodata['pd2']['stone_total'] > 0 ? $prodata['pd2']['stone_total'] : '0'; /*AJ-[O] Gem Type */ $the_cells[] = $gem_type; /*AK-[O] Stone Color */ $the_cells[] = $data['StoneColorName']; /*AL-[O] Stone Weigth (Stone 1) */ $the_cells[] = ''; /*AM-[O] Stone Nature */ $the_cells[] = ''; /*AN-[O] Gem Type (Stone 2) */ $the_cells[] = ''; /*AO-[O] Stone Color (Stone 2) */ $the_cells[] = ''; /*AP-[O] Stone Weigth (Stone 2) */ $the_cells[] = ''; /*AQ-[O] Gem Type (Stone 3) */ $the_cells[] = ''; /*AR-[O] Stone Color (Stone 3) */ $the_cells[] = ''; /*AS-[O] Stone Weigth (Stone 2) */ $the_cells[] = ''; /*AT-[O] Stone Color (Diamond) */ $the_cells[] = $prodata['pd2']['diamond_color']; if (is_null($prodata['pd2']['diamond_total_weight']) || $prodata['pd2']['diamond_total_weight'] == 0.0) { $diamond_total_weight = ''; } else { $diamond_total_weight = $prodata['pd2']['diamond_total_weight']; } /*AU-[O] Stone Weight (Diamond) */ $the_cells[] = $diamond_total_weight; /*AV-[O] Stone Clarity (Diamond)*/ $the_cells[] = $prodata['pd2']['diamond_clarity']; /*AW-[O] Stone Quality (Diamond) */ $the_cells[] = ''; /*AX-[M] Stone Shape */ //14.03.18 Diamond Stone Cut is hidden requested by Design Team, all stone cut now using Stone Cut Info //$the_cells[] = ($prodata['pd2']['diamond_stone_cut']!='') ? $prodata['pd2']['diamond_stone_cut'] : changeToAmazonDeCut($prodata['pd2']['element_cut_id']); $the_cells[] = changeToAmazonDeCut($prodata['pd2']['element_cut_id']); /*AY-[O] Setting Type */ $the_cells[] = $setting_type; /*AZ-[O] Certificate Type */ $the_cells[] = $prodata['pd2']['diamond_certificate_type']; /*BA-[O] Number Of Pearls */ $the_cells[] = $prodata['pd2']['pearls_total'] > 0 ? $prodata['pd2']['pearls_total'] : ''; /*BB-[O] Pearl Type */ $the_cells[] = $prodata['pd2']['pearls_type']; /*BC-[O] Pearl Minimum Color */ $the_cells[] = $prodata['pd2']['pearls_color']; /*BD-[O] Size Per Pearl */ $the_cells[] = $prodata['pd2']['pearls_size']; /*BE-[O] Pearl Lustre */ $the_cells[] = $prodata['pd2']['pearls_shine']; /*BF-[O] Pearl Shape */ $the_cells[] = $prodata['pd2']['pearls_shape']; /*BG-[O] Perlenknüpftechnik */ $the_cells[] = ''; /*BH-[O] Pearl Surface Blemishes */ $the_cells[] = $prodata['pd2']['pearls_surface']; /*BI-[O] GleichförmigkeitderPerlen*/ $the_cells[] = ''; /*BJ-[O] Ring Size */ $the_cells[] = $data['RingSize']; /*BK-[O] is ring resizable */ $the_cells[] = $data['RingResizeable']; /*BL-[O] Minimal Ring Size */ $the_cells[] = $prodata['pd2']['ring_resizeable'] == '' ? '' : '52'; /*BM-[O] Maximal Ring Size */ $the_cells[] = $prodata['pd2']['ring_resizeable'] == '' ? '' : '58'; /*BN-[O] Product Variation Type */ $the_cells[] = ''; /*BO-[O] Group Variation */ $the_cells[] = ''; /*BP-[O] Product set Affiliation */ $the_cells[] = ''; /*BQ-[O] Product set */ $the_cells[] = ''; /*BR-[O] Product highlights 1*/ $the_cells[] = isset($amde_selling_points[0]) && $amde_selling_points[0] != '' ? $amde_selling_points[0] : ''; /*BS-[O] Product highlights 2*/ $the_cells[] = isset($amde_selling_points[1]) && $amde_selling_points[1] != '' ? $amde_selling_points[1] : ''; /*BT-[O] Product highlights 3*/ $the_cells[] = isset($amde_selling_points[2]) && $amde_selling_points[2] != '' ? $amde_selling_points[2] : ''; /*BU-[O] Product Description */ $the_cells[] = $pd['2']['products_description']; /*BV-[O] Subject Keywords */ $the_cells[] = $data['SubjectKeywords']; /*BW-[O] is provided for dropship */ $the_cells[] = 'nein'; /*BX-[O] Vendor SKU */ $the_cells[] = ''; /*BY-[O] Packaging Height */ $the_cells[] = ''; /*BZ-[O] Packaging Length */ $the_cells[] = ''; /*CA-[O] Packaging Width */ $the_cells[] = ''; /*CB-[O] Packaging Weight */ $the_cells[] = ''; /*CC-[O] Chain Type */ $the_cells[] = $prodata['pd2']['chain_type'] != null && $prodata['pd2']['chain_type'] != '' ? $prodata['pd2']['chain_type'] : ''; $the_row = "\n" . ' <Row ss:AutoFitHeight="0">' . "\n"; $the_row .= amazonVDXMLCell(''); $cellcount = 1; foreach ($the_cells as $tc_key => $tc_val) { $cellcount++; if ($tc_val != '') { $indexnotoshow = $cellcount > 2 && $the_cells[$tc_key - 1] == '' ? $cellcount : 0; $the_row .= amazonVDXMLCell($tc_val, $indexnotoshow); } } $the_row .= '</Row>'; $xml_row = array(); $xml_row['I'] = $the_row; $xml_row['parent'] = $data['parent']; $xml_row['child'] = $data['child']; return $xml_row; }