我剛從Opencart開始。我需要有品牌列表,比如llist of catgories。我試試這樣: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文件中添加了這段代碼。 我得到這個錯誤:注意:未定義變量:製造商在....
我應該怎麼做? 謝謝。
當Opencart的開始,請先閱讀偉大來自** Jay Gilford的帖子**:[如何成爲OpenCart的大師](http://stackoverflow.com/questions/13478995/how-to-become-an-opencart-guru)。那麼你應該能夠進一步移動。 – shadyyx