Page 8 of 79 FirstFirst ... 6789101858 ... LastLast
Results 71 to 80 of 786
  1. #71
    Join Date
    Apr 2007
    Posts
    152
    Plugin Contributions
    0

    Default Re: AJAX IMAGE Swapper support thread

    Quote Originally Posted by You need to add your prefix to the configuration_group table in sql_installer.sql file at this line:
    [code
    SELECT @last_id :=last_insert_id() FROM zen_configuration_group;[/code]Sorry that the installation file didn't mention that. I added that in the readme file for version 2.0.2
    ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!


  2. #72
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default Re: AJAX IMAGE Swapper support thread

    Quote Originally Posted by eggrush View Post
    ok i am trying to install this but what does prefix mean and where does it go exactly!....yeah i know i'am crap!

    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.

  3. #73
    Join Date
    Apr 2007
    Posts
    152
    Plugin Contributions
    0

    Default Re: AJAX IMAGE Swapper support thread

    got it, finally it sank in!

  4. #74
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default 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.

  5. #75
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: AJAX IMAGE Swapper support thread

    Quote Originally Posted by dbltoe View Post
    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.
    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?)

  6. #76
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default 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:

    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());
    Note that I only added xyz_ to this line:
    Code:
     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

  7. #77
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: AJAX IMAGE Swapper support thread

    Quote Originally Posted by chuckienorton View Post
    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

  8. #78
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default 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.

    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.
    2. This will NOT work without PHP 5+
    3. The existing file structure does not put some of the files where they are needed. (web images folder is wrong)
    The list of things still not known is too long for here but we continue on.

  9. #79
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,464
    Plugin Contributions
    11

    Default 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.

  10. #80
    Join Date
    Dec 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: AJAX IMAGE Swapper support thread

    Quote Originally Posted by dbltoe View Post
    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!

 

 
Page 8 of 79 FirstFirst ... 6789101858 ... LastLast

Similar Threads

  1. AJAX BANNER Swapper support thread
    By jaycode in forum All Other Contributions/Addons
    Replies: 19
    Last Post: 11 Oct 2012, 05:55 AM
  2. Any way to import image massively to AJAX Image Swapper ?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 Sep 2010, 04:35 PM
  3. Is there any way to massivly upload image to Ajax Image swapper?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 26 Jul 2010, 03:38 PM
  4. Error on AJAX IMAGE Swapper
    By easy665 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 28 Aug 2009, 02:38 PM
  5. AJAX Image Swapper Basic Support
    By jaycode in forum All Other Contributions/Addons
    Replies: 34
    Last Post: 31 Dec 2007, 06:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR