Esempio n. 1
0
 public static function isChildProduct($ProductId, $ChildProductId)
 {
     $ischild = false;
     $obj_retResult = DAL_manageProduct::getProductListByProductId($ChildProductId);
     //get child node
     if ($obj_retResult->type == 1) {
         $arr_ProductList = $obj_retResult->data;
         $obj_Product = $arr_ProductList[0];
         $arrParentIds = explode(",", $obj_Product->Url);
         foreach ($arrParentIds as $ProductParentId) {
             if ($ProductParentId == $ProductId) {
                 $ischild = true;
             }
         }
     }
     return $ischild;
 }