if ($maxkeywords > 64) {
     $maxkeywords = 64;
 }
 //don't send manual keywords to otto.de
 //$keywords = $p['keywords'];
 $keywords = '';
 $keywords_name = $properName == '' ? $p['name'] : '';
 $keywords = addAutoKeywords($keywords, $maxkeywords, $keywords_name, '', ', ');
 if ($keywords == '') {
     $keywords = $product_categories_name[$p['categories_id']];
 }
 $xml_content .= writeXMLline('KeyWord', $keywords, 2);
 //Product description
 $p['description'] .= str_replace("\n", '<br>', categoryExtraDescription($p['categories_id'], $sp_detail['languages_id']));
 $pd2data = $class_pm->retrieveDetail($p['products_id'], 'pd2');
 $desc2_label = $class_pm->description2_label($pd2data['pd2']);
 $proddesc2 = array();
 foreach ($desc2_label as $label => $value) {
     $proddesc2[] = $label . ': ' . $value;
 }
 $p['description'] .= '<br><br>Produktdetails:<br><ul><li>' . implode('</li><li>', $proddesc2) . '</li></ul>';
 $html_long_desc = $p['description'];
 $long_desc = strip_tags(str_replace('<li>', ' ', $html_long_desc));
 $xml_content .= writeXMLline('LongDesc', $long_desc, 2);
 $xml_content .= writeXMLline('HTMLLongDesc', $html_long_desc, 2);
 //Warengruppe / Class of Goods
 $warengruppe = translateOttoCategory($p['categories_id']);
 $xml_content .= writeXMLline('ClassOfGoods', $warengruppe, 2);
 //Product Navigatins (nav ids) / Cluster
 $sp_navid = $navids[$p['navigation']];
 $sp_navid2_split = explode(',', $p['navigation2']);
 $xmlt->drawTag($xml_product, 'P_BRAND', '', array('identifier' => 'name', 'key' => $brand_name));
 //P_KEYWORDS
 $xml_pkeywords = $xmlt->drawTag($xml_product, 'P_KEYWORDS');
 $keywords = explode(',', $parent_data['pd'][$lid]['products_head_keywords_tag']);
 foreach ($keywords as $keyword) {
     $kword = explode(' ', trim($keyword));
     foreach ($kword as $kw) {
         if ($kw != '') {
             //P_KEYWORD
             $xml_pkeyword = $xmlt->drawTag($xml_pkeywords, 'P_KEYWORD');
             $xmlt->drawTag($xml_pkeyword, 'VALUE', $kw, array('xml:lang' => 'x-default'));
         }
     }
 }
 //P_COMPONENTDATA
 $pcomp_from_desc2 = $class_pm->description2_label($parent_data['pd2'], $parent_data['categories_id']);
 $xml_pcomponentdata = $xmlt->drawTag($xml_product, 'P_COMPONENTDATA');
 //MATERIALS DATA, USED FOR P_COMPONENT AND P_TAGS (Material)
 $materials = $parent_data['materials'];
 //P_COMPONENT
 $xml_pcomponent = $xmlt->drawTag($xml_pcomponentdata, 'P_COMPONENT', '', array('identifier' => 'name', 'key' => 'Material'));
 $xmlt->drawTag($xml_pcomponent, 'VALUE', implode(', ', $materials), array('xml:lang' => 'x-default'));
 //PDESC2
 foreach ($pcomp_from_desc2 as $label => $value) {
     //P_COMPONENT
     $xml_pcomponent = $xmlt->drawTag($xml_pcomponentdata, 'P_COMPONENT', '', array('identifier' => 'name', 'key' => $label));
     $xmlt->drawTag($xml_pcomponent, 'VALUE', $value, array('xml:lang' => 'x-default'));
 }
 //P_TAGS (Attributes)
 $gender = $class_pm->productGenderName($parent_data['p']['products_gender']);
 $p_length = $parent_data['pnc']['products_length'];
예제 #3
0
if (is_null($products_id)) {
    exit;
}
$draft = new design_draft(null, $products_id);
$product = $class_pm->retrieveDetail($products_id, 'p,pd,pd2,pnc,cat,pci,pei');
$brand = $class_pb->retrieveDetail($product['p']['products_brand_id']);
$length = '';
//SET SELLING POINT IF NOT YET SET
if (!isset($product['pd']['2']['products_selling_points']) || $product['pd']['2']['products_selling_points'] == '' || $product['pd']['2']['products_selling_points'] == null || (!isset($product['pd']['2']['products_selling_points_amde']) || $product['pd']['2']['products_selling_points_amde'] == '' || $product['pd']['2']['products_selling_points_amde'] == null)) {
    $spoint_result = $class_pm->setSellingPointToProducts($products_id);
    $product['pd']['2']['products_selling_points'] = $spoint_result[$products_id]['products_selling_points'];
    $product['pd']['2']['products_selling_points_amde'] = $spoint_result[$products_id]['products_selling_points_amde'];
}
$product_selling_points = explode(';', $product['pd']['2']['products_selling_points']);
$product_selling_points_amde = explode(';', $product['pd']['2']['products_selling_points_amde']);
$product_materials_info = $class_pm->description2_label($product['pd2']);
if ($product['pnc']['products_length'] > 0) {
    $length .= '<strong>' . textLength($product['pnc']['products_length']) . '</strong>';
    $articles = $class_pa->retrieveList($products_id);
    if (count($articles) > 0) {
        foreach ($articles as $a) {
            $length .= ' &sdot; ';
            $length .= textLength($a['length']);
        }
    }
}
$added_to_amvd = false;
$amvd_provision = 0;
$amvd_catalog = array('jng_sp_catalog_id' => '0', 'price_new' => '');
$spq = tep_db_query("SELECT jc.jng_sp_id FROM jng_sp_catalog jc INNER JOIN jng_sp ON jng_sp.jng_sp_id=jc.jng_sp_id AND jng_sp.active_status=1 WHERE products_id={$products_id}");
if (tep_db_num_rows($spq) > 0) {