Zen Cart Logo

attribute pop up images

Views: 61,589

Results 41 to 60 of 221
3 Jul 2007, 6:41 AM
#41
richter avatar

richter

New Zenner

Join Date:
Jan 2007
Posts:
59
Plugin Contributions:
0

attribute pop up images

By chance I just came across this today! I've set it up and it works perfectly.

Just one question, how to I remove the text 'Click to Enlarge' ? (My target market are Japanese and wont understand that)

I did a search for that text in the 2 files in the download but couldn't locate it...

See here: http://www.untitled-project.com/zen-cart-jp/index.php?main_page=product_info&cPath=1&products_id=1&number_of_uploads=0&language=jp

Thanks! I love the contrib!
R

3 Jul 2007, 1:51 PM
#42
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: attribute pop up images

richter:

By chance I just came across this today! I've set it up and it works perfectly.

Just one question, how to I remove the text 'Click to Enlarge' ? (My target market are Japanese and wont understand that)

I did a search for that text in the 2 files in the download but couldn't locate it...

See here: http://www.untitled-project.com/zen-cart-jp/index.php?main_page=product_info&cPath=1&products_id=1&number_of_uploads=0&language=jp

Thanks! I love the contrib!
R
If you look at approx line 475 in the file attributes.php for this mod, you should find the fhe following code:
if (file_exists($attribute_image_lrg)) {
$tmp_attributes_image .= '<div class="attribImg"><div style="text-align:center">Click to Enlarge</div><a href="javascript:popImage(\''. $attribute_image_lrg.'\', \'Large View\',\''. $selected_attrname.'\')">'. zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $products_options->fields['products_options_values_name'] : '') . '</a></div>' . "\n";
} else {
$tmp_attributes_image .= '<div class="attribImg">'. zen_image(DIR_WS_IMAGES . $products_options->fields['attributes_image']) . (PRODUCT_IMAGES_ATTRIBUTES_NAMES == '1' ? '<br />' . $products_options->fields['products_options_values_name'] : '') . '</div>' . "\n";

You can omit the code shewn in red, above. Pleased let me know if this is successful.

3 Jul 2007, 1:58 PM
#43
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: attribute pop up images

sonicparke:

I've actually got that one installed and in the correct directories and it's still not working. The only other contribs I've got installed are IH2 & the one for IE conditional comments.

Any other thoughts?
The only though that I have is that you might want to double-check that you have got ALL the files for ALL installed mods in their correct locations (FTP software can sometimes let you down), and if this is the case then check to make sure that you haven't inadvertently left a copy of the jscript_dynamic_window_popup.js file in the wrong place.
The version 1.02 has been tested by ckosloff, because he had the same issue.
I might add that the IMH2 Image hover has never worked for me, and I believe that this is becaue I have uploaded all three sizes of images via IMH2 - I am not relying on IMH2's process of reducing the large 'image' to create smaller versions for thumbnails, hovers etc. I may be wrong, but I believe that if you do this, the hover doesn't work!!

3 Jul 2007, 4:45 PM
#44
richter avatar

richter

New Zenner

Join Date:
Jan 2007
Posts:
59
Plugin Contributions:
0

Re: attribute pop up images

Mate fantastic, it works.
And I do apologise, I had Dreamweaver's 'find and replace' set to 'text only' by accident so it didn't pick it up when I searched.
Bingo!
R

3 Jul 2007, 5:17 PM
#45
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: attribute pop up images

sonicparke:

I've actually got that one installed and in the correct directories and it's still not working. The only other contribs I've got installed are IH2 & the one for IE conditional comments.

Any other thoughts?
Well, you will have to test.
I have done extensive testing in IE and Firefox and can assure you that if the two files are installed in the correct directories, both IH2 and attribute popup will work.
Try deleting or moving the IE conditional comments files and let's see what happens then.
Keep us posted, please.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

3 Jul 2007, 6:11 PM
#46
sonicparke avatar

sonicparke

Zen Follower

Join Date:
Jul 2006
Posts:
120
Plugin Contributions:
0

Re: attribute pop up images

I figured it out. I had copied and renamed my custom template and somehow the old one was checked. So it all looked right but none of the changes were working because I was applying them to a template that wasn't selected.

My mistake.

Now. Is it possible to get it to take advantage of IH2's resizing features?

4 Jul 2007, 5:00 AM
#47
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: attribute pop up images

sonicparke:

I figured it out. I had copied and renamed my custom template and somehow the old one was checked. So it all looked right but none of the changes were working because I was applying them to a template that wasn't selected.

My mistake.

Now. Is it possible to get it to take advantage of IH2's resizing features?
That's a matter for a different thread of the Zen Cart Forums

10 Jul 2007, 3:34 PM
#48
helpme avatar

helpme

Totally Zenned

Join Date:
Apr 2007
Posts:
632
Plugin Contributions:
0

Re: attribute pop up images

I also am having trouble, if I understand correctly, this mod. doesn't work with IH2? I have installed, checked and rechecked and still nothing. My images haven't changed whether this mod is installed or not.
Also, my text underneath my pictures only allows 1 word per line, how can I fix that?
Thanks for your help!

10 Jul 2007, 4:42 PM
#49
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: attribute pop up images

helpme:

I also am having trouble, if I understand correctly, this mod. doesn't work with IH2? I have installed, checked and rechecked and still nothing. My images haven't changed whether this mod is installed or not.
Also, my text underneath my pictures only allows 1 word per line, how can I fix that?
Thanks for your help!
The latest version of the mod (1.0.2) works perfectly with IH2.
Besides, this mod is for attribute images, your images won't change, only attributes will.
You are posting in the wrong thread.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

10 Jul 2007, 4:52 PM
#50
helpme avatar

helpme

Totally Zenned

Join Date:
Apr 2007
Posts:
632
Plugin Contributions:
0

Re: attribute pop up images

Correct, when I say images, I mean my attribute images, they are still large on my page. see here http://www.mommyandbabyessentials.com/index.php?main_page=product_info&cPath=88_90&products_id=281 This is exactly what I did.
I uploaded everything to the correct files (checked, checked and rechecked), Uploaded images via attribute controller (imagename_MED.XXX), checked the Attribute Style for Radio Buttons/Checkbox to 0 and still my page has several large images, they are not links and the words are only 1 per line.
I will check, but I am sure I uploaded the latest verision.
Thanks

Okay I just looked I downloaded the med verision, I will try the 1.0.2 and let you know! I would still like to know how to change the text so that more than one word is on a line!

10 Jul 2007, 5:18 PM
#51
helpme avatar

helpme

Totally Zenned

Join Date:
Apr 2007
Posts:
632
Plugin Contributions:
0

Re: attribute pop up images

Okay, I have it kind of working?? My images are clickable, however there is no pop-up, also my thumbnails are still not thumbnails, they are the original size? Do I have to manually make them thumbnail size? Thanks!

10 Jul 2007, 5:25 PM
#52
helpme avatar

helpme

Totally Zenned

Join Date:
Apr 2007
Posts:
632
Plugin Contributions:
0

Re: attribute pop up images

Okay, I have it kind of working?? My images are clickable, however there is no pop-up, also my thumbnails are still not thumbnails, they are the original size? Do I have to manually make them thumbnail size?
My text is still only 1 word per line? Thanks!

Sorry for the dupicate, I goofed!

10 Jul 2007, 7:13 PM
#53
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: attribute pop up images

That's not the way it is supposed to work.
There should be a pop-up window when clicking on your thumbnail image.
You do have to create both sizes and name the big one with suffix _LRG, place in images/large or you can modify path (re instructions earlier in the thread).
Read the readme that accompanies this mod.
You have to edit the attributes in the admin, upload your thumbnail.
If you have the manual it is chapter 13.
What do you mean by text?
The only thing that will show is the option value and "Close this window".

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

11 Jul 2007, 10:27 PM
#55
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: attribute pop up images

This is a great thread and thanks to both blag and ckosloff. :clap:
I downloaded v1.0.1 and installed on my local WAMP server instance of ZenCart.
The popups work, BUT only with the Attribute Style = 0 as reported. Is there any clue as to why it will not work with other style layouts?
I also noted that the behaviour of this module is very different in different browsers as follows:
FireFox 2.0.0.4 = popup window sizes on large image but does not show the option name and "click to close window" text. Window is NOT resizable.
Internet Explorer 7 = popup window includes both image and text, not resizable.
Opera 9 = resizable popup window. Image is in upper left corner and text is centered on full screen page.
Safari (Windows) = clicking on attribute image opens an empty "about:blank" window with no image or text.

Note to ckosloff: I assume on your site that you are using a different module to achieve the hover images on the upper two pictures (lightbox??) and this popup module on the hair color samples below. Correct?

Just a little more fuel for the fire.

Maury

11 Jul 2007, 10:58 PM
#56
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: attribute pop up images

Update on my previous post:
Updated to version 1.0.2, with javascript moved to "template_default" folder.
Now I get a javascript error:
"popImage is not defined
javascript: popImage('images//large/RP4228purple_LRG.gif', 'Large View','Color: Purple') Line 1"

Note the double slash in the path "images//large/...

Maury

12 Jul 2007, 12:25 AM
#57
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: attribute pop up images

Please remove an instance of the slash in attributes.php loaded into your custom template, in the $path variable.
Let us know how that went.
I am not using lightbox yet, just IH2 and this mod version 1.0.2, nothing else.
Please note that I do other tests on that site (for other stuff). so it might not look good all the time.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

12 Jul 2007, 2:12 AM
#58
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

Re: attribute pop up images

I removed the leading '/' in the attributes.php file and that got reid of the '//' in the error message, BUT it did NOT get rid of the javascript error message. Then I looked at the source code of the HTML page which is generated when you use the attributes popup module. If the jscript is in the override folder (YOUR_TEMPLATE) then the HTML header shows that the jscript is loaded. When the jscript is put in the TMEPLATE_DEFAULT folder, then the jscript is NOT loaded and hence the error 'popImage is not defined'.
I did a WinMerge comparison of the attributes.php file from v1.0.2 with the the default attributes.php file in the modules directory. In additon to the section which has been added for the popup images and a number of comments which have been omitted, there is at least one missing line in the v1.0.2 file:

Maury

12 Jul 2007, 3:36 AM
#59
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: attribute pop up images

$selected_attribute = ($products_options->fields['attributes_default']=='1' ? true : false);
on line 220
this is the only uncommented line that is missing in v. 1.0.2.
We would have to wait for the author's comments on this difference.
All I can tell you for now is that placing the .js in template_default is precisely to avoid that it loads and conflicts with the IH2 script.
I had version 1.0.1 installed in template_custom and it wasn't working, the only modification I did was move it to default.
It worked both in 1.0.1 and 1.0.2, I don't think that the missing line is causing your problem.
Delete the script from custom template and reload v. 1.0.2
Let's see what happens.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

12 Jul 2007, 7:25 AM
#60
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: attribute pop up images

I am just picking up on the recent dialog, so I'll try to cover a few responses here.

Firstly: I am aware of the different behaviour in different browsers, but I regret that dealing with these quirks is way, way beyond my capability as a 'dabbler'. I took someone else's code and played with it - and the reasons are documented previously in this thread, I believe. If someone with the necessary skills feels that he/she can hack the code so that it is entirely cross-browser friendly, then PLEASE go ahead, it will, of course, enhance this module!! In the meantime I will make some enquiries to see if there are any PHP gurus out there who would be prepared to take at look at it, but it may be some time before I can get round to this, because an enforced change of server means that I am in the process of painstakingly rebuilding my store!!

Secondly, I have just taken a look at the version of the 'attributes.php' file that is supplied with zen cart 1.3.7.1 i.e. the latest update. Lines 219 to 227 inclusive of this 'unedited' file are as follows:

// select default but do NOT auto select single radio buttons
// $selected_attribute = ($products_options->fields['attributes_default']=='1' ? true : false);
// select default radio button or auto select single radio buttons
$selected_attribute = ($products_options->fields['attributes_default']=='1' ? true : ($products_options->RecordCount() == 1 ? true : false));
}
}

                switch ($products_options_names->fields['products_options_images_style']) {
                  case '0':

This explains the change to the code in this vicinity. I have removed the comments - I am a bit obsessive about what I consider to be unnecessary comments, lines, white space etc. and tend to edit them out. I suppose it's a legacy from when the days when computers had very little RAM - I don't think it can do any harm, and it might improve the speed by one jillionth of a second!! In this case it may have been prudent to leave the comments in so that those with enquiring minds might understand the reason for the change. (This may explain why the setting discussed previously in this thread needs to be '0'.)

As for mauryg's problem with the javascript file not loading, all I can say is that it *ought *to load. ckosloff is correct in stating that v 1.02 moved the js file so as to avoid a conflict (that ckosloff discovered) with Image Handler 2. This new location was tested on both ckosloff's and and on my set-up, and was found to work. As I understand things, if the file is included in the YOUR_TEMPLATE subdirectory, the js will definitely load, but I believe that it will load every time a page is displayed, which seems somewhat unnecessary - by including the js file in the template_default subdirectory, I believe that the js file loads once and stays in the browser's memory or cache.

So, for mauryg's problem, the only things that I can suggest are: 1) ensure that the browser's cache is cleared; and 2) ensure that you have removed the js file from the YOUR_TEMPLATE subdirectory.