News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Rollover image on Category View

Started by john-doe, October 28, 2018, 17:06:28 PM

Previous topic - Next topic

Studio 42

AH, you are right, all information has already been given. Farketmez99, please do some effort or pay someone to do it for you.

shenlong2210

default.php
<div class="spacer vm-product-media-container">
               <?php
               if (!empty($product->images[0])) {
                  $image = $product->images[0]->displayMediaThumb ('class="featuredProductImage"', FALSE);
                   if(isset(self::$product->images[1])){
                  echo $product->images[1]->displayMediaThumb('class="featuredProductImage secondIMG"', false);
                  }
                  else { echo $product->images[0]->displayMediaThumb('class="featuredProductImage secondIMG"', false);}
               } else {
                  $image = '';
               }

CSS
/* shenlong2210 - CHỈNH 02 ẢNH THÀNH 1 CHO HOVER MOUSE */
         .vm-product-media-container{
            position: relative;
            display: inline-block;
         }
         .vm-product-media-container .secondIMG {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
         }
         .vm-product-media-container:hover .secondIMG {
            display: inline;
         }