Opencart Change Category Links

时间:2015-06-30 13:53:46

标签: php opencart

I want to edit the parent category link, at the moment it doesn't do anything except display the dropdown menu, anyone know how to edit this?

1 个答案:

答案 0 :(得分:0)

只需 提示 ,您感兴趣的代码(类别的导航栏)将写在标题的相同文件中:

  • 打开文件<OC_ROOT>/catalog/view/theme/<Your_Theme_Folder>/template/common/header.tpl
  • 找到打印类别的循环,在所有版本的OC中看起来如下:
    <?php foreach ($categories as $category) { ?>
  • 那就是它,现在你只需要更改父类别的HTML,它们就会打印在一个代码块中,如下所示:
    <?php if ($category['children']) { // here } ?>

尝试一下,如果你还有问题,我会在这里