Answer the question
In order to leave comments, you need to log in
Opencart 2 - how to exclude a group of attributes or necessary attributes by ID?
Good time everyone,
there are OC 2.3 attribute output cycles
<?php if ($attribute_groups) { ?>
<?php foreach ($attribute_groups as $attribute_group) { ?>
<?php echo $attribute_group['name']; ?>
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>
<?php echo $attribute['name']; ?>
<?php echo $attribute['text']; ?>
<?php } ?>
<?php } ?>
<?php } ?>
Answer the question
In order to leave comments, you need to log in
found
<?php if ($attribute_groups) { ?>
<div class="tab-pane" id="tab-specification">
<table class="table table-bordered">
<?php foreach ($attribute_groups as $attribute_group) { ?>
<?php if($attribute_group['attribute_group_id'] != 'id группы'){ ?>
<thead>
<tr>
<td colspan="2"><strong><?php echo $attribute_group['name']; ?></strong></td>
</tr>
</thead>
<tbody>
<?php foreach ($attribute_group['attribute'] as $attribute) { ?>
<tr>
<td><?php echo $attribute['name']; ?></td>
<td><?php echo $attribute['text']; ?></td>
</tr>
<?php } ?>
</tbody>
<?php } ?>
<?php } ?>
</table>
</div>
<?php } ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question