0

I want to display color images on product listing page https://prnt.sc/sush2z. I have made color attribute and selected swatch option. Assigned color images too. https://nimb.ws/Sw9mEN

Did Visible on product listing as yes https://nimb.ws/ux3R5y

Still it does not show on product listing page. Can anybody help?

0

.check this file

module-catalog/view/frontend/templates/product/list.phtml

around line number 72

<?php if ($_product->isAvailable()) :?>
  <?= $block->getProductDetailsHtml($_product) ?>
<?php endif; ?>

This code is responsible to show the swatches in frontend.

You can add it in your theme in the below file

app/design/frontend/{Themepackage}/{themename}/Magento_Catalog/templates/product/list.phtml 

Hope it solves your issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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