Ticket #548 (closed バグ指摘: 修正済)
商品検索ブロック カテゴリプルダウンでブラウザ依存
Reported by: | Seasoft | Owned by: | Yammy |
---|---|---|---|
Priority: | 低 | Milestone: | EC-CUBE2.4.3 |
Component: | フロント | Version: | 2.4.1 |
Keywords: | Cc: | ||
修正済み: |
Description
カテゴリ名の表示上のインデントを目的とした全角スペースがブラウザによっては無視されている。
- [OK] FX3.0 (WinXP/WinVista)
- [OK] IE6/7 (WinXP/WinVista)
- [NG] GC3 (WinXP/WinVista)
- [NG] SF4 (WinXP/WinVista)
フォーラムにて pentapenta 様の記事をきっかけとして判明。
http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=4685&forum=10
Change History
comment:2 Changed 14 years ago by Yammy
- Owner changed from somebody to Yammy
- Status changed from new to assigned
comment:3 Changed 14 years ago by Yammy
class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php の61行目を
$arrRet = $objDb->sfGetCategoryList('', true, ' ');
から
$arrRet = $objDb->sfGetCategoryList('', true, ' ');
に変えると、66行目の処理
$arrRet[$key] = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false);
で、「   アイス」に対して、mb_substrされてしまうので、表示がおかしくなる。
あまりよろしくないが、とりあえず
--- class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php (リビジョン 18464) +++ class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php (作業コピー) @@ -63,7 +63,8 @@ if(is_array($arrRet)) { // 文字サイズを制限する foreach($arrRet as $key => $val) { - $arrRet[$key] = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false); + $str = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false); + $arrRet[$key] = preg_replace('/ /', " ", $str); } } $this->arrCatList = $arrRet;
で、Google Cgrome、Safariでもインデントされることを確認。
comment:4 Changed 14 years ago by Yammy
- Status changed from assigned to closed
- Resolution set to 修正済
Note: See
TracTickets for help on using
tickets.
だったら大丈夫な感じでしょうか? Windows 環境が手元にないので未確認です.