public function getArrProducts()
 {
     $objPage = new LC_Page_Products_List_Ex();
     $objPage->orderby = "date";
     $objPage->init();
     $objPage->arrSearchData = array();
     $detect = new Mobile_Detect();
     if ($detect->is("iOS")) {
         $objPage->arrSearchData["category_id"] = 2;
     } else {
         $objPage->arrSearchData["category_id"] = 1;
     }
     $arrSearchCondition = $objPage->lfGetSearchCondition($objPage->arrSearchData);
     $arrProducts = $objPage->lfGetProductsList($arrSearchCondition, NEW_CONTENTS_SEARCH_PMAX, 0, $this->objProduct);
     unset($arrProducts["productStatus"]);
     return $arrProducts;
 }
Example #2
0
 * 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.
 *
 * モバイルサイト/商品リスト
 */
// {{{ requires
require_once "../require.php";
require_once CLASS_EX_PATH . "page_extends/products/LC_Page_Products_List_Ex.php";
// }}}
// {{{ generate page
$objPage = new LC_Page_Products_List_Ex();
register_shutdown_function(array($objPage, "destroy"));
$objPage->mobileInit();
$objPage->mobileProcess();
 /**
  * 検索条件のwhere文とかを取得
  *
  * @return array
  */
 public function lfGetSearchCondition(&$arrSearchData)
 {
     $searchCondition = parent::lfGetSearchCondition($arrSearchData);
     GC_Utils_Ex::gfPrintLog(print_r($this->arrForm, true), DEBUG_LOG_REALFILE);
     $objSql = new SC_SelectSql_Ex();
     $objSql->setWhere($searchCondition['where']);
     $character_id = $this->arrForm['character_id'];
     if (SC_Utils_Ex::sfIsInt($character_id)) {
         $this->arrSearchData["character_id"] = $character_id;
         $objSql->setWhere("product_id IN (\n                        SELECT product_id\n                        FROM cp_dtb_product_characters\n                        INNER JOIN cp_dtb_character USING(character_id)\n                        WHERE character_id = ?\n                        AND   cp_dtb_character.status  = 1\n                        AND   cp_dtb_character.del_flg = 0\n                    )");
         $searchCondition['arrval'][] = intval($character_id);
     }
     $searchCondition['where'] = $objSql->getWhere(false);
     $searchCondition['where_for_count'] = $objSql->getWhere(false);
     return $searchCondition;
 }
Example #4
0
/*
 * 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.
 */
// {{{ requires
require_once "../require.php";
require_once CLASS_EX_PATH . "page_extends/products/LC_Page_Products_List_Ex.php";
// }}}
// {{{ generate page
$objPage = new LC_Page_Products_List_Ex();
register_shutdown_function(array($objPage, "destroy"));
$objPage->init();
$objPage->process();