Source for file LC_Page_FrontParts_Bloc_Recommend.php
Documentation is available at LC_Page_FrontParts_Bloc_Recommend.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 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_REALDIR . 'pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_FrontParts_Bloc_Best5 - Copy.php -1 $
$objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
$this->arrInfo = $objSiteInfo->data;
* @return array $arrBestProducts 検索結果配列
$objQuery = & SC_Query_Ex::getSingletonInstance();
$objProduct = new SC_Product_Ex();
$col = 'best_id, best_id, category_id, rank, product_id, title, comment, create_date, update_date';
$table = 'dtb_best_products';
$objQuery->setOrder('rank');
$objQuery->setLimit(RECOMMEND_NUM);
$arrBestProducts = $objQuery->select($col, $table, $where);
$objQuery = & SC_Query_Ex::getSingletonInstance();
if (count($arrBestProducts) > 0) {
$where = 'product_id IN (';
foreach ($arrBestProducts as $key => $val) {
$arrProductId[] = $val['product_id'];
$arrTmp = $objProduct->getListByProductIds($objQuery, $arrProductId);
foreach ($arrTmp as $key => $arrRow) {
$arrProductList[$arrRow['product_id']] = $arrRow;
$arrRow = & $arrBestProducts[$key];
if (isset ($arrProductList[$arrRow['product_id']])) {
$arrRow = array_merge($arrRow, $arrProductList[$arrRow['product_id']]);
unset ($arrBestProducts[$key]);
Documentation generated on Fri, 24 Feb 2012 14:02:01 +0900 by Seasoft
|