Blag,
http://www.zen-cart.com/index.php?ma...roducts_id=273
check that for Lightbox
Blag,
http://www.zen-cart.com/index.php?ma...roducts_id=273
check that for Lightbox
blag,
instead of opening up a new window, the lightbox function overlays the image on the screen.
there's an example of the lightbox in action here (not my site):
http://throughmylensphotography.com/...-inn-p-66.html
if you click on the picture it will give you an example of lightbox in action.
like yourself i'm not much of a programmer but i can kludge code together from time to time. i'm trying to see if i can get the lightbox to work on my own, if i do i'll be happy to send you the code to review. thanks for your input
Ho-hum.
I understand: the 'Lightbox' effect is very professional.
The Lightbox adds text to the bottom of the image, It has a close box, and it uses 'onblur' (I presume) to close the pop-up window in the event that the user clicks back in the main window.
I suppose btetra wants to get this to work with Attributes!!
The key is to establish the 'arguments' that the Lightbox 'function' requires and to pass those arguments to the lightbox. Using an image handler for the products listing image is slightly easier in that the products images dimensions are, I believe, stored with the image as part of the Zen Cart upload process. The Lightbox may well use the dimensional data to figure out what size is required for the pop-up. It would appear that the attributes images' dimensions are not stored during the Zen CARt attributes upload process, and so this data cannot be derived from the databse, and hence cannot be passed to the Lightbox.
This is why the solution that I modified uses another pop-up script!
In any event I would be happy to review your code if you make any progress.
blag,
I ran into trouble with your mod after installing Image Handler, the pop-up when hovering over images stopped working and resumed upon uninstalling the mod.
Any clue how to fix this?
Thanks.
ckosloff
Sorry to hear about your problem.
As you know I am not the author of the 'original' version of this - all I have done is add a few embellishments and I have changed the default directory from being yet another directory full of images to one that uses the 'large' images folder.
As I understand things, and please bear in mind that I am no expert, the mod works in the following way:
In your message you do not make it clear what you are using to 'get' your hover effect. Would I be right in assuming that the effect is generated by Image Handler 2? If not, please be so good as to identify what mod you are using to achieve the 'hover' effect on attributes images.
- Because the modified 'attributes.php' file is located in includes\modules\YOUR_TEMPLATE subdirectory, it is, effectively, an 'override' which means that this file will supersede the original 'attributes' file.
- In order to establish whether there are any qualifying images, when Zen Cart invokes the 'attributes.php' file from the store's includes\modules\YOUR_TEMPLATE subdirectory, the attributes file searches through the 'page' that is being loaded and finds all the relevant attributes images, and checks to see whether there are any corresponding images with the suffix _LRG in the 'large' folder.
- The 'attributes' php file puts all the data into an array, and adds the product option name text below the thumbnail and adds 'Click to Enlarge' above the thumbnail.
- When the page loads the, the array of attributes images is loaded, including the additional text.
- The Javascript file, 'jscript_dynamic_window_popup.js' located in \includes\templates\YOUR_TEMPLATE \jscript is, I believe, fairly benign in that it is only invoked once the imaged is clicked on.
- When the user clicks on the attributes image the Javascript opens a new window and displays the _LRG image and the additional text.
The Attribute Pop Up Images Large mod should not affect any images other than the attributes images: I am fairly certain that there isn't any code in the mod that will affect any other image.
It is worth noting, however, that the modified 'attributes.php' file included in the mod may not be based on the 'original' Zen Cart 'attributes.php' file. In this case it could be that another mod is affecting the behaviour of the 'attributes.php' file. Having said this, as far as I can tell, the base attributes file into which my mod has been inserted appears to be the Zen Cart original, but you may care to email to me a copy of your base 'attributes.php' file and I'll check it out.
I hope this helps - even though it would appear that it doesn't solve your problem!!
blag
blag,
Thank you very much for the very detailed and super fast response!
Really impressive.
Yes, I am using Image Handler 2 to generate the hover effect.
Since all these effects are happening on a local test site, I decided to clone again (this time on a different server), so will email you the base attributes.php as soon as I get that done.
Thanks again.
Man. I've read through this entire thread more than once and this is just not working on my site.
It doesn't look like the javascript is workign on the images. So therefore no popup. I have IH2 installed. Am I missing something?
thanks,
Brad
Unbeknownst to this thread I have been working with blag on this issue.
There is a new version of the contrib, 1.0.2, published today in the download section.
Or you can simply move your javascript to root/includes/templates/template_default/jscript/
It will conflict with IH2 in the custom folder.
Bookmarks