当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils::sfNoImageMainList方法代码示例

本文整理汇总了PHP中Eccube\Framework\Util\Utils::sfNoImageMainList方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::sfNoImageMainList方法的具体用法?PHP Utils::sfNoImageMainList怎么用?PHP Utils::sfNoImageMainList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Eccube\Framework\Util\Utils的用法示例。


在下文中一共展示了Utils::sfNoImageMainList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doAction

 public function doAction($arrParam)
 {
     $arrRequest = $this->doInitParam($arrParam);
     if (!$this->isParamError()) {
         $masterData = Application::alias('eccube.db.master_data');
         $arrSTATUS = $masterData->getMasterData('mtb_status');
         $arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image');
         /* @var $objProduct Product */
         $objProduct = Application::alias('eccube.product');
         $arrSearchData = array('category_id' => $arrRequest['BrowseNode'], 'maker_name' => $arrRequest['Manufacturer'], 'name' => $arrRequest['Keywords'], 'orderby' => $arrRequest['Sort']);
         $arrSearchCondition = $this->getSearchCondition($arrSearchData);
         $disp_number = 10;
         $objQuery = Application::alias('eccube.query');
         $objQuery->setWhere($arrSearchCondition['where_for_count']);
         /* @var $objProduct Product */
         $objProduct = Application::alias('eccube.product');
         $linemax = $objProduct->findProductCount($objQuery, $arrSearchCondition['arrval']);
         /* @var $objNavi PageNavi */
         $objNavi = Application::alias('eccube.page_navi', $arrRequest['ItemPage'], $linemax, $disp_number);
         $arrProducts = $this->getProductsList($arrSearchCondition, $disp_number, $objNavi->start_row, $linemax, $objProduct);
         if (!Utils::isBlank($arrProducts)) {
             $arrProducts = $this->setStatusDataTo($arrProducts, $arrSTATUS, $arrSTATUS_IMAGE);
             Application::alias('eccube.product')->setPriceTaxTo($arrProducts);
             foreach ($arrProducts as $key => $val) {
                 $arrProducts[$key]['main_list_image'] = Utils::sfNoImageMainList($val['main_list_image']);
             }
             $arrData = array();
             foreach ($arrProducts as $key => $val) {
                 $arrData[] = array('product_id' => $val['product_id'], 'DetailPageURL' => HTTP_URL . 'products/detail.php?product_id=' . $val['product_id'], 'ItemAttributes' => $val);
             }
             $this->setResponse('Item', $arrData);
             return true;
         } else {
             $this->addError('ItemSearch.Error', '※ 要求された情報は見つかりませんでした。');
         }
     }
     return false;
 }
开发者ID:ChigusaYasoda,项目名称:ec-cube,代码行数:38,代码来源:ItemSearch.php

示例2: action

 /**
  * Page のAction.
  *
  * @return void
  */
 public function action()
 {
     /* @var $objCustomer Customer */
     $objCustomer = Application::alias('eccube.customer');
     $customer_id = $objCustomer->getValue('customer_id');
     switch ($this->getMode()) {
         case 'delete_favorite':
             // お気に入り削除
             $this->lfDeleteFavoriteProduct($customer_id, intval($_POST['product_id']));
             break;
         case 'getList':
             // スマートフォン版のもっと見るボタン用
             // ページ送り用
             if (isset($_POST['pageno'])) {
                 $this->tpl_pageno = intval($_POST['pageno']);
             }
             $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
             Application::alias('eccube.product')->setPriceTaxTo($this->arrFavorite);
             // 一覧メイン画像の指定が無い商品のための処理
             foreach ($this->arrFavorite as $key => $val) {
                 $this->arrFavorite[$key]['main_list_image'] = Utils::sfNoImageMainList($val['main_list_image']);
             }
             echo Utils::jsonEncode($this->arrFavorite);
             Application::alias('eccube.response')->actionExit();
             break;
         default:
             break;
     }
     // ページ送り用
     if (isset($_POST['pageno'])) {
         $this->tpl_pageno = intval($_POST['pageno']);
     }
     $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
     // 1ページあたりの件数
     $this->dispNumber = SEARCH_PMAX;
 }
开发者ID:ChigusaYasoda,项目名称:ec-cube,代码行数:41,代码来源:Favorite.php

示例3: doJson

 /**
  *
  * @return void
  */
 public function doJson()
 {
     $this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE);
     Application::alias('eccube.product')->setPriceTaxTo($this->arrProducts);
     // 一覧メイン画像の指定が無い商品のための処理
     foreach ($this->arrProducts as $key => $val) {
         $this->arrProducts[$key]['main_list_image'] = Utils::sfNoImageMainList($val['main_list_image']);
     }
     echo Utils::jsonEncode($this->arrProducts);
     Application::alias('eccube.response')->actionExit();
 }
开发者ID:ChigusaYasoda,项目名称:ec-cube,代码行数:15,代码来源:ProductsList.php


注:本文中的Eccube\Framework\Util\Utils::sfNoImageMainList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。