質問 > フロント機能 > 【緊急】スマホ商品一覧 表示不具合:追記 |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
tomo_s |
投稿日時: 2020/2/11 10:25
対応状況: −−−
|
新米 登録日: 2014/5/1 居住地: 投稿: 2 |
Re: 【緊急】スマホ商品一覧 表示不具合:追記 今更ではありますが、この問題について解決方法を考えました。
この問題についてなのですが、以下のようにすることで解決できました。 LC_Page_Products_List.php の以下のあたり switch ($this->getMode()) { case 'json': $this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE); $this->arrProducts = $objProduct->setPriceTaxTo($this->arrProducts); // 一覧メイン画像の指定が無い商品のための処理 foreach ($this->arrProducts as $key=>$val) { $this->arrProducts[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']); } echo SC_Utils_Ex::jsonEncode($this->arrProducts); SC_Response_Ex::actionExit(); break; ↓ 以下のように改修 case 'json': $this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE); $this->arrProducts = $objProduct->setPriceTaxTo($this->arrProducts); $jsonArrProducts = array(); $cnt = 0; // 一覧メイン画像の指定が無い商品のための処理 foreach ($this->arrProducts as $key=>$val) { $this->arrProducts[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']); $jsonArrProducts[$cnt++] = $this->arrProducts[$key]; } echo SC_Utils_Ex::jsonEncode($jsonArrProducts); SC_Response_Ex::actionExit(); break; jsonで取得される追加の商品データが配列に格納されている順に表示されるので、取得した商品データの並び順の通りに配列を並び替えるようにしています。 ご参考まで。 |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
【緊急】スマホ商品一覧 表示不具合:追記 | kicks | 2014/4/17 21:45 |
Re: 【緊急】スマホ商品一覧 表示不具合:追記 | shutta | 2014/6/2 22:35 |
Re: 【緊急】スマホ商品一覧 表示不具合:追記 | shutta | 2014/6/2 23:02 |
Re: 【緊急】スマホ商品一覧 表示不具合:追記 | pineray | 2014/6/4 10:32 |
Re: 【緊急】スマホ商品一覧 表示不具合:追記 | shutta | 2014/6/4 11:33 |
» Re: 【緊急】スマホ商品一覧 表示不具合:追記 | tomo_s | 2020/2/11 10:25 |