示例#1
0
function _exportToYandexMarket($f, $rate, $export_product_name)
{
    $spArray = array('exprtUNIC' => array('mode' => 'toarrays', 'expProducts' => array()));
    $exportCategories = array(array(), array());
    _exportBegin($f);
    _exportAllCategories($f, $spArray['exprtUNIC']['expProducts']);
    _exportProducts($f, $rate, $export_product_name, $spArray['exprtUNIC']['expProducts']);
    _exportEnd($f);
}
示例#2
0
 function _exportToYandexMarket($f, $rate, $export_product_name, $categories_select)
 {
     _exportBegin($f);
     $cates = array();
     foreach ($categories_select as $ess) {
         $catess = catCalculatePathToCategory($ess);
         foreach ($catess as $ess_m) {
             if ($ess_m['categoryID'] != 1) {
                 $cates[] = $ess_m['categoryID'];
             }
         }
     }
     $categories_select_all = array_merge($categories_select, $cates);
     $categories_select_all = array_unique($categories_select_all);
     _exportAllCategories($f, $categories_select_all);
     _exportProducts($f, $rate, $export_product_name, $categories_select);
     _exportEnd($f);
 }