YaKs Posted November 3, 2010 Share Posted November 3, 2010 Hi,Could someone tell me how the change of the images is done in the product page? I am been debugging with firebug and there is an onmouseover event that change the image but I cannot see in which point it is link with the img. I saw that there is a class called 'shown' that it is assigned to the anchor to mark when it is visible but there is no onmouseover event link the anchor...could someone help me out to understand how does it work?I am trying to visualize several products in the same page and 'change image' effect only works for the first product.http://v2.muertosdearte.com/category.php?id_category=6thanks a lot.jose Link to comment Share on other sites More sharing options...
rocky Posted November 4, 2010 Share Posted November 4, 2010 PrestaShop uses the displayImage function in js/product.js in your theme's directory to handle switching the big product image. Link to comment Share on other sites More sharing options...
YaKs Posted November 4, 2010 Author Share Posted November 4, 2010 Thanks Rocky,I figured out yesterday night. I have been struggling with jQuery how to go through the whole DOM tree and register the method displayImage for each 'view_block li a' element. I didnt know how to make a loop so what I did is to set a maximum of 5 product in the category list and create manually 5 hover hooks... //hover 'other views' images management $('#views_block1 li a').hover( function(){displayImage($(this),1);}, function(){} ); //hover 'other views' images management $('#views_block2 li a').hover( function(){ displayImage($(this),2);}, function(){} ); ..... the I put a counter in category.php and create those view_block[index]... and it works!http://v2.muertosdearte.com/category.php?id_category=6thanks anyway for the fast replycheers!Jose Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now