2016-06-10 65 views
0

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

我想这是位于类/模块/ Module.php,上线1507:

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

但我不能找到正确的事情来写,而不是

回答

0

在“主题\默认-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}"/> 
+0

谢谢,但它似乎并没有工作。不过,我会尝试缩略图再生。 –

+0

您必须在** Back-Office> Preferences> Images **和** Regenerat Thumbnail **之后选择**“制作”**尺寸**“large_default”**和**“thickbox_default”**。 –