Prestashop:在页脚显示列表制造商

Prestashop : Display list Manufacturers in Footer

我正在使用 prestashop,我正在考虑如何在页脚中显示所有制造商的列表。

所以在我的 footer.tpl 中我这样做了 :

{if $nbManufacturers > 0}
    <div class="row">
        <h2>All manufacturers</h2>
        <ul id="manufacturers_list">
            {foreach from=$manufacturers item=manufacturer name=manufacturers}
                <li><img src="{$img_manu_dir}{$manufacturer.image|escape:'htmlall':'UTF-8'}-medium_default.jpg" alt="{$manufacturer.name|truncate:60:'...'|escape:'htmlall':'UTF-8'}" /></li>
            {/foreach}
        </ul>
    </div>
{/if}

但是这没有显示任何东西……我是不是很坏?有可能还是我必须使用插件?

您可以编辑或创建 classes/controller/FrontController 的覆盖。php

之前插入
$this->smartyOutputContent(_PS_THEME_DIR_.'footer.tpl');

这个

$this->smarty->assign(array(
            'manufacturers' => $manufacturers,
            'nbManufacturers' => count($manufacturers)
        ));