Zen Cart Logo

attribute pop up images

Views: 61,589

Results 81 to 100 of 221
16 Jul 2007, 9:43 PM
#81
mauryg avatar

mauryg

Zen Follower

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

attribute pop up images

Blag,
I completely agree with you on the local copy. I build and test my sites using a WAMP installation on my PC as the server. I use Dreamweaver to 'synchronize' the files to my host server and then export and import the database using phpMyAdmin on both sides.

17 Jul 2007, 9:41 AM
#82
walzen avatar

walzen

New Zenner

Join Date:
Nov 2005
Location:
Germany, Bavaria
Posts:
28
Plugin Contributions:
0

Re: attribute pop up images

ckosloff, blag an mauryg

Good morning,

Blag, thanks for the wonderful addon.

I read the tread intensiveley but didn't get the solution. With the previous version (1.01 ?) the addon worked yet on my shop with javascript hover and imagename_MED-files opened.

But now I installed the new verision (1.02 ?) with the imagename_LRG - files in /large/ -folder and the large image doesn't open really.

I also removed the doble-slash form "images//large/..." but no effect.

The link is existing and java begins to open, but fails in the end and there is a small java-window without a picture (broken picture).

Installed the java-folder in YOUR_TEMPLATe and also in template_default, but always the same effect: A small broken window, if there where no picture in /large/ folder. But they are and do have the right names xy_LRG.jpg.

My java hover function works on both directories: mytemplate and template_default.

Just java do not get open the large attribute - files. Links in my attribute - images are all created.

The shown link in my browser is:

"javscript: popImage('image//large/filename_LRG.jpg, 'Large View', 'Title of file')

Do anybody have an idea what could be wrong. Thanks very much.

https://www.escrevo.de
Version: ZC 1.3.7
PHP: 4.4.4
MySQL 5.0.33
Server OS: Linux 2.6.18.2

17 Jul 2007, 10:34 AM
#83
mauryg avatar

mauryg

Zen Follower

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

Re: attribute pop up images

Walzen,
My guess is that if you look closely, you will see a 'maximize' button in the upper right hand corner of the window. Click it and the window will expand and your image will be in the full window. The problem is in the sizing or positioning of the popup window. I haven't played with it yet but I often see similar problems, like the picture in the shrunken window but the title and the 'close window' link out of sight till I expand the window.
Version 1.0.2 installs the .js file in the TEMPLATE_DEFAULT/jscript folder by default. If there are any other .js files in the YOUR_TEMPLATE/jscript folder, then the attribute popup will not work.
Either place ALL .js files in the YOUR_TEMPLATE/jscript folder OR place ALL .js files in the TEMPLATE_DEFAULT/jscript folder in order to have all of your modules work. If you divide them between the two folders, then the ones in the TEMPLATE_DEFAULT/jscript folder will not work because that folder will be skipped by the override function.
As for the images, my testing shows that IH2 appears to take the image from the IMAGE folder and set it to the "Product Listing - Image Width/Height" size defined in Admin>Configuration>Images for display in the category or subcategory page. Then the hover function displays the SAME image at the size listed for "Product Info - Image Width/Height". IH2 does the resizing. It doesn't use the _MED or _LRG images.

Hope this helps

Maury

17 Jul 2007, 3:01 PM
#84
walzen avatar

walzen

New Zenner

Join Date:
Nov 2005
Location:
Germany, Bavaria
Posts:
28
Plugin Contributions:
0

Re: attribute pop up images

Hi maury

thanks for reply. No, the maximize button of pop-up-window is disabled.

