How to get a product's image in Magento?

后端 未结 12 1124
慢半拍i
慢半拍i 2020-12-01 06:32

I\'m running on version 1.3.2.1, but on my client\'s server they had Magento 1.3.0 so my previous code to display images for my local copy,

echo $this->he         


        
12条回答
  •  Happy的楠姐
    2020-12-01 06:41

    First You need to verify the base, small and thumbnail image are selected in Magento admin.

    admin->catalog->manage product->product->image

    Then select your image roles(base,small,thumbnail)enter image description here

    Then you call the image using

    echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(163, 100);

    Hope this helps you.

提交回复
热议问题