Who can tell me what is wrong with this code?
I have a vqmod filter module from 2.3.0.2 and I want to convert to oc 3.0.2.0
Error code:
Code: Select all
Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "category" test in "catalog/product_list.twig" at line 55
Code: Select all
<div class="form-group">
<label class="control-label" for="input-status"><?php echo $column_category; ?></label>
<select name="filter_category" id="input-status" class="form-control">
<option value="*"></option>
<?php foreach ($categories as $category) { ?>
<?php if ($category['product_count'] >= 1) { ?>
<?php if ($category['category_id']==$filter_category) { ?>
<option value="<?php echo $category['category_id']; ?>" selected="selected"> <?php echo $category['name']; ?>- (<?php echo $category['product_count']; ?>)</option>
<?php } else { ?>
<option value="<?php echo $category['category_id']; ?>"> <?php echo $category['name']; ?> <?php if ($category['product_count'] >= 1) { ?>
<strong> - (<?php echo $category['product_count']; ?>)</strong>
<?php } ?></option>
<?php } ?>
<?php } ?>
<?php } ?>
</select>
</div>
Code: Select all
<div class="form-group">
<label class="control-label" for="input-status">{{ column_category }}</label>
<select name="filter_category" id="input-status" class="form-control">
<option value="*"></option>
{% for category in categories %}
{% if category.product_count >= 1 %}
{% if category.category_id is filter_category %}
<option value="{{ category.category_id }}" selected="selected"> {{ category.name }} - ({{ category.product_count }} )</option>
{% else %}
<option value="{{ category.category_id }}"> {{ category.name }} {% if category.product_count >= 1 %}
<strong> - ({{ category.product_count }} )</strong>
{% endif %} </option>
{% endif %}
{% endif %}
</select>
</div>