コード例 #1
0
            $sudah[] = $ss->VariantID;
            $sem[$ss->VariantID] = $ss;
        } else {
            $sem[$ss->VariantID]->TaggingLevel3ID .= " " . $ss->TaggingLevel3ID;
        }
    }
    \Leap\View\InputConditionTBS::printer($sem);
}
if ($action == "2") {
    $n = new \MProdModel();
    $m = new MArticleTagging();
    $z = new MProdCat();
    $mode = "all";
    if ($mode == "all") {
        $n->default_read_coloms = "*";
        $arrN = $n->getAll();
    } else {
        if ($mode == "filter1") {
            $arrN = $n->getWhereFromMultipleTable("{$n->table_name}.BaseArticleID = ecommultiple__articletagging.BaseArticleID", array("MArticleTagging"));
        } else {
            $arrN = $n->getWhereFromMultipleTable("{$n->table_name}.BaseArticleID = ecommultiple__articletagging.BaseArticleID AND ecommultiple__articletagging.TaggingLevel3ID = ecommultiple__product_category.cat_id", array("MArticleTagging", "MProdCat"));
        }
    }
    $sudah = array();
    $num = 0;
    $bisa = 0;
    foreach ($arrN as $ss) {
        if (!in_array($ss->VariantID, $sudah)) {
            $sudah[] = $ss->VariantID;
            //            $arr = $z->getWhere("cat_id = '".$ss->TaggingLevel3ID."'");
            //            $ss->tagging = $arr;
コード例 #2
0
 static function loadData()
 {
     $n = new MProdModel();
     $m = new MArticleTagging();
     $z = new MProdCat();
     $mode = "all";
     if ($mode == "all") {
         $n->default_read_coloms = "*";
         $arrN = $n->getAll();
     } else {
         if ($mode == "filter1") {
             $arrN = $n->getWhereFromMultipleTable("{$n->table_name}.BaseArticleID = ecommultiple__articletagging.BaseArticleID", array("MArticleTagging"));
         } else {
             $arrN = $n->getWhereFromMultipleTable("{$n->table_name}.BaseArticleID = ecommultiple__articletagging.BaseArticleID AND ecommultiple__articletagging.TaggingLevel3ID = ecommultiple__product_category.cat_id", array("MArticleTagging", "MProdCat"));
         }
     }
     $sudah = array();
     $num = 0;
     $bisa = 0;
     foreach ($arrN as $ss) {
         if (!in_array($ss->VariantID, $sudah)) {
             $sudah[] = $ss->VariantID;
             //            $arr = $z->getWhere("cat_id = '".$ss->TaggingLevel3ID."'");
             //            $ss->tagging = $arr;
             if ($mode == "all") {
                 $arr = $m->getWhere("BaseArticleID = '" . $ss->BaseArticleID . "'");
                 //                pr($arr);
                 if (count($arr) < 1) {
                     $ss->TaggingLevel3ID = "";
                     $num++;
                 } else {
                     $imp = array();
                     foreach ($arr as $sss) {
                         $imp[] = $sss->TaggingLevel3ID;
                     }
                     $bisa++;
                     $ss->TaggingLevel3ID = implode(" ", $imp);
                 }
             }
             $sem[$ss->VariantID] = $ss;
         }
         //            else {
         //                $sem[$ss->VariantID]->TaggingLevel3ID .= " " . $ss->TaggingLevel3ID;
         //            }
     }
 }