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

AJAX IMAGE Swapper support thread

Views: 172,482

Results 261 to 280 of 786
28 Jun 2008, 05:19
#261
meltdown avatar

meltdown

Totally Zenned

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

AJAX IMAGE Swapper support thread

jaycode:

Try running the sql installer from line 93 to bottom.

Great call on the SQL - Thanks!

I am still unable to call the images, however, and am uncertain what I may be missing. Would one of you knowledgeable folks be so kind as to take a look and see if you can see what that might be? Thanks!

28 Jun 2008, 05:26
#262
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

Not sure what this is all about but seems to be related to your load problems.

document.write("<script id=__ie_onload defer></script>");

28 Jun 2008, 05:50
#263
greydawgjr avatar

greydawgjr

New Zenner

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

Re: AJAX IMAGE Swapper support thread

MeltDown:

Great call on the SQL - Thanks!

I am still unable to call the images, however, and am uncertain what I may be missing. Would one of you knowledgeable folks be so kind as to take a look and see if you can see what that might be? Thanks!

Hi Meltdown,

Can you tell us more about what you see in the admin area? I posted a screen shot a couple posts ago on what you should be seeing if an image is indeed successfully created. Does yours look similar? There'll be some difference because that example is using attributes whereas yours isn't.

28 Jun 2008, 06:20
#264
iammad avatar

iammad

New Zenner

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

Re: AJAX IMAGE Swapper support thread

Hi~~
I am using 3.12 version.
I checked. mootools-complete.js is there.
I use both IE and Firefox, all the same.

Then, I install a new zen cart and follow the process again.
Still the same...
The category still doesn't show up.

greydawgjr:

Jay can probably provide more specific help but in the meantime can you verify that there is a file called mootools-complete.js in your admin/includes/javascript/ directory? This file is found in the mootoolsonadmin directory of the install package. See this post for further discussion:

http://www.zen-cart.com/forum/showpost.php?p=568949&postcount=214

Quote:
Originally Posted by iammad
HI Jay,
After I installed everything followed by the instruction, there is still some bugs:
I go to Admin-> Catalog-> AJAX Image Swapper v.3.1.2
I choose "Select category" but the product on "Product name:" won't show up.

28 Jun 2008, 06:55
#265
greydawgjr avatar

greydawgjr

New Zenner

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

Re: AJAX IMAGE Swapper support thread

iammad:

Hi~~
I am using 3.12 version.
I checked. mootools-complete.js is there.
I use both IE and Firefox, all the same.

Then, I install a new zen cart and follow the process again.
Still the same...
The category still doesn't show up.

Does the product dropdown say "Please select a category first"?

28 Jun 2008, 07:41
#266
john4 avatar

john4

New Zenner

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

Re: AJAX IMAGE Swapper support thread

greydawgjr:

Hi John,

I realized my original configurations were for landscape so the edit I did was never actually being called. I changed it to portrait and tried again and have been unable to produce any error. Furthermore, it's working PERFECTLY!:clap:

Maybe if you had AIS up when you swapped out that file it was complaining? Give it another shot, let me know if you need help...

Hey,greydawgjr .You are the god.:D hte problem is sovled.Tons of thanks.:clap:

28 Jun 2008, 07:51
#267
greydawgjr avatar

greydawgjr

New Zenner

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

Re: AJAX IMAGE Swapper support thread

john4:

Hey,greydawgjr .You are the god.:D hte problem is sovled.Tons of thanks.:clap:

:D Excellent! Jay had told me exactly what file to look in so it made it a lot easier to figure out. Glad we could knock this one off his plate!

28 Jun 2008, 11:42
#268
arquetipo avatar

arquetipo

New Zenner

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

Re: AJAX IMAGE Swapper support thread

jaycode:

Thats the weirdest problem I've ever seen with AIS!

Looks like the javascript for AIS crashes with those of other module's. Try disabling the other modules' javascript and see if thats working. If you need me to debug it for you, let me know via pm.

I've been playing with the module and I think that the problem is than when I upload images with ajax, as they have the same file name as the ones previously uploaded, the product listing image is overwritten by a small one.

If I then upload the same image with IH2 the product listing miniaturization is fixed, and the quality of the ajax images improve (images are overwritten).

The trouble is that this process of uploading an re-uploading images for each product is slow and tedious.

I though about two different image filenames for AIS and IH2, but then the quality of AIS images is not good and I still have to upload images two times.
Is there any way to improve th quality of AIS images? I don't know why the compression is so low in my page.

I don't know a lot about php or sql, so I don't know if there is some error with the scripting. I've send you a PM with all my data so that you can take a look at my site.

Thank you Jay.

Jacobo.

29 Jun 2008, 02:07
#269
john4 avatar

john4

New Zenner

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

Re: AJAX IMAGE Swapper support thread

greydawgjr:

:D Excellent! Jay had told me exactly what file to look in so it made it a lot easier to figure out. Glad we could knock this one off his plate!

Cheer! :D

but I tested the effect under IE7 and FF,.the image jump outside the box and the the thumbs cannt be showed in FF and overfloat the medium image in IE7.

in IE6, all the diplay run very good. Pls have a look at my site and c what happen.:smartalec:

https://www.he15.com

29 Jun 2008, 03:10
#270
greydawgjr avatar

greydawgjr

New Zenner

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

Re: AJAX IMAGE Swapper support thread

john4:

Cheer! :D

but I tested the effect under IE7 and FF,.the image jump outside the box and the the thumbs cannt be showed in FF and overfloat the medium image in IE7.

in IE6, all the diplay run very good. Pls have a look at my site and c what happen.:smartalec:

https://www.he15.com

That's just a css thing at this point. You can edit the styles_AJAX_image_file.css to fix that. Specifically if you change #image_viewer to a width of around 390px and give #image_nav_container some padding-top of around 145px.

The thumb nails are a different story... I've actually been struggling with that one myself. Those go in the .back class which is controlled by stylesheet.css and the image_small class of the AJAX style sheet. For some reason they always get assigned a width and height of 75px which is why I thought there was a database bug a while ago. Turns out the database does get the correct configuration values but it always gets 75 by 75. I'm looking into it and will let you know when I figure it out

29 Jun 2008, 10:50
#271
john4 avatar

john4

New Zenner

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

Re: AJAX IMAGE Swapper support thread

greydawgjr:

That's just a css thing at this point. You can edit the styles_AJAX_image_file.css to fix that. Specifically if you change #image_viewer to a width of around 390px and give #image_nav_container some padding-top of around 145px.

The thumb nails are a different story... I've actually been struggling with that one myself. Those go in the .back class which is controlled by stylesheet.css and the image_small class of the AJAX style sheet. For some reason they always get assigned a width and height of 75px which is why I thought there was a database bug a while ago. Turns out the database does get the correct configuration values but it always gets 75 by 75. I'm looking into it and will let you know when I figure it out

Thank you man.It is OK.:clap:

02 Jul 2008, 07:48
#272
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

Arquetipo:

I've been playing with the module and I think that the problem is than when I upload images with ajax, as they have the same file name as the ones previously uploaded, the product listing image is overwritten by a small one.

If I then upload the same image with IH2 the product listing miniaturization is fixed, and the quality of the ajax images improve (images are overwritten).

The trouble is that this process of uploading an re-uploading images for each product is slow and tedious.

I though about two different image filenames for AIS and IH2, but then the quality of AIS images is not good and I still have to upload images two times.
Is there any way to improve th quality of AIS images? I don't know why the compression is so low in my page.

I don't know a lot about php or sql, so I don't know if there is some error with the scripting. I've send you a PM with all my data so that you can take a look at my site.

Thank you Jay.

Jacobo.

Got it! Just read your PM, will do something over the weekend, as I implied on my reply

02 Jul 2008, 07:52
#273
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

greydawgjr:

Hmmm, we aren't redeclaring anything here, although the file I edited came from 3.1.2 but I believe they are the same between versions. I dropped the new file in my install with 3.1.1 and had no issues. Where are you getting that error; admin, frontend, after trying to add an image?

All I did was change how the ratio was calculated. Originally it was this:

$zoom = $width / $currheight;

> ```php
$zoom = $height / $currheight;
```You might open you original file and replace line 38 with the second line above and try it that way.  It does work (at least for me :D)
> 
> Look at your images though... Your large size is 440 x 514 for a (w:h) ratio of .85, however your medium is 308 x 420 for a ratio of .73.  
> 
> So what we have is 420/514 = .81 and .81 * 440 for 359.  359/420 = .85 just like 440/514.  Maybe I'm missing something, (I think this does assume that your AIS config has 359 and 420 as your medium image dimensions).  Especially since landscape images are calculated by taking $width / $currwidth and that's working, which is what I believe Jay meant to do for portrait images.
> 
> Give it a shot and let us know what happens...

Thanks for this Greydawgjr! :clap: Could you amend the change and upload the updated module to contribution under our name please!
05 Jul 2008, 13:59
#274
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:

It can't be helped can it? Okay then I think now is the time to work on this module again...

By the way, I have uploaded the new version, if you have any problem with images not appearing, try the new one!

To uninstall, revert back everything you do during installation, and run the DROP query in the sql_installer.sql. It doesn't change any of the core files so uninstallation shouldn't be that hard.

I haven't thought of anything for zoom in...

Hi - Can you be a little more clear about how to uninstall the sql - I can see the UNINSTALLATION text in the SQL but do not know exactly how to implement and from what point.

Thanks!

06 Jul 2008, 13:03
#275
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

MeltDown:

Hi - Can you be a little more clear about how to uninstall the sql - I can see the UNINSTALLATION text in the SQL but do not know exactly how to implement and from what point.

Thanks!

Just copy paste the lines started with DROP on sql file to your sql installer page. Remove the files you copied during installation. Well you don't actually have to remove everything you can just remove everything under modules/pages/product_info/ and revert back the lines you changed in tpl_product_info_page.php everything should go back to normal.

06 Jul 2008, 16:04
#276
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:

Just copy paste the lines started with DROP on sql file to your sql installer page. Remove the files you copied during installation. Well you don't actually have to remove everything you can just remove everything under modules/pages/product_info/ and revert back the lines you changed in tpl_product_info_page.php everything should go back to normal.

Hmmm... The SQL install failed. Should I just be running this?

-- DROP TABLE products_attributes_images;

-- SET @t4=0;
-- SELECT (@t4:=configuration_group_id) as t4
-- FROM configuration_group
-- WHERE configuration_group_title= 'AJAX Image Swapper';
-- DELETE FROM configuration WHERE configuration_group_id = @t4;
-- DELETE FROM configuration_group WHERE configuration_group_id = @t4;

Thanks

07 Jul 2008, 17:31
#277
greydawgjr avatar

greydawgjr

New Zenner

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

Re: AJAX IMAGE Swapper support thread

MeltDown:

Hmmm... The SQL install failed. Should I just be running this?

Thanks

I think you need all of this:

UNINSTALLATION
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4 
FROM configuration_group
WHERE configuration_group_title= 'Fual Slimbox';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

DROP TABLE products_attributes_images;

SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4 
FROM configuration_group
WHERE configuration_group_title= 'AJAX Image Swapper';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

Those double dashes are commented out lines, I uncommented them in the code above...

08 Jul 2008, 03:39
#278
oakwood avatar

oakwood

New Zenner

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

Re: AJAX IMAGE Swapper support thread

OK, here we go, everything works great, I'm just trying to make some changes so it fits my template a little more.

  1. I tried changing the size of AIS from the admin. It didn't seem to work, so I am assuming I have to alter the code, correct? I can change the image size but not the whole frame.

  2. Same with the frames around the small images.

  3. Is there a way to completly not use the large image? What I'm getting at is I dont even want the customer to be able to click on my image. Is there a way to disable this feature?

Thanks and thanks for the mod as well.

08 Jul 2008, 04:25
#279
oakwood avatar

oakwood

New Zenner

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

Re: AJAX IMAGE Swapper support thread

OK, #1 & 2 were not that hard, a couple of changes to the Ajax Image Swapper css code, but most importantly, the images had to be re-uploaded, which I was overlooking.

08 Jul 2008, 13:19
#280
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

greydawgjr:

I think you need all of this:

UNINSTALLATION
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Fual Slimbox';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

DROP TABLE products_attributes_images;

SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'AJAX Image Swapper';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

> 
> Those double dashes are commented out lines, I uncommented them in the code above...


Thanks - That looks to have done the trick