ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!Originally Posted by You need to add your prefix to the configuration_group table in sql_installer.sql file at this line:
[code
![]()
ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!Originally Posted by You need to add your prefix to the configuration_group table in sql_installer.sql file at this line:
[code
![]()
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
got it, finally it sank in!
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.Now, let's discuss the changes.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());
- 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.
- 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.
- If you DO NOT use a prefix, search and replace "zen_" with "".
- 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.
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
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?)
Thanks dbltoe,
Or if you install through admin install sql patches, for example if you have xyz_ as your prefix, use this:
Note that I only added xyz_ to this line:Code: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());
You can omit the first DROP query since it doesn't do nothing for fresh installation.Code:SELECT @last_id :=last_insert_id() FROM xyz_configuration_group;
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
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
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.
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:
The list of things still not known is too long for here but we continue on.
- This will NOT work without attributes on EVERY product as products without attributes just sit and spin waiting for an image.
- This will NOT work without PHP 5+
- The existing file structure does not put some of the files where they are needed. (web images folder is wrong)
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
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.
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Bookmarks