Custom Image attribute Magento 2

SELECT * FROM eav_attribute WHERE attribute_code = 'hover'

After getting that id, just run this to this to set the correct flag
  
UPDATE `catalog_eav_attribute` SET `used_in_product_listing` = 1 WHERE `attribute_id` = {value from above} 
 
 
list.phtml
 
$hover = 'category_page_hover'; 
$hoverimageresize = $_imagehelper->init($_product, $hover)->constrainOnly(FALSE)
->keepAspectRatio(FALSE)->keepFrame(FALSE)->resize(644,900)->getUrl(); 

Share this

Related Posts

Previous
Next Post »

Pageviews from the past week