Tuesday, 10 June 2014

product image change on mouse hover magento

Hello Friends

If you want to change product image on mouse hover of more view image then you can use my below script

Step1. open file on location given below


Step2. Search the code in media.phtml file

<a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;">  
   <!--nested img tag stays the same-->  

 Step 3. Replace searched code with code below.

    <a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>" title="<?php echo $_product->getName();?>" onmouseover="$('image').src = this.href; return false;">  
       <!--nested img tag stays the same-->  

Let me know if you have any query

No comments:

Post a Comment