package-magento2-imagehover
Icube_ImageHover
Magento_Catalog Magento_Swatch
This module is used for showing alternative image on hovering product item on product list.
On product list template, call the available alternative image of a product like so:
$_helperGallery = $this->helper('Icube\ImageHover\Helper\Data');
$_hoverImage = $_helperGallery->getHoverImage($_product);
Then add data-altimg attribute on prdocut image anchor tag, e.g:
<a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1" data-altimg="<?php echo $_hoverImage ?>">
<?php echo $productImage->toHtml(); ?>
</a>