Forums / All Other Contributions/Addons / AJAX IMAGE Swapper support thread

AJAX IMAGE Swapper support thread

Views: 172,806

Results 61 to 80 of 786
16 Mar 2008, 7:38 AM
#61
jaycode avatar

jaycode

Zen Follower

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

AJAX IMAGE Swapper support thread

chuckienorton:

I just installed; One weird thing, is I now have 3 links under configuration to "Ajax Image Swapper!" The first two do nothing, and the third one brings me to correct page.

Can I fix this? Thanks.

Hmm, you installed the sql files several times didn't you?

Do you know how to use phpmyadmin or to manually edit your mysql database? You need to manually remove the first two menu under configuration - it is a simple process. Contact me via private message if you don't.

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

17 Mar 2008, 9:05 PM
#62
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

You need to manually remove the first two menu under configuration - it is a simple process.

Thanks! Worked like a charm.

17 Mar 2008, 9:22 PM
#63
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

Might have found a bug... or you can help me with proper way to handle this:

I want the thumbs (small images) to be smaller than 75, and to have more than 3 on a row. So I edited configuration to make small images 45x45 and then upped the row count to 6. Then when viewing the page, it was making the images smaller, but the div style still read "style="width: 75px; height: 75px;" ... so I had to go to Includes/Modules/Pages/product_info/jscript_imageViewer.js and do a find/replace to edit the line manually.

It's fixed now, but would be easier if:(1) this was a class, not style, that was controlled by css sheet; (2) it was automatically updated from configuration page.

Great app! Thanks.

17 Mar 2008, 9:26 PM
#64
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

Anyone want to easily change from 'Clicking' on images to 'Rolling Over' images in small menu (like zappos.com shoes does), simply go Includes/Modules/Pages/product_info/jscript_imageViewer.js and do a find/replace from all instances of "onclick" to "onMouseover"... works great here.

17 Mar 2008, 9:54 PM
#65
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: AJAX IMAGE Swapper support thread

as my 11 year-old granddaughter is want to say...
Snot! Kid talk for it's not.
Yours is not working when you click on the shoe for a larger image.
:no:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

17 Mar 2008, 10:32 PM
#66
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

dbltoe:

Yours is not working when you click on the shoe for a larger image.

Yeah, I'm still cleaning it up...clicking on large image doesn't work due to absolute positioning & z-index's on my site. Might turn the feature off altogether. I wonder how many people really click to see larger images..?

18 Mar 2008, 4:45 AM
#67
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

chuckienorton:

Might have found a bug... or you can help me with proper way to handle this:

I want the thumbs (small images) to be smaller than 75, and to have more than 3 on a row. So I edited configuration to make small images 45x45 and then upped the row count to 6. Then when viewing the page, it was making the images smaller, but the div style still read "style="width: 75px; height: 75px;" ... so I had to go to Includes/Modules/Pages/product_info/jscript_imageViewer.js and do a find/replace to edit the line manually.

It's fixed now, but would be easier if:(1) this was a class, not style, that was controlled by css sheet; (2) it was automatically updated from configuration page.

Great app! Thanks.

Oops yeah looks like a bug lol :P I'll definitely take a look on it. Had a bit of scratches from bboyin so I think this few days won't stay too far from my computer lol...

Just to make sure: That was from the most recent version right?

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

18 Mar 2008, 4:48 AM
#68
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

Hey, that looks more like endless.com! Well done! :D

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

18 Mar 2008, 3:52 PM
#69
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

jaycode:

Just to make sure: That was from the most recent version right?

I'm pretty sure, Its the only download option I had from your website. Folder says v2.02.

19 Mar 2008, 12:49 AM
#70
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

manage-it:

The image swapper installed succesfully, but the Image Swapper Manager does not show any products after choosing the category.
So I can select a category, but nothing happens.
Bram:dontgetit

Same problem just happened to me. I have three categories, each with multiple products. When selecting each of the categories in the Image-Swapper, it works great with two of the categories, but with just one of the categories, it won't show any products.

Was 'manage-it' ever responded to?

19 Mar 2008, 4:53 PM
#71
eggrush avatar

eggrush

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

