public function category($args) { list($name, $page) = $args; // $name; $name = urldecode($name); $cat = new ProdCat(); $arr = $cat->getWhere("cat_name LIKE '{$name}'"); // echo $name; ?> <style> .judulcategory { padding-top : 20px; padding-left : 15px; color : #AAA; font-size : 14px; } .judulcategory a { font-size : 14px; color : #AAA; font-family : 'Open Sans', sans-serif; font-weight : normal; } .judulcategory a:hover { text-decoration : underline; } .h1category { padding-top : 20px; padding-bottom : 0px; padding-left : 15px; margin : 0; padding-bottom : 30px; color : #000; font-style : italic; font-family : 'Libre Baskerville', serif; font-size : 28px; } </style> <?php if (count($arr) > 0) { // pr($arr); $arrParent = array(); $arrpp = ProdCat::getAllParents($arr[0]->cat_parent_id, $arrParent); //pr($arrpp); $arrpp2 = array_reverse($arrpp); foreach ($arrpp2 as $bc) { $str[] = "<a href='" . _SPPATH . "pwa/category/" . urlencode($bc->cat_name) . "'>" . $bc->cat_name . "</a>"; } /* * print breadcrumbs if(count($arrpp2)>0) echo "<div class='judulcategory'>".implode(" > ",$str)." > </div>"; */ ?> <h1 class="h1category"><?php echo ucwords($name); ?> </h1> <?php $pc = new ProdModel(); //pagination if ($page < 1 || $page == "") { $page = 1; } $limit = 21; $begin = ($page - 1) * $limit; $link = _SPPATH . "pwa/category/" . urlencode($name) . "/|x|"; $jml = $pc->getJumlah("prod_cat_id = '{$arr[0]->cat_id}'"); //end pagination $arrp = $pc->getWhere("prod_cat_id = '{$arr[0]->cat_id}' LIMIT {$begin},{$limit}"); //pr($arrp); foreach ($arrp as $num => $prod) { $cw = new Cw(); $cw->productPrinter($prod); if ($num % 3 == 2) { ?> <div class="clearfix"></div> <?php } } ?> <div class="clearfix"></div> <div class="gantihal" style="text-align: center;"> <?php //begin pagination BootstrapUX::pagination($page, $jml, $limit, $link); ?> </div> <?php } }