Zen Cart Logo
Forums / All Other Contributions/Addons / AJAX IMAGE Swapper support thread

AJAX IMAGE Swapper support thread

Views: 172,482

Results 221 to 240 of 786
15 Jun 2008, 09:52
#221
greydawgjr avatar

greydawgjr

New Zenner

Join Date:
May 2008
Posts:
65
Plugin Contributions:
0

AJAX IMAGE Swapper support thread

john4:

Below is the GD setup.Is there any idea?:clap:
gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.5
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XPM Support enabled
XBM Support enabled

This is identical to my gd library except for the FreeType version which I don't know for my server. Are you uploading the largest image you have (ie, the image you wish to pop up in the slimbox when the medium image is clicked) as your small (default) image?

15 Jun 2008, 10:36
#222
greydawgjr avatar

greydawgjr

New Zenner

Join Date:
May 2008
Posts:
65
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

greydawgjr:

That makes 3! I just discovered this today myself, wish I had checked the thread earlier. A few of us are working on extending the mod (If you can help our discussion is here: http://www.zen-cart.com/forum/showthread.php?t=99541) and my thought was that the AIS and DDD together simulate the function that a lot of us seem to need. I just discovered DDD today and am not as familiar with it or where the incompatibility lies, unfortunately I'm under deadline and won't have time to fiddle with it for the next week or so. I've browsed the files and it is a simple mod compared to AIS so hopefully there's a quick fix in there somewhere.

If anyone has any further knowledge on this I'd love to get caught up on what you know!

Upon further review it appears that DDD is using the file tpl_modules_attributes.php to create the dropdown lists for the attributes while AIS wants to use the file tpl_modules_ajax_image_swapper_attr.php. Both of these files are located in your custom template directory inside the templates directory. My initial thought for a solution (after a 20 hour day at 3:15AM my time mind you) is that since the AIS only supports swapping images on one attribute (lets say attribute #1) then the AIS file needs to win. However for each other attribute which presumably we wish to control with DDD, then its file needs to win.

In other words, for the first attribute dropdown (if i exactly equal to 0) use AIS, for each successive iteration (else i greater than or equal to 1 i++) of the loop use DDD.

Then I guess the next step would be to get DDD and AIS to use this common file, but I don't yet know what other files in each module are looking for these two specific files.

Does this sound like the right track to anybody else?

15 Jun 2008, 10:38
#223
john4 avatar

john4

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

yes it can.the small image and medium image were generated by the AIS.but the size are not right comparing to what I configed.

20 Jun 2008, 06:33
#224
greydawgjr avatar

greydawgjr

New Zenner

Join Date:
May 2008
Posts:
65
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

john4:

yes it can.the small image and medium image were generated by the AIS.but the size are not right comparing to what I configed.

I ran into this same issue. It appears that the database doesn't update the default configuration value... I don't know enough about the zen cart database structure to say where to edit the value manually. However, if you're at a point where you're doing a fresh install of AIS you can probably change the sql script prior to install

('', 'Small Image Height', 'IMAGE_VIEWER_SMALL_IMAGE_HEIGHT','75 (change to whatever you need)','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 1, now()),

etc for the other values... I know this is hacky but all I can offer for now if you're in a hurry!

21 Jun 2008, 07:38
#225
greydawgjr avatar

greydawgjr

New Zenner

Join Date:
May 2008
Posts:
65
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

greydawgjr:

I ran into this same issue. It appears that the database doesn't update the default configuration value... I don't know enough about the zen cart database structure to say where to edit the value manually. However, if you're at a point where you're doing a fresh install of AIS you can probably change the sql script prior to install

('', 'Small Image Height', 'IMAGE_VIEWER_SMALL_IMAGE_HEIGHT','75 (change to whatever you need)','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 1, now()),

etc for the other values... I know this is hacky but all I can offer for now if you're in a hurry!

My bad, the database IS updating, however something funny is happening here... My output source code has 75 by 75 listed :blink:

21 Jun 2008, 10:21
#226
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

dscott1966:

jay,
good job. I love this module very much. It works great in my site.

I have one problem though i have a mod on in my site, Dynamic DropDowns for Stock By Attributes, which in turns was working before i installed your mod. I figured out that the two do not work together.

So im making a suggestion if maybe you could combine the two together your mod and Dynamic DropDowns for Stock By Attributes to work together. Im not a very good coder so i would not know where to start im just learning myself. So i thought i would put it out there in hopes that it was a good idea and you would put them together. I like your mod better so until someone works it out that they can work together or i pay someone to do, I will be sticking with yours.

Hope it was a good idea for your mod.

Keep up the great work and thank you for the mod.

Hey, thanks!

Been away for a bit, now reading the posts...

it won't currently work without hacking the module since the tpl_modules_attributes[I forgot the name].php file was replaced during installation.

My next goal with this module is to fully integrate IH2 into it, to enhance the quality of resized image produced by this module. Which one do you think more critical?

21 Jun 2008, 10:56
#227
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

john4:

Halo Jay. I go through and follow the FAQ instructions. the medium image cannt be resized properly at all.
Maybe you can have a test with a image with original size 600(w)800(h) and resize to 360480. It doesn't work in fact.
I notice many people encountered the same problem with the latest released in my country.

You are very appreciated if you can have test on it and make this great module better. Thx.:D

Hi John, looks like you still got problem with image resizing until now, I hope I can assist you in this.

The resizing is working perfectly, I tried that on test site:
http://demosites.webextremecustomiser.com/ajax_image_swapper/index.php?main_page=product_info&cPath=69&products_id=190

Which country are you in? I am not sure if it is the language difference problem since this module doesn't do anything with it.

One think you should know, sorry if you already do, the configuration won't have any effect until your next upload, so if you changed the medium sizes to 360 x 480, the images sizes you uploaded before won't change.

Good luck with it. Let me know if there's any problem. This week I hope I can reply sooner than before.

21 Jun 2008, 10:56
#228
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

greydawgjr:

My bad, the database IS updating, however something funny is happening here... My output source code has 75 by 75 listed :blink:

Output source code?

21 Jun 2008, 14:18
#229
john4 avatar

john4

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

Hi John, looks like you still got problem with image resizing until now, I hope I can assist you in this.

The resizing is working perfectly, I tried that on test site:
http://demosites.webextremecustomiser.com/ajax_image_swapper/index.php?main_page=product_info&cPath=69&products_id=190

Which country are you in? I am not sure if it is the language difference problem since this module doesn't do anything with it.

One think you should know, sorry if you already do, the configuration won't have any effect until your next upload, so if you changed the medium sizes to 360 x 480, the images sizes you uploaded before won't change.

Good luck with it. Let me know if there's any problem. This week I hope I can reply sooner than before.

Thank you Jay.
I am still falling into the resize problem. We can notice that when the image is in landscape mode, AIS resize porperly. As the image in portrait mode ,the resize function go wrong.
landscape(w: 800* h: 600): http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=75
protrait(w: 600* h: 800): http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=76
I also try to upload the images after the new configuration, luckly the problem is still there.
I come from China,the source code is in UTF-8 format.

21 Jun 2008, 14:19
#230
john4 avatar

john4

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

greydawgjr:

My bad, the database IS updating, however something funny is happening here... My output source code has 75 by 75 listed :blink:

Thank you for your testing. :D

21 Jun 2008, 14:36
#231
dscott1966 avatar

dscott1966

Zen Follower

Join Date:
Apr 2005
Posts:
298
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

Hey, thanks!

Been away for a bit, now reading the posts...

it won't currently work without hacking the module since the tpl_modules_attributes[I forgot the name].php file was replaced during installation.

My next goal with this module is to fully integrate IH2 into it, to enhance the quality of resized image produced by this module. Which one do you think more critical?

Thanks jay for the response, once again great mod. Since i put this post out there, a few people responded to it with concern saying it would be good to have the two work together, which i think it would also help in making this a better mod, not saying that it is a bad one without it. it is a great mod. I have no problem with Ih2 as far as i can see. But you know better with what you want to do with the mod. For me and my opinon i would like to see the two work together.

It would help with one critical problem i think eveyone is having, and that is the customer does not know really if something is out of stock till they add it to there cart, and if it is out of stock go back and pick something else, for me if i was a customer that would be kind of frustrating thinking you are about to get something you want and it is not in stock. So with that mod in place with yours when they pick say a shoe they like, and the first thing with the great looking mod like yours i can pick a color first then go to pick my size with the other mod if it is not in my size in that color i will know right away, because it would only populate what ever size is in that color.

So to make a long story short for me im getting by with the way the mod is working know just from testing it, my store is not open to the public yet, i would like to see the two together right now.

Thank you for asking me what i think. Hope this helps in your quest for devloping a better mod. Looking forward to any and all upgrades you make and any new mods that you come up with.

Thanks

22 Jun 2008, 00:21
#232
greydawgjr avatar

greydawgjr

New Zenner

Join Date:
May 2008
Posts:
65
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

Output source code?

I should say page source, I was trying to distinguish between the rendered html and the AIS code itself. My html has 75 for width and height whereas my AIS configuration has 89 by 75.

22 Jun 2008, 12:57
#233
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

john4:

Thank you Jay.
I am still falling into the resize problem. We can notice that when the image is in landscape mode, AIS resize porperly. As the image in portrait mode ,the resize function go wrong.
landscape(w: 800* h: 600): http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=75
protrait(w: 600* h: 800): http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=76
I also try to upload the images after the new configuration, luckly the problem is still there.
I come from China,the source code is in UTF-8 format.

No worries John :)

I am sorry, but I don't seem to get if anything went wrong there?

Maybe it will help if I let you know the resizing algorithm:

The width & height are actually maximum width & height and they are decided by whichever has larger value, while keeping the proportion.

An extreme example if you set the MAX WIDTH to 600 and max height to 10000, these are what happen if you uploaded image on eace size below (width x height):

  1. 1000x1000 image: resized to 600x600
  2. 500x20000 image: resized to 250x10000
  3. 600x2000 image: not resized
  4. 800x600 image: resized to 600x[whatever value keep the proportion intact]

Hope that clears out.

23 Jun 2008, 08:06
#234
john4 avatar

john4

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

No worries John :)

I am sorry, but I don't seem to get if anything went wrong there?

Maybe it will help if I let you know the resizing algorithm:

The width & height are actually maximum width & height and they are decided by whichever has larger value, while keeping the proportion.

An extreme example if you set the MAX WIDTH to 600 and max height to 10000, these are what happen if you uploaded image on eace size below (width x height):

  1. 1000x1000 image: resized to 600x600
  2. 500x20000 image: resized to 250x10000
  3. 600x2000 image: not resized
  4. 800x600 image: resized to 600x[whatever value keep the proportion intact]

Hope that clears out.
thank you for the clear explanation.I know the logic now.
My configuration:
Small w75* h88
Medium w360h420
Large w514
h600
*all the three proportion is 75:88=360:420=514:600=6:7

the image original size w600700.
After it is uploaded by AIS, the 3 sizes are below:
Small w64
h88
Medium w308h420
Large w514
h600

now we should know the problem. the proportion cannt be kept at smal size and medium size.:blush:

You can click here to see the wrong operation now :
http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=76

23 Jun 2008, 08:12
#235
john4 avatar

john4

New Zenner

Join Date:
Jun 2008
Posts:
18
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

john4:

thank you for the clear explanation.I know the logic now.
My configuration:
Small w75* h88
Medium w360h420
Large w514
h600
*all the three proportion is 75:88=360:420=514:600=6:7

the image original size w600700.
After it is uploaded by AIS, the 3 sizes are below:
Small w64
h88
Medium w308h420
Large w514
h600

now we should know the problem. the proportion cannt be kept at smal size and medium size.:blush:

You can click here to see the wrong operation now :
http://www.he15.com/index.php?main_page=product_info&cPath=6&products_id=76

the images!:D

23 Jun 2008, 08:35
#236
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

Hey, thanks!

My next goal with this module is to fully integrate IH2 into it, to enhance the quality of resized image produced by this module. Which one do you think more critical?

Can this module function properly with IH2 installed?

Thanks

24 Jun 2008, 14:06
#237
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

The verbage in the Readme instructions has my head spinning a bit. :dontgetit

From the readme, what is this referring to?

To make sure you only use minimal number of library, if you have copied
[library_name]_on_template, DO NOT copy any other [library_name]on[page_name] folder,
where the two having same library_name.

Secondly, after attemting to install the SQL I am receiving this:

1062 Duplicate entry 'FUAL_SLIMBOX' for key 2
in:
[INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Enable Fual Slimbox?', 'FUAL_SLIMBOX', 'true', '
If true, all product images on the following pages will be displayed within a lightbox:

  • document_general_info
  • document_product_info
  • product_free_shipping_info
  • product_info
  • product_music_info
  • product_reviews
  • product_reviews_info
  • product_reviews_write

Please note: To completely remove Fual Slimbox please see the documentation provided.

Zen Lightbox overrides this when installed. This means that if you have the ZL mod and Slimbox, Slimbox will do nothing. I have done this specifically to stop people messing their installations up. I have provided a modified version of ZL for ZL users, unfortunately switching ZL off doesnt really switch it off (all the javascript is still loaded), the modified version actually switches ZL off when you switch it off.

The big advantage of Slimbox over lightbox is that it takes only 30kb of javasript rather than well over 100kb for lightbox

Unlike (Zen) Lightbox the Slimbox is completely generated using CSS, so any tweeks that you want to make to the look can be made from the CSS file.

Props to: Christophe Beyls for writing Slimbox, Yukio Arita for extending it to work with iframes (this is the extended version so you can put whole webpages in the Slimbox, dont get carried away though!) and Alex Clarke for the original ZL plugin which inspired me to write this.

Default: true
', @t4, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option( array(''true'', ''false''), '), (NULL, 'Paranoia Mode', 'FUAL_SLIMBOX_NERVOUS', '1', '
Controls whether to wait until the DOM loads to display the image. This stops the problem of being redirected to the image rather than displaying the image in the lightbox if a user with a slow connection clicks on the image before the slimbox script has been initialised.

0 = Relaxed: Dont wait until the DOM loads.
1 = Conservative: Waits until the DOM has loaded to make the image visible.
2 = Funky: Waits until the DOM has loaded to reveal the image with a funky transition. Depending on your template this may cause problems in IE6, so if you want to use the funky transition please test it in older browsers before going live.

Default: 1 (Conservative)
', @t4, 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2''), '), (NULL, 'Safe Navigation', 'FUAL_SLIMBOX_DISPLAY_VAR', 'true', '
With safe navigation enabled the Next and Prev links are displayed permenantly in the lightbox when there are additional images to display. Safe Navigation is recommended because without it the navigation links fail to show in IE6.

Default: true
', @t4, 15, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Page of Text', 'FUAL_SLIMBOX_PAGEOF', 'Page #1 of #2', '
Sets the "Page #1 of #2" text when there is more than one image.

The text is replaced with a regular expression: #1 is the number of the current page, #2 is the total number of pages.

Examples:
Page #1 of #2 - default English
Page #1 (of #2) - variation English
Pagina #1 di #2 - Itallian

Default: Page #1 of #2
', @t4, 17, NOW(), NOW(), NULL, NULL), (NULL, 'Transition Duration', 'FUAL_SLIMBOX_DURATION', '800', '
Controls the duration of the transition in milliseconds. (note that 1000 milliseconds = 1 second, so the default value of 800 is just under a second)

Default: 800
', @t4, 20, NOW(), NOW(), NULL, NULL), (NULL, 'Transition Type', 'FUAL_SLIMBOX_TRANSITION_TYPE', 'Sine', '
Controls the type of the transition. See Mootools for what the options mean.

Default: Sine
', @t4, 30, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''linear'', ''Quad'', ''Cubic'', ''Quart'', ''Quint'', ''Expo'', ''Circ'', ''Sine'', ''Back'', ''Bounce'', ''Elastic''), '), (NULL, 'Transition Ease', 'FUAL_SLIMBOX_EASE', 'easeInOut', '
Controls the easing of the transition. See Mootools for what the options mean.

Default: easeInOut
', @t4, 40, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''easeIn'', ''easeOut'', ''easeInOut''), '), (NULL, 'Transition Amplitude', 'FUAL_SLIMBOX_AMPLITUDE', '5', '
Controls the amplitude of the transition.

Default: 5
', @t4, 50, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''1'', ''2'', ''3'',''4'',''5'',''6'',''7'',''8'',''9''), '), (NULL, 'FPS', 'FUAL_SLIMBOX_FPS', '60', '
Controls the frames per second of the motion.

Should be an integer value between 1 - 200.

Default: 60
', @t4, 60, NOW(), NOW(), NULL, NULL), (NULL, 'Width', 'FUAL_SLIMBOX_WIDTH', '400', '
Controls the initial width of the lightbox.

Default: 400
', @t4, 70, NOW(), NOW(), NULL, NULL), (NULL, 'Height', 'FUAL_SLIMBOX_HEIGHT', '300', '
Controls the initial height of the lightbox. Have a play!

Default: 300
', @t4, 80, NOW(), NOW(), NULL, NULL), (NULL, 'iFrame Width', 'FUAL_SLIMBOX_IWIDTH', '500', '
Controls the initial width of the lightbox when it contains an iFrame. Have a play!

Default: 500
', @t4, 90, NOW(), NOW(), NULL, NULL), (NULL, 'iFrame Height', 'FUAL_SLIMBOX_IHEIGHT', '300', '
Controls the initial width of the lightbox when it contains an iFrame. Have a play!

Default: 300
', @t4, 100, NOW(), NOW(), NULL, NULL), (NULL, 'Animate Caption', 'FUAL_SLIMBOX_CAPTION', 'true', '
Animates the caption. Have a play!

Default: true
', @t4, 110, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), '), (NULL, 'Class to Hide', 'FUAL_SLIMBOX_HIDE_ME', 'zenLightboxHideMe', '
Any content wrapped in with this class will be hidden when the lightbox is displayed (this extends the behaviour of Zen Lightbox which only hides DIV tags).

Default: zenLightboxHideMe (This coincides with the Zen Lightbox default class.)
', @t4, 120, NOW(), NOW(), NULL, NULL);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I had already had Faul Slimbox installed on my site prior to installing this module. Also, as I mentioned previously, I do also have IH2 installed. Should I uninstall Faul since it is incorporated into the mod? Or should I not run the SQL for the AJAX mod? :blink:

Any help would be appreciated.

24 Jun 2008, 14:25
#238
meltdown avatar

meltdown

Totally Zenned

Join Date:
Jun 2006
Location:
My family and I live in Brighton, England
Posts:
947
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

Back-to-back-to-back posts! I know, I hate me too!!

Just noticed: After installation there is, as should be, a Admin - Catalog - AJAX Image Swapper Manager. However, there is not a Admin - Configurations - AJAX Image Swapper where there should be. Also, if you look at a product page, there is no main image, just the annoying spinning thing.

25 Jun 2008, 23:49
#239
xtinexoop avatar

xtinexoop

New Zenner

Join Date:
Mar 2004
Posts:
34
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

I think I must be very dim.

I have installed this on my local XAMPP version (1.6.5) - ZenCart is reporting the following versions:

PHP Version: 5.2.5 (Zend: 2.2.0)
Database: MySQL 5.0.51

The install seems to have worked - have checked all the files exist, I get a menu option on Configuration and on Catalog and I have managed to add attribute images as they show in the various sizes so that looks okay.

However, when viewing the store nothing seems to be any different from normal.

Any ideas? I have the Stock by Attribute module installed - is that causing a problem?

Christine

26 Jun 2008, 13:44
#240
xtinexoop avatar

xtinexoop

New Zenner

Join Date:
Mar 2004
Posts:
34
Plugin Contributions:
1

Re: AJAX IMAGE Swapper support thread

Nope - I'm definitely dim.

I have now installed it onto a server based demo shop. See
http://cumfybumfy.co.uk/zenshop

PHP is 5.2.6 (Zend 2.2.0) , SQL 5.0.51a-community

I have all the menu options that I think I need on the admin console, but it doesn't seem to be doing anything to the products?

Please tell me I am missing something really stupid in the 'how to use it' stakes.

Christine