[JSCRIPT] Main Image Swap On Hover (v1.5.x)
31 posts
• Page 1 of 2 • 1, 2
[JSCRIPT] Main Image Swap On Hover (v1.5.x)
This will swap the additional image into the main image when hovered.
Also swaps the main image popup with the additional image popup link
Also swaps the main image popup with the additional image popup link
- Attachments
-
Main-Image-Swap_OC15x.zip- (1.25 KiB) Downloaded 667 times

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18212
- Joined: Mon Jul 21, 2008 7:02 pm

Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Super cool!

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links

-

JAY6390 - Posts: 4636
- Joined: Wed May 26, 2010 3:47 pm
- Location: United Kingdom
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
I installed this file which works great on the product page but when I go to checkout nothing now happens. I assume that the Javascript is interfering with the checkout script some how.
I'm using version 1.5.1.3 I think - the latest version on a local setup machine.
Any thoughts?
I'm using version 1.5.1.3 I think - the latest version on a local setup machine.
Any thoughts?
- dbrooksuk
- Posts: 2
- Joined: Mon Jun 13, 2011 9:31 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Yea I think there is something wrong on non-product pages.
Try moving the line from header.tpl to catalog/view/theme/YOURTHEME/template/product/product.tpl before the first <div> tag for now
Try moving the line from header.tpl to catalog/view/theme/YOURTHEME/template/product/product.tpl before the first <div> tag for now

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18212
- Joined: Mon Jul 21, 2008 7:02 pm

Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Ok I fixed the issue now. download updated in first post.

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18212
- Joined: Mon Jul 21, 2008 7:02 pm

Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Thank you. I'm just downloaded and had a quick test and everything seems OK. Thanks again for the addition to Opencart.
- dbrooksuk
- Posts: 2
- Joined: Mon Jun 13, 2011 9:31 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
As long as the javascript file and the code is placed in the right place before </head> nothing else should stop this from working should it?
- Klimskady
- Posts: 160
- Joined: Mon Jun 06, 2011 11:57 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Klimskady, please check your PM's. Left a message for you. Thanks!
Using OC v1.5.4.1 with Evisu Theme
-

Lisaweb - Posts: 123
- Joined: Tue Dec 06, 2011 4:01 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
hi there, good and useful module:). It works fine, how ever when I move my cursor out after hovering I don`t see the main image any more. Also if I go into "slideshow" mode after hovering, it repeats the hovered image twice (as the main image). Any ideas how to prevent this and be able to have all images visible, including the main image?
thank you!
thank you!Last edited by Vytenis on Wed Feb 08, 2012 7:00 pm, edited 1 time in total.
- Vytenis
- Posts: 40
- Joined: Sun Jul 31, 2011 5:33 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Hi Q, great mod. Thanks for sharing it.
1 question though, when I hover my mouse ontop, I notice that the images are skewed to a small size. any possibility to maintain the original size? Would be great if you could advise.
1 question though, when I hover my mouse ontop, I notice that the images are skewed to a small size. any possibility to maintain the original size? Would be great if you could advise.
- 3antz
- Posts: 136
- Joined: Sun Oct 02, 2011 10:52 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Any updates about the issue with no return to the main image on leaving the active hover zones with mouse?
- Vytenis
- Posts: 40
- Joined: Sun Jul 31, 2011 5:33 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
very nice effect thank you Qphoria
however mine seems to icrease the box size making it overlap the main product details
is there a description of how to format my images? i liked how opencart resizes stuff automatically, am i having a conflict somewhere?
however mine seems to icrease the box size making it overlap the main product details
is there a description of how to format my images? i liked how opencart resizes stuff automatically, am i having a conflict somewhere?
- newdev
- Posts: 3
- Joined: Tue Feb 21, 2012 5:17 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Hi,
Thank you for this great script. It works perfectly as you described on the standard product page.
I started another thread about this question, but thought I would ask here since it really pertains to this script.
I had made a slight modification to my products page that allows the additional images to span across the whole page instead of being restricted to the left side of the page.
I simply cut the "image-additional" code from it's original location, then stuck it right above the 'tabs' section. I then put a table row around the code so it would work with all the other browsers. This works great and I feel looks very clean when you have more than just 2 or 3 pictures.
The problem is that with this small modification, the image swap on hover does not work anymore. I studied the java script quite a bit but can not quite get a grasp on it. I am sure I moved something I should not have. Here is the code I moved. Any chance you see something obvious in it?
And this is located just above here:
I did not make any other changes or add anything else to the products.tpl page.
It would be great to have the image swap work with this change, and I am sure I just need to modify my own changes to make them more compatible.
Thanks for any help.
Terry
Thank you for this great script. It works perfectly as you described on the standard product page.
I started another thread about this question, but thought I would ask here since it really pertains to this script.
I had made a slight modification to my products page that allows the additional images to span across the whole page instead of being restricted to the left side of the page.
I simply cut the "image-additional" code from it's original location, then stuck it right above the 'tabs' section. I then put a table row around the code so it would work with all the other browsers. This works great and I feel looks very clean when you have more than just 2 or 3 pictures.
The problem is that with this small modification, the image swap on hover does not work anymore. I studied the java script quite a bit but can not quite get a grasp on it. I am sure I moved something I should not have. Here is the code I moved. Any chance you see something obvious in it?
- Code: Select all
<table>
<tr>
<div class="image-additional">
<p>
<?php foreach ($images as $image) { ?>
<td> <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="fancybox" rel="fancybox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a> </td>
<?php } ?>
</p>
</div>
</tr>
</table>
<p> </p>
And this is located just above here:
- Code: Select all
<div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
<?php if ($attribute_groups) { ?>
<a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
<?php } ?>
<?php if ($review_status) { ?>
<a href="#tab-review"><?php echo $tab_review; ?></a>
<?php } ?>
<?php if ($products) { ?>
...........
I did not make any other changes or add anything else to the products.tpl page.
It would be great to have the image swap work with this change, and I am sure I just need to modify my own changes to make them more compatible.
Thanks for any help.
Terry
Last edited by terrynshed on Thu Mar 15, 2012 8:59 pm, edited 1 time in total.
- terrynshed
- Posts: 67
- Joined: Fri Jan 20, 2012 9:35 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
thanks! very much Qphoria
- Mooshi
- Posts: 6
- Joined: Tue Jul 05, 2011 11:52 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
Did anyone ever fix the problem that once an image is swapped you can't select the main image anymore ?
See all my extensions here: http://www.opencart.com/index.php?route=extension/extension&filter_username=Think%20Twice
- Dutch_guy
- Posts: 60
- Joined: Tue Feb 21, 2012 9:56 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
anybody know if this will work with option boost? since i think this is the only feature option boost is lacking and i reeeaally need it ;]
- outsider255
- Posts: 2
- Joined: Fri Mar 09, 2012 1:46 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
why not try it? its just one file to add or remove

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18212
- Joined: Mon Jul 21, 2008 7:02 pm

Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
well ok I tried it and it doesn't work with option boost, what's more I just realized that I don't see any way to go back to the main image even in option boost module
- outsider255
- Posts: 2
- Joined: Fri Mar 09, 2012 1:46 pm
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
I feel unuttterably stupid! I clicked the download button and got a zip file, which I unzipped and inside was a .png image file and an index.hmtl file, which I clicked and up came a page saying 'To show hidden div, simply hover your mouse over this link' which I did and a box popped up. Good. So I looked at the source code, copied the javascript into header.tpl before </head>, reloaded my Opencart site, went to a product detail page, hovered over a thumbnail and nothing happened. Should it have? Thankyou for any help as I have never liked Lightbox and its clones.
- doidge
- Posts: 6
- Joined: Mon Mar 26, 2012 1:09 am
Re: [JSCRIPT] Main Image Swap On Hover (v1.5.x)
doidge wrote:I feel unuttterably stupid! I clicked the download button and got a zip file, which I unzipped and inside was a .png image file and an index.hmtl file, which I clicked and up came a page saying 'To show hidden div, simply hover your mouse over this link' which I did and a box popped up. Good. So I looked at the source code, copied the javascript into header.tpl before </head>, reloaded my Opencart site, went to a product detail page, hovered over a thumbnail and nothing happened. Should it have? Thankyou for any help as I have never liked Lightbox and its clones.
lol there is no png or html file in the zip. You got some bad download there.
This also has nothing to do with lightbox or any of its "clones". This is simple javascript hovering.

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18212
- Joined: Mon Jul 21, 2008 7:02 pm

31 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 6 guests













