- Posts: 52
- Thank you received: 2
Disable hover effect on product image thumbnails
I am trying to change the way that the thumbnails are displayed under the main product image on the product page.
I need the hover effect to be disabled when hovering over the thumbnail images and for the thumbnail images to be displayed as the main image when the user clicks on the thumbnail.
How can I do this?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
You'll probably be able to do that by :
- Going to "Hiakshop->Display->Views"
- Editing the "show_block_img" file of the "product" view of your front-end template
- Change this line :
Please Log in or Create an account to join the conversation.
The only issue I'm having now is that when I click on the main image which has been replaced with the thumbnail, it comes up with an enlargement of the default image: s293983206.websitehome.co.uk/elevateshop...k-claudia-court-shoe
Is there anything I can add to the code to fix this?
Please Log in or Create an account to join the conversation.
Please remove the comment in order to keep
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I've just removed it, but the large image seems not to be clickable at all now?
s293983206.websitehome.co.uk/elevateshop...ck-charlize-stiletto
Please Log in or Create an account to join the conversation.
Is there any way I can make the images enlarge on click, once they are in the main product box. At the moment when I click on it, it comes up with a pop up enlargement of the default image. See here s293983206.websitehome.co.uk/elevateshop...ck-charlize-stiletto
I've tried to edit the PHP within the show_block_image file, but with no success.
Thanks in advance
Please Log in or Create an account to join the conversation.
You didn't made the modification I asked you.
Please do not comment this line:
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I did take the // away, but when it was un-commented it did not work at all when I clicked on the main image to enlarge it.
See here: s293983206.websitehome.co.uk/elevateshop...k-claudia-court-shoe
Please help
Please Log in or Create an account to join the conversation.
Yes, know the page is correct. But it wasn't during my last test.
So you can know change in the "show_block_img" view:
So instead we will call the current thumbnail JS library.
( Note: that code is not compatible with Shadowbox )
Regards,
PS : We reply to all message in the forum, as fast as we can.
Sending me private message won't make me answer faster. But if you do it all the time, it could become the opposite effect.
Your are not the only person to put some question in our forum, so please wait like the others.
We know when we have to reply to a thread, the all support team know it.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 158
- Thank you received: 5
Thanks
Please Log in or Create an account to join the conversation.
The main part code hasn't changed since the last time.
Even if the line isn't exactly the same, you still have a line which set the variable "$attr" to add the "onmouseover" content.
The goal is still to remove "onmouseover" by "onclick".
After that, you have to be sure that you're editing the view for the right front-end template.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Are you sure that you made an override for the right front-end template ?
www.hikashop.com/support/support/documen...ize-the-display.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That's right, since the patch was proposed (almost 2 years), the script in the product page has changed.
Did you also apply the patch in the post #133351 ?
Because the functions "openImage" changed, like the addition of the parameter "variant".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 256
- Thank you received: 2
The guide displays some php code to swap out however this code doesn't exist in the latest version of Hikashop under 'show_block_img'
I cant find this code
window.localPage.openImage = function(id) {
if(!window.localPage.images[id])
window.localPage.images[id] = document.getElementById('hikashop_first_thumbnail');
window.localPage.images[id].click();
return false;
};
Please Log in or Create an account to join the conversation.
The code is a bit different now but it's still there:
Please Log in or Create an account to join the conversation.
- Posts: 256
- Thank you received: 2
e = e || window.event;
e.stopPropagation();
e.cancelBubble = true;
window.Oby.cancelEvent(e);
SqueezeBox.fromElement(window.localPage.images[id],{parse:'rel'});
//window.localPage.images[id].click();//
return false;
however it still only displays the first product image when enlarging any thumbnail.
Please Log in or Create an account to join the conversation.
Hard to help without more context.
We would need to know what code you put/change where exactly and a link to the page with the issue to be able to understand the situation.
Please Log in or Create an account to join the conversation.