Prestashop 1.6:使用制造商标志作为产品图片

Prestashop 1.6 : Use the manufacturers logo as product image

我想知道当产品图片丢失时,如何使用制造商的标志作为产品图片而不是问号(404.gif)。

我猜它位于 classes/module/Module.php,第 1507 行:

  copy(_PS_IMG_DIR_.'404.gif', _PS_TMP_IMG_DIR_.md5((int)$modaddons->id.'-'.$modaddons->name).'.jpg');

但是我找不到合适的东西来代替

在 "themes\default-bootstrap\product.tpl" 上替换为:

<img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/>

通过这个:

<img itemprop="image" src="{$img_manu_dir}{$product_manufacturer->id}-large_default.jpg" id="bigpic" alt="" title="{$product->name|escape:'html':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}"/>