And my current jscript-folder is template_default (isn't this what ckoslof sayed where it should be?) and the image-hover-addon is alos working.

It worked with the previous version with the MED-Files. But I didn't upload the LRG-files once more but just renamed it and put it to the adequat folder.

My test-produkt is to see here (just a test, sorry): http://www.escrevo.de/index.php?main_page=product_info&cPath=117_118&products_id=331

Have you got any further ideas? Great Thanks

Walter

https://www.escrevo.de
Version: ZC 1.3.7
PHP: 4.4.4
MySQL 5.0.33
Server OS: Linux 2.6.18.2

17 Jul 2007, 4:10 PM
#85
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

walzen,
Let me clarify what ckosloff said:
If you have anything in your custom_template/jscript folder, even just one script, the whole template_default/jscript folder will not be read by Zen Cart.
This behaviour is particular to the jscript folder, all other folders work differently: if Zen Cart finds a file in the custom_template folder, it will load that one instead of the one in template_default; but it will also read all the other files in template_default.
What was happening is that IH2 installs its imagehover javascript in template_default/jscript and if you install anything in your custom_template/jscript it will not work. This is the case for IH2 or any other javascript.
Now, version 1.0.1 was going to custom_template, following Zen Cart override system, but messing up IH2, which is NOT following the override system.
Version 1.0.2 attempted to correct this bug, and also updated the attributes.php to its latest version.
So, mauryg is right, either you install all your jscripts in template_default or in custom_template, but you cannot mix.
The only caveat is that if you install in template_default you will have to be careful when upgrading.
Hope everything clear.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

17 Jul 2007, 4:45 PM
#86
walzen avatar

walzen

New Zenner

Join Date:
Nov 2005
Location:
Germany, Bavaria
Posts:
28
Plugin Contributions:
0

Re: attribute pop up images

Hi ckosloff,

no, I understood, it is quite clear: In any case of my tests I deleted the whole java-script folder either in tempplate_default or in custom_template. I'm not mixing.

In the moment I've installed everything in template_default. Image-hover is working, but attribute-pop-up isn't.

Is there anything wrong with this emty folder on_load?

But You mean it is the java-script anyway, which is not working in my case?
Ok, will test still a few things and tahn report. If I'm wihtout success, install the old version, which worked.

Any further suggstiosns are wellcome. Thanks a lot.

https://www.escrevo.de
Version: ZC 1.3.7
PHP: 4.4.4
MySQL 5.0.33
Server OS: Linux 2.6.18.2

17 Jul 2007, 4:51 PM
#87
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

walzen,
You don't need to install the old version, just install the new one in custom_template, that's the only difference.
Plus, you will be working with the latest version of attibutes.php.
I have both scripts in template_default/jscript and both work cross-browser.
I don't understand why you deleted the folder, was it the folder itself or its contents?
You don't need to delete folders.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

17 Jul 2007, 8:34 PM
#88
mauryg avatar

mauryg

Zen Follower

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

Re: attribute pop up images

Walter,
I just tested your page in several browsers. I will refer to the products by color since my German is not what it used to be. Here are the results:
A. Red shirt product page -

  1. IE7 - large image popup OK; attribute popup shows window with product name and 'close window' but no image.
  2. FireFox 2 - large image popup need to expand window to see large image; attribute popup shows name and 'close window' when it first opens but then only shows 'no image' icon. I suspect name and 'close window' are in center of window but cannot expand window to see them.
  3. Opera 9 - large image OK; attribute popup same as FireFox.
  4. Safari (Windows) - large image OK; attribute popup gives 'about:Blank' window. (I think this is a bug in Safari)

B. Then I went back via breadcrumbs to product listing "T-Shirtdruck" - no IH2 hover image on products and no [+] indicator. I clicked on the yellow shirt. It told me there were no products in that category BUT it showed me the RED shirt as a NEW product and the image had the [+] box. Results were:

  1. IE7 - Hover image OK
  2. FireFox - Hover image OK
  3. Opera 9 - [+] box on image but NO hover image
  4. Safari - Hover image OK

I understand that you have both IH2 and Attrib_popup installed. It looks like you are using the DEFAULT Zencart template on your site which means you are using the "CLASSIC" template directory for the css, images and template_info.php file. But the CLASSIC theme does NOT have a jscript folder. It uses the one in the TEMPLATE_DEFAULT folder. In that case the .js scripts installed in the DEFAULT directory should work. I see you made some mods to the colors, logo etc. Did you create a new custom template directory and if so, did you put a jscript folder in it? I would suggest the following:

  1. Move ALL of the .js files to your custom template jscript folder.
  2. Replace the jscript folder in the TEMPLATE_DEFAULT folder with a copy of that folder from the original ZenCart install folder. It should have the 'on_load' folder in it.
    this will be a "clean" install and then see what happens.

Hope this helps...

Maury

18 Jul 2007, 7:30 AM
#89
blag avatar

blag

Zen Follower

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

Re: attribute pop up images

Wow

This dialog with walzen is just a bit complicated!! I don't propose to intervene, but I will reiterate that my Attribute pop-ups Large is not entirely cross-browser compatible. I have been rather preoccupied: I had to reinstall my store for the fourth (hopefully last) time because my flaky host had problems - again. Maybe I will now be able to spend some time trying to find a PHP guru who could iron out the browser creases.

Furthermore, there are some specific prerequisites for this to work:

1: it has become apparent that all the javascript files contained in the includes\templates subdirectory must either be HERE* includes\templates\template_default\jscript OR HERE includes\templates\YOUR_TEMPLATE\jscript*. If there is just one javascript file in the includes\templates\YOUR_TEMPLATE\jscript subdirectory any files in the includes\templates\template_default\jscript will be completely ignored.

2: the module requires that there be a 'large' version of the image located in the images\large subdirectory, and that this image MUST have the same name as its thumbnail with the addition of a suffix. Hence if the thumbnail is called, say, An_Image.jpg, the large version MUST be called An_Image_LRG.jpg. If the large image name varies from this convention in any way e.g. An_image_LRG.jpg the attribute pop up for that thumbnail will fail.

I hope that this might assist walzen in his troubles. If not perhaps we need to know exactly what walzen has got and where, because I am certainly confused as to what is going on!!

BTW walzen has referred to omitting double slashes after the Large, and I believe that I have seen this elsewhere in this thread. Can someone please enlighten me as to what this is about?

18 Jul 2007, 7:38 AM
#90
blag avatar

blag

Zen Follower

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

Re: attribute pop up images

mauryg

In post 55 of this topic you made the following statement

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 am puzzled by this, would you be so kind, please, as to explain this?

18 Jul 2007, 2:15 PM
#91
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

Just adding a little to blag's post.
What he states is the Zen Cart naming convention for images, which can be tweaked in the Admin.
The path in large can also be changed in $path.
I have successfully changed it to '/large/attributes/'
The syntax is critical for it to work.
But if you want to simplify your life, stick to what he says: suffix is _LRG, $path is '/large/'

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

19 Jul 2007, 7:20 AM
#92
mauryg avatar

mauryg

Zen Follower

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

Re: attribute pop up images

blag,
If you look at the attributes.php modula around line 490 you will see that

$path = DIR_WS_IMAGES . '/large/';

But DIR_WS_IMAGES already includes a trailing slash so this produces a $path which is zencart/images//large. This was discussed earlier in this thread and it doesn't seem to matter. Just to be picky I would remove the leading slash on /large/.

Maury

BTW, I don't think it's your code that is cross browser incompatible. I think it the way they handle the popup window calls.

19 Jul 2007, 7:49 AM
#93
mauryg avatar

mauryg

Zen Follower

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

Re: attribute pop up images

Blag,

Funny you should ask about this. My experience, and I believe that of others is that the attributes popups will ONLY work when the images_styles is set to 0. BTW, the popups also work with the check boxes but only for style=0.
I just spent the greater part of the day trying to overcome this problem. :frusty: Unfortunately my PHP is not that good yet so I didn't succeed. But here's what I see.

If you look at the "switch" code for the radio buttons (lines 227-282) or the check boxes (lines 325-382), case=0 does not draw an image whereas the other cases (1-5) do. Directly above the call to the popup code is a section which draws the images for product_options_images_style == 0;

// collect attribute image if it exists and to be drawn in table below
                 if ($products_options_names->fields['products_options_images_style'] == '0' or ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $products_options_names->fields['products_options_type'] == '0') ) {
                   if ($products_options->fields['attributes_image'] != '') {
                     $tmp_attributes_image_row++;

I found that I could move the header section of the popup code, which defines the large popup image and the attribute name,

//find large size attribute images. Location must be in /images/large and image name must be image_LRG.ext Mike Scott 070606
				
$array_filename = split("[/\\.]", $products_options->fields['attributes_image']) ;
$filename = $array_filename[count($array_filename)-2];
$extension = '.'.$array_filename[count($array_filename)-1];
$filename = $filename.'_LRG';
$path = DIR_WS_IMAGES . '/large/';
$attribute_image_lrg = $path . $filename. $extension;
$selected_attrname = $products_options_names->fields['products_options_name'] . ': '.$products_options->fields['products_options_values_name'];

to just above the beginning of the "radio button" code in line 198 and the popups still worked fine.

Then I tried incorporating the call to jscript_dynamic_window_popup.js into one of the cases in the switch calls to make it work with a different style. NO LUCK. I don't see a global way to do it so it looks like the call to the popup script would have to be written into each of the case statements.
Just for fun I tried to incoporpate the image_hover.js script from IH2, but I kept running into parsing errors with the php code. I've got more studying to do.

Hope this explains it. Maybe you can see a solution.

Maury

19 Jul 2007, 9:17 AM
#94
walzen avatar

walzen

New Zenner

Join Date:
Nov 2005
Location:
Germany, Bavaria
Posts:
28
Plugin Contributions:
0

Re: attribute pop up images

ckosloff, blag an mauryg

good morning,

to tell it in advance: I resolved the problem!

Sorry for my late response, have been very busy the last days and thanks a lot for your great efforts.

To take the sum of all your suggestions: I followed all of your advices and controlled the issues several times: correct template, jscript directory and file options combined with IE2 hover, all file-name conventions in relation to thumbnail and large file, etc., etc..
But didn't get version 1.0.2 running, in opposit to version 1.0.1 (remember that " _MED - version"), which worked.

Now I tested all again and looked for the differences between verison 1.0.1 and Version 1.0.2: Particularely the directory-permisions. (the file-permissions I allready had controlled several times)

And found it out, finally: It was the permission in the "large"-directory, which was set to 744 against the "medium"-directory (the working verison) which was 755!!! Stupid mistake, sorry.

And that it was, thank goodness. It' s a really wonderfull addon and helps me a lot.

Thanks a lot to you as well, for your intense occupation with my problem.

See you next time, have a good time till than, tschau.

walter

https://www.escrevo.de
Version: ZC 1.3.7
PHP: 4.4.4
MySQL 5.0.33
Server OS: Linux 2.6.18.2

19 Jul 2007, 2:57 PM
#95
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

Glad you resolved your issue.
I knew you would, because you said you were going to test.
Just a question: didn't Zen Cart alert you via the browser that the directory was not writeable?
Thanks.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

19 Jul 2007, 3:51 PM
#96
walzen avatar

walzen

New Zenner

Join Date:
Nov 2005
Location:
Germany, Bavaria
Posts:
28
Plugin Contributions:
0

Re: attribute pop up images

ckosloff,

Hi, no zent-cart didnt alert me. Should it? But I dont know anyway, what exactly is the difference between chmod 744 (not working) and chmod 755 (working) in this case. jscript not executable?

But anyway, it works now and I`m satisfied. Thanks.
walzen

https://www.escrevo.de
Version: ZC 1.3.7
PHP: 4.4.4
MySQL 5.0.33
Server OS: Linux 2.6.18.2

19 Jul 2007, 4:09 PM
#97
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

walzen,
No, it means not writeable for group and other (in this case the application).
Google this: chmod tutorials and you'll find a great hands-on tutorial on chmod on the web.
If it may help I have created an Excel spreadsheet to help myself when in the middle of a brain fart.
Enjoy.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

19 Jul 2007, 4:17 PM
#98
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

walzen,
To be more precise 744 means not-writeable AND not-executable for group and other.
Zen Cart alerts you when a folder is not writeable for an application, but since here it only needs to execute, that's why it didn't show a warning.
Maybe.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)

20 Jul 2007, 9:22 AM
#99
blag avatar

blag

Zen Follower

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

Re: attribute pop up images

maury

Thanks for this explanation and for the attempts to rationalise things, but I am still unclear as to where the value for images_styles is 'defined' or 'set'.

These may be pretty dumb questions, but...

Is this value set in the attributes.php file? Or is it a user-defined parameter, which is set in some obscure location in the admin section? If it's the latter, then perhaps you could be so kind as to guide me to it?

5 Aug 2007, 11:05 PM
#100
ckosloff avatar

ckosloff

Totally Zenned

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

Re: attribute pop up images

blag,
Here's something you should know.
I installed on a test site a mod called Stock by Attributes, quite famous, it is in the wiki, can be found in downloads/other.
It broke my "attribute pop up images", probably because it modifies the attributes.php.
In the following days, I will investigate this problem, compare files, etc.
As you well know, I need to deal with lots off attributes, if combined with products I am now well over 7,000, so I do need both modules to work.
Will try my best to make them compatible.
There's always conflict and struggle in life, huh?
Any suggestions welcome.

[argentiniansupermarket.com

](http://argentiniansupermarket.com)