0

I have created one attribute called imageUrl for importing product image url. And made some changes in media.phtml and list.phtml. Now product images not displaying in product list page but it displays images in product details page..

<img src="<?php echo $_product->getData('imageurl') ?>" /> 

2 Answers 2

0

In admin, Go to Catalog > Attributes > Manage Attributes.

Select/Edit imageUrl attribute > Select Properties tab.

In Frontend Properties block, set Used in Product Listing to Yes. Press Save.

Now check list page, it should show images now.

8
  • It would also be worth making sure you clear the magento cache and reindex the product attributes (If not set to rerindex on save)
    – DanCarlyon
    Jun 29, 2016 at 6:42
  • 1
    its not working... :(
    – Sruthi
    Jun 29, 2016 at 7:13
  • what's your attribute_code ? imageUrl OR imageurl ? Have you cleared Cache and did re-index ? Jun 29, 2016 at 7:14
  • imageurl .. .
    – Sruthi
    Jun 29, 2016 at 8:46
  • please share a full code you did in list.phtml Jun 29, 2016 at 8:49
0

If you have multiple stores, make sure the default images for selected for each store:

enter image description here

The attribute media_gallery is used to store the collection of images for each product. Be sure that the Small Image is selected for the store view product listing. (Base Image is used on the product page, Thumbnail is for the cart page.)

If the images are added programmatically or during import or by APIs, be sure the specify the store. To use the same images across stores, set store_id = 0.

If the default images should be the same across the stores, then you can set the 3 image attributes to Global in the backend Manage Attributes. The image attribute codes are image, small_image, and thumbnail. But beware, when the attributes are saved, all the values for store_id > 0 will be removed in the backend type tables, which is catalog_product_entity_varchar for the images. However, you would still need to set the defaults like the screenshot above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.