バージョン選択

フォーラム

メニュー

オンライン状況

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

サイト内検索

質問 > その他 > 親カテゴリーの取得

その他

新規スレッドを追加する

フラット表示 前のトピック | 次のトピック
投稿者 スレッド
ranran0923
投稿日時: 2017/4/24 17:06
対応状況: −−−
新米
登録日: 2014/1/30
居住地:
投稿: 8
Re: 親カテゴリーの取得
いつもご指導有難うございます。
もうひとつお願いします。

{# 親カテゴリーの取得(ページIDで分岐)
------------------------------------------ #}
{# カテゴリーページ #}
{% if app.request.get('_route')=='product_list' %}
{% set my_cate= Category.name %}
{% endif %}

{# 詳細ページ #}
{% if app.request.get('_route')=='product_detail' %}
{% set counter = 0 %}
{% for ProductCategory in Product.ProductCategories %}
{% for Category in ProductCategory.Category.path %}
{% if counter == 0 and loop.first %}
{% set my_cate= Category.name %}
{% set counter = 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}


カテゴリは{{ my_cate }}

詳細ページで変数my_cateが出力されません。カテゴリー名は取得されているのに変数にセットできません。
フラット表示 前のトピック | 次のトピック


題名 投稿者 日時
   親カテゴリーの取得 ranran0923 2017/4/22 20:06
     Re: 親カテゴリーの取得 hmorita_j 2017/4/22 20:24
       Re: 親カテゴリーの取得 umebius 2017/4/23 10:27
         Re: 親カテゴリーの取得 hmorita_j 2017/4/23 10:49
       Re: 親カテゴリーの取得 ranran0923 2017/4/23 16:56
         Re: 親カテゴリーの取得 h_tanaka 2017/4/24 11:28
           Re: 親カテゴリーの取得 ranran0923 2017/4/24 15:03
             Re: 親カテゴリーの取得 h_tanaka 2017/4/24 15:10
             » Re: 親カテゴリーの取得 ranran0923 2017/4/24 17:06
                 Re: 親カテゴリーの取得 h_tanaka 2017/4/24 17:09
                   Re: 親カテゴリーの取得 ranran0923 2017/4/24 18:11

 



ログイン


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

統計情報

総メンバー数は89,282名です
総投稿数は110,072件です

投稿数ランキング

1
seasoft
7367
2
468
3217
3
AMUAMU
2712
4
nanasess
2314
5
umebius
2085
6
yuh
1819
7
h_tanaka
1652
8
red
1570
9
mcontact
1301
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.