Source for file LC_Page_FrontParts_Bloc_Category.php
Documentation is available at LC_Page_FrontParts_Bloc_Category.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH .
"pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php");
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_FrontParts_Bloc_Category.php 15532 2007-08-31 14:39:46Z nanasess $
$bloc_file =
'category.tpl';
$arrCategory_id =
$objDb->sfGetCategoryId($_GET['product_id'], $_GET['category_id']);
$this->tpl_category_id =
empty($arrCategory_id) ?
array(0) :
$arrCategory_id;;
$objSubView->assignobj($this);
.
BLOC_DIR .
'category.tpl';
$objSubView->assignobj($this);
function lfGetCatTree($arrParent_category_id, $count_check =
false) {
$from =
"dtb_category left join dtb_category_total_count using (category_id)";
$where =
"del_flg = 0 AND product_count > 0";
$objQuery->setoption("ORDER BY rank DESC");
$arrRet =
$objQuery->select($col, $from, $where);
foreach ($arrParent_category_id as $category_id) {
$arrParentID =
$objDb->sfGetParents($objQuery, 'dtb_category', 'parent_category_id', 'category_id', $category_id);
$arrBrothersID =
SC_Utils_Ex::sfGetBrothersArray($arrRet, 'parent_category_id', 'category_id', $arrParentID);
$arrChildrenID =
SC_Utils_Ex::sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $category_id);
$this->root_parent_id[] =
$arrParentID[0];
$arrDispID =
array_merge($arrBrothersID, $arrChildrenID);
foreach($arrRet as $key =>
$array) {
foreach($arrDispID as $val) {
if($array['category_id'] ==
$val) {
$arrRet[$key]['display'] =
1;
$this->arrTree =
$arrRet;
$from =
"dtb_category left join dtb_category_total_count using (category_id)";
// メインカテゴリーとその直下のカテゴリーを取得する。
$where =
'level <= 2 AND del_flg = 0';
$where .=
" AND product_count > 0";
$objQuery->setoption("ORDER BY rank DESC");
$arrRet =
$objQuery->select($col, $from, $where);
foreach ($arrRet as $cat) {
if ($cat['level'] !=
1) {
$arrChildrenID =
SC_Utils_Ex::sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $cat['category_id']);
$cat['has_children'] =
count($arrChildrenID) >
0;
$objSubPage->arrCat =
$arrMainCat;
Documentation generated on Tue, 28 Apr 2009 18:12:14 +0900 by phpDocumentor 1.4.2