Question

Is it possible to change the product image size for virtual products only? I'm aware of the view.xml file to change image resolution, but it changes the product image size for all product types. Maybe it's possible through a template file, but I can't figure out how to achieve that.

Was it helpful?

Solution

After some research here is what I've found.

In Magento 2, you can use the following layout files to handle product type specific pages:

catalog_product_view_type_simple.xml
catalog_product_view_type_configurable.xml
catalog_product_view_type_grouped.xml
catalog_product_view_type_bundle.xml
catalog_product_view_type_virtual.xml
catalog_product_view_type_downloadable.xml

You can also update the layout via

catalog_product_view_id_productid
catalog_product_view_sku_productsku

But catalog_product_view_type_virtual.xml should do the trick for you

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top