1

The attachment is a picture and I want to show on the product page.How do I get the src for this picture?

<a id="single_image" href="{$img_dir}tabel_marimi/tabel_marimi.jpg"><img style="width:25px;height:20px;" src="{$img_dir}tabel_marimi/table_mini.jpg" alt="" /></a>

src must be link to product attachment, not a general one for all products

4

1 回答 1

0

我知道这是一个老问题,但如果有人遇到与 Prestashop 1.6.x 相同的问题,这就是它的完成方式:

{if $attachments}
    {foreach from=$attachments item=attachment}
        {$attachment.file_name} // This is the picture name
    {/foreach}
{/if}

只需srcimg标签的 指向路线并$attachment.file_name在末尾附加 。

$attachment您可以通过 make查看 的所有属性{print_r($attachment)}

于 2015-10-06T07:20:21.313 回答