バージョン選択

フォーラム

メニュー

オンライン状況

51 人のユーザが現在オンラインです。 (43 人のユーザが フォーラム を参照しています。)
登録ユーザ: 0
ゲスト: 51
もっと...

サイト内検索

 > フロント機能 > EC-CUBE3.0.11 category.twigでの商品数判定につきまして

フロント機能

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
MPV
投稿日時: 2016/10/19 14:05
対応状況: −−−
仙人
登録日: 2011/3/27
居住地:
投稿: 309
EC-CUBE3.0.11 category.twigでの商品数判定につきまして
システム情報

EC-CUBE 3.0.11
サーバーOS Windows NT 6.2 build 9200 (Windows 8 Professional Edition) i586
DBサーバー MySQL 10.1.13-MariaDB
WEBサーバー Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.23
PHP 5.6.23 (Core, bcmath, calendar, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, bz2, SimpleXML, wddx, xml, xmlreader, xmlwriter, apache2handler, openssl, curl, fileinfo, gd, gettext, mbstring, exif, mysql, mysqli, Phar, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, mhash)
HTTPユーザーエージェント Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0

お世話になります。

カテゴリナビでカテゴリ毎の商品数が0の場合に
カテゴリを非表示にしたいため、表示判定を
以下の様に行っています。

app/template/default/Block/category.twig


{% macro tree(Category) %}
    {% dump(Category.id) %}
    {% dump(Category.name) %}
    {% dump(Category.CategoryCount.product_count|default(0)) %}

    {% if Category.CategoryCount.product_count|default(0) > 0 %}
      <li>
          <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a>
          {% if Category.children|length > 0 %}
              <ul>
                  {% for ChildCategory in Category.children %}
                      {{ _self.tree(ChildCategory) }}
                  {% endfor %}
              </ul>
          {% endif %}
      </li>
    {% else %}
    {% endif %}
{% endmacro %}


EC-CUBE3.0.10では、dump出力も判定処理も
共にうまくいっていたのですが、EC-CUBE3.0.11に
バージョンアップしたところ、判定処理が
うまく動かなくなってしまいました。
カテゴリ毎の商品数が取得できないようです。

EC-CUBE3.0.10でのダンプは以下の通りです。

__string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 69: 616 __string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 73: "〇〇〇〇〇〇〇〇" __string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 77: 0 __string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 69: 574 __string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 73: "△△△△△△△△" __string_template__3020333dd9452830c432087d4213fa00c8c6faeea32acf06aeabcbdff7ef7531 on line 77: 170

※カテゴリ名は伏せました。

こちらについても、先日当方が上げたスレッド

http://xoops.ec-cube.net/modules/newbb/viewtopic.php?viewmode=flat&topic_id=18142&forum=14

と同様に、symfonyのバージョン違いに起因するものでしょうか。
それとも、他の要因によるものでしょうか?

dumpも出ないので、しばらくVer.3.0.10で様子見したほうが
よろしいでしょうか・・・。

大変恐縮ですが、何か情報等ございましたら
お教え頂ければ幸いです。

どうぞよろしくお願いいたします。<(_ _)>
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
 » EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/10/19 14:05
     Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/10/19 15:07
       Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして nanasess 2016/10/19 15:19
         Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/10/19 18:13
           Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして nanasess 2016/10/19 19:16
             Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/10/19 20:22
               Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/10/19 23:21
                 Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして nanasess 2016/10/20 10:31
                   Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/11/7 10:15
                     Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして nanasess 2016/11/7 10:59
                       Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして MPV 2016/11/12 11:22
                         Re: EC-CUBE3.0.11 category.twigでの商品数判定につきまして YOKO 2018/3/2 15:22

 



ログイン


EC-CUBE公式 Amazon Payプラグイン

統計情報

総メンバー数は88,992名です
総投稿数は110,019件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1646
8
red
1570
9
mcontact
1296
10
tsuji
958
11
fukap
907
12
shutta
835
13
tao_s
799
14 ramrun 789
15 karin 689
16 sumida 641
17
homan
633
18 DELIGHT 572
19
patapata
502
20
flealog
485


ネットショップの壺

EC-CUBEインテグレートパートナー

Copyright© EC-CUBE CO.,LTD. All Rights Reserved.