Jump to content

How to change image when mouseover in home featured products ?


Recommended Posts

hello

 

if you want to create it for both:

  1. all product lists
  2. homfeatured module on homepage

you have to:

 

for all product list:

- edit the classes:

Product

functions: getNewProducts(); getPricesDrop();

 

ProductSale

function: getBestSales();

 

Category

function: getProducts();

 

you have to add sql query that will get the image id of product cover + additional image to rollover effect, then

 

in product-list.tpl file you have to use:

<img src="{$link->getImageLink($product.link_rewrite, $image, 'home_default')} />

 

then is necessary to create javascript for rollover efect, something like:

 

$(".img_0").mouseover(function(){

$(this).hide();

}

 

 

$(".img_1").mouseout(function(){

$(this).hide();

})

 

 

2) for homefeatured

 

the same situation but you have to edit homefeatured.php file and homefeatured.tpl template

 

 

as you see - it isn't as simple as it seems - a lot of work

Link to comment
Share on other sites

I forgot to mention that in all other kinds of list view (categorie, products sale, etc.) it works but just in the home fetured products it dosen't.

 

Thats what i tryed to say exactly.

 

Is there any way to do this if I have the roleover efect allready in all the other lists view except home featured products?

 

Thank you.

Link to comment
Share on other sites

it's because default homefeatured is a separate module and don't use effect that you've got in product-list.tpl

(homefeauter use own completly different template file)

 

i thought that you havent got this effect anywhere

Link to comment
Share on other sites

  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...