示例#1
0
            $parents = ProductCategory::getSinglePath($selected_node_id);
            //print_r($parents->toArray());
            if (count($parents) >= 2) {
                $p = $parents[1];
            } else {
                $p = $parents[0];
            }
            $selected_parent_slug = $p['slug'];
            $hops = intval($select_node['level']) - intval($p['level']);
            //echo "level 2:".count($parents).":".$hops;
            //print_r($p->toArray());
            //$childs = $p->getNode()->getDescendants($hops);
            $childs = ProductCategory::getNodeChildrens($p['id'], $hops, $select_node['id']);
        }
        //build sub into html
        $show_sub = ProductCategory::buildTree($childs);
        //$show_sub .= ProductCategory::buildTree($next_childs);
    } else {
        echo "not found";
    }
    //$current_childs_node = ProductCategory::bll()->getChildByParentSlug_Front($cat_slug);
}
?>
<div class="left_box clearfix">
    <h3 class="box_title">
        <span>Sản phẩm</span>
    </h3>
    <div class="box_content clearfix">
        <div class="box_txt">
            <ul>
<?php