[quote=You need to add your prefix to the configuration_group table in sql_installer.sql file at this line:

SELECT @last_id :=last_insert_id() FROM zen_configuration_group;
```Sorry that the installation file didn't mention that. I added that in the readme file for version 2.0.2[/quote]

ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!

:lookaroun
19 Mar 2008, 5:57 PM
#72
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: AJAX IMAGE Swapper support thread

eggrush:

ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!

:lookaroun

Note in the text where it says zen_configuration_group, the zen_ is a prefix that you may need to change or remove completely depending on the prefix of YOUR database tables.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Mar 2008, 10:20 PM
#73
eggrush avatar

eggrush

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

got it, finally it sank in!

20 Mar 2008, 12:35 AM
#74
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: AJAX IMAGE Swapper support thread

I feel I need to expand a little on the zen_ situation and a couple of related items.

First, here's my version of what the sql_installer.sql file for version 2.02 should look like.> DROP TABLE IF EXISTS zen_products_attributes_images;

CREATE TABLE zen_products_attributes_images (
image_id INT NOT NULL AUTO_INCREMENT,
products_attributes_id INT NOT NULL,
image_path VARCHAR(255),
image_title VARCHAR(255),
image_sort_order INT,
PRIMARY KEY(image_id)
);

INSERT INTO zen_configuration_group
(configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible)
VALUES (NULL, 'AJAX Image Swapper', 'Config options for AJAX Image Swapper', '1', '1');

UPDATE zen_configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @last_id :=last_insert_id() FROM zen_configuration_group;

INSERT INTO zen_configuration
(configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added)
VALUES
('', 'Small Image Height', 'IMAGE_VIEWER_SMALL_IMAGE_HEIGHT','75','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 1, now()),
('', 'Small Image Width', 'IMAGE_VIEWER_SMALL_IMAGE_WIDTH','75','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 5, now()),
('', 'Medium Image Height', 'IMAGE_VIEWER_MEDIUM_IMAGE_HEIGHT','300','The height of medium images in AJAX Image Swapper. Default 300.', @last_id, 10, now()),
('', 'Medium Image Width', 'IMAGE_VIEWER_MEDIUM_IMAGE_WIDTH','300','The width of medium images in AJAX Image Swapper. Default 300.', @last_id, 15, now()),
('', 'Number of Images Shown', 'IMAGE_VIEWER_IMAGES_NUM','3','Number of images shown in AJAX Image Swapper', @last_id, 20, now());Now, let's discuss the changes.

  1. New installs are bombing because the first command is to drop a table that might not even exist. Adding "IF EXISTS" stops the mysql error.
  2. zen_ is a common prefix that is added to the beginning of database table names when initially loading ZenCart. It was in the one spot and NOT in the others. That caused yet another mysql error.
  3. If you DO NOT use a prefix, search and replace "zen_" with "".
  4. If you DO use a prefix that is different from "zen_" (like "mystore_"), then search and replace "zen_" with "mystore_".

Hope this will help some of you out. The only disclaimer I have is that I NEVER use the admin to upload mysql. I use either a commercial program or phpMyAdmin.

I'll leave my comments on the installation file setup for another post.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Mar 2008, 3:22 AM
#75
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

dbltoe:

  1. New installs are bombing because the first command is to drop a table that might not even exist. Adding "IF EXISTS" stops the mysql error.
  1. zen_ is a common prefix that is added to the beginning of database table names when initially loading ZenCart. It was in the one spot and NOT in the others. That caused yet another mysql error.

Is it possible to have two IF EXISTS's ...one that adds to the table only for the databases w/ 'zen_blablabla', and the other that adds to the table for databases labelled 'blablabla'? That way this discussion is never an issue in the future? (not sure if this is even possible, just wondering?)

20 Mar 2008, 4:12 AM
#76
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

Thanks dbltoe,

Or if you install through admin install sql patches, for example if you have xyz_ as your prefix, use this:

			 				DROP TABLE products_attributes_images;

CREATE TABLE products_attributes_images (
	image_id INT NOT NULL AUTO_INCREMENT,
	products_attributes_id INT NOT NULL,
	image_path VARCHAR(255),
	image_title VARCHAR(255),
	image_sort_order INT,
	PRIMARY KEY(`image_id`)
);

INSERT INTO configuration_group
(configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible)
VALUES (NULL, 'AJAX Image Swapper', 'Config options for AJAX Image Swapper', '1', '1');

UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @last_id :=last_insert_id() FROM xyz_configuration_group;

INSERT INTO configuration 
(configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added)
VALUES 
('', 'Small Image Height', 'IMAGE_VIEWER_SMALL_IMAGE_HEIGHT','75','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 1, now()),
('', 'Small Image Width', 'IMAGE_VIEWER_SMALL_IMAGE_WIDTH','75','The height of small images in AJAX Image Swapper, shown as thumbnails. Default 75.', @last_id, 5, now()),
('', 'Medium Image Height', 'IMAGE_VIEWER_MEDIUM_IMAGE_HEIGHT','300','The height of medium images in AJAX Image Swapper. Default 300.', @last_id, 10, now()),
('', 'Medium Image Width', 'IMAGE_VIEWER_MEDIUM_IMAGE_WIDTH','300','The width of medium images in AJAX Image Swapper. Default 300.', @last_id, 15, now()),
('', 'Number of Images Shown', 'IMAGE_VIEWER_IMAGES_NUM','3','Number of images shown in AJAX Image Swapper', @last_id, 20, now());

Note that I only added xyz_ to this line:

 SELECT @last_id :=last_insert_id() FROM xyz_configuration_group;

You can omit the first DROP query since it doesn't do nothing for fresh installation.

Good luck

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

20 Mar 2008, 4:15 AM
#77
jaycode avatar

jaycode

Zen Follower

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

Re: AJAX IMAGE Swapper support thread

chuckienorton:

Is it possible to have two IF EXISTS's ...one that adds to the table only for the databases w/ 'zen_blablabla', and the other that adds to the table for databases labelled 'blablabla'? That way this discussion is never an issue in the future? (not sure if this is even possible, just wondering?)

Hold on, I don't think the IF EXISTS is of any issue to this, since even while it generated an error, it doesn't stop the query from running, if you install it from admin page. Just follow the installation steps from readme file, its already working(isn't it?).

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

20 Mar 2008, 4:16 AM
#78
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: AJAX IMAGE Swapper support thread

I'm not the sharpest knife in the drawer when it comes to this and I am not able to come up with a method that will detect the prefix before uploading the sql file.

The admin panel's Install SQL Patches MAY take into consideration the prefix but I haven't found where the configure.php setting is saved in the database. Also, I can't help but think that the mixture of prefix - no prefix could possibly help. Not trying to cast dispersions on anyone's ability. Just letting you know what we've had to do to get this working.

Not done looking but certainly open to those much smarter helping with the problem.:yes:

When the sql upload fails under the old method, you often wind up with two listings under Configuration. If you delete the wrong one, the ID will not match the setting in the configuration-group table.

Things only get worse from there.

Things known for sure:

  1. This will NOT work without attributes on EVERY product as products without attributes just sit and spin waiting for an image.:no:
  2. This will NOT work without PHP 5+:no:
  3. The existing file structure does not put some of the files where they are needed. (web images folder is wrong):oops:The list of things still not known is too long for here but we continue on.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Mar 2008, 4:27 AM
#79
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: AJAX IMAGE Swapper support thread

chuckienorton,
In reference to the onMouseover versus onclick, I would only change the one at or near line 36 in the script-imageViewer.js.
Changing all of them may frustrate the customer when they hover over the "lightbox effect" close box by mistake.
I would say the two at lines 492 and 493 would be optional.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Mar 2008, 5:15 AM
#80
chuckienorton avatar

chuckienorton

New Zenner

Join Date:
Dec 2007
Posts:
54
Plugin Contributions:
0

Re: AJAX IMAGE Swapper support thread

dbltoe:

chuckienorton,
In reference to the onMouseover versus onclick, I would only change the one at or near line 36 in the script-imageViewer.js.
Changing all of them may frustrate the customer when they hover over the "lightbox effect" close box by mistake.
I would say the two at lines 492 and 493 would be optional.

good call! Your right, it would be a bad idea changing all of them. I disabled the larger image part, so I didn't even think about it. Thanks!