我只是从 Opencart 开始。我需要有品牌列表,比如类别列表。我这样尝试:
<div class="box">
<div class="box-heading"><?php echo "По брендам" ?></div>
<div class="box-content">
<ul class="box-category">
<?php foreach ($manufacturers as $manufacturer) { ?>
<li>
<?php if ($manufacturer['manufacturer_id'] == $manufacturer_id) { ?>
<a href="<?php echo $manufacturer['href']; ?>" class="active"><?php echo $manufacturer['name']; ?></a>
<?php } else { ?>
<a href="<?php echo $manufacturer['href']; ?>"><?php echo $manufacturer['name']; ?></a>
<?php } ?>
<?php if ($manufacturer['children']) { ?>
<ul>
<?php foreach ($manufacturer['children'] as $child) { ?>
<li>
<?php if ($child['manufacturer_id'] == $child_id) { ?>
<a href="<?php echo $child['href']; ?>" class="active"> - <?php echo $child['name']; ?></a>
<?php } else { ?>
<a href="<?php echo $child['href']; ?>"> - <?php echo $child['name']; ?></a>
<?php } ?>
</li>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
</div>
我将此代码添加到 default/template/module/category.tpl 文件中。我收到此错误:注意:未定义变量:制造商在....
我该怎么做???谢谢。