{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Products = CustomizeCatProduct() %}
<section class="categories">
<div class="wrap">
<h2 class="subtitle"><strong class="fadein active"><i>C</i>ategories</strong>カテゴリー</h2>
<div class="search">
<form method="get" action="{{ path('product_list') }}">
<input type="text" name="name" maxlength="50" placeholder="キーワードを入力"><button type="submit"><img src="{{ asset('assets/images/icon-glass.svg', 'user_data') }}" alt="検索"></button>
</form>
</div>
<ul>
{% if Products|length > 0 %}
{% for categorys in Products.category %}
{%if categorys.ProductCategories|length != '0'%}
{#% if categorys.Parent is same as(null)%#}
<li>
<a href="{{ url('product_list') }}?category_id={{categorys.id}}">
<div class="pic">
{% set num = categorys.id|sprintf_tow %}
{% set imgs = "assets/images/cat" ~ num ~ ".png" %}
{%if categorys.category_image%}
<img src="{{ asset(categorys.category_image|no_image_product, 'save_image') }}" alt="{{ categorys.name }}" style="width:auto; height:100%;">
{%else%}
<img src="{{ asset(imgs, 'user_data') }}" alt="">
{%endif%}
</div>
<p>{{categorys.name|raw}}</p>
</a>
{#{dump(categorys)}#}
</li>
{#% endif %#}
{% endif %}
{% endfor %}
{% endif %}
</ul>
<p class="txtC"><a href="{{ url('product_list') }}" class="btn">All goods</a></p>
</div>
</section>