Results 1 to 4 of 4

Hybrid View

  1. #1

    Default HOW TO INSTALL OLDER VERSION PLUGINS WITH install.sql on the latest zencart version

    Hello all, the new version of zencart have number of new changes and the most common problem you will get is that all the plugins with install.sql should contain one new statement...

    Its the ",NULL" right before every closing ")" on confuguration,

    At this point I dont know if ,NULL will do the job with every plugin but it worked for me so far with the tested plugins, so it will work in most cases

    Here is an example of not working install.sql:

    PHP Code:
    DELETE FROM configuration_group WHERE `configuration_group_titleLIKE 'Manufacturers All Config' LIMIT 2;
    DELETE FROM configuration WHERE `configuration_descriptionLIKE 'Manufacturers All Listing:%' LIMIT 7;

    INSERT INTO configuration_group VALUES ('''Manufacturers All Config''Manufacturers All Config''1''1');
    SELECT @gida := configuration_group_id FROM `configuration_groupwhere `configuration_group_titleLIKE 'Layout Settings';
    SELECT @gid := configuration_group_id FROM `configuration_groupwhere `configuration_group_titleLIKE 'Manufacturers All Config';
    UPDATE configuration_group SET sort_order = @gid WHERE configuration_group_id = @gid;

    INSERT INTO configuration VALUES ('''Categories Box - Show Manufacturers All Link''SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL''1''Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida'0'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),");
    INSERT INTO configuration VALUES ('''Display Empty Manufacturers''MANUFACTURERS_ALL_EMPTY_SHOW''0''Manufacturers All Listing: Set this to 1 if you want manufacturers with no products to show on the list.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),");
    INSERT INTO configuration VALUES ('''Display Manufacturer Image''MANUFACTURERS_ALL_IMAGE_SHOW''1''Manufacturers All Listing: Set this to 1 if you want the manufacturers logo to appear with the listing.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),");
    INSERT INTO configuration VALUES ('''Display Manufacturer URL''MANUFACTURERS_ALL_URL_SHOW''1''Manufacturers All Listing: Set this to 1 if you want the manufacturers URL to appear with the listing.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),");
    INSERT INTO configuration VALUES ('''Manufacturers Per Row''MANUFACTURERS_ALL_COLUMNS''4''Manufacturers All Listing: Set the number of manufacturers per row to display.<br>(default 4)', @gid'7'now(), now(), NULLNULL);
    INSERT INTO configuration VALUES ('''Manufacturer Image Width''MANUFACTURERS_ALL_WIDTH''100px''Manufacturers All Listing: Set the maximum width of the manufacturers image.<br>(default 100px)', @gid'7'now(), now(), NULLNULL);
    INSERT INTO configuration VALUES ('''Manufacturer Image Height''MANUFACTURERS_ALL_HEIGHT''100px''Manufacturers All Listing: Set the maximum height of the manufacturers image<br>(default 100px)', @gid'7'now(), now(), NULLNULL);


    /*
    Admin page (Zen-cart 1.5.0)
    */
    INSERT INTO `admin_pages` (`page_key` ,`language_key` ,`main_page` ,`page_params` ,`menu_key` ,`display_on_menu` ,`sort_order`)VALUES 
    ('configManufacturersList''BOX_CONFIGURATION_MANUFACTURERS_LIST''FILENAME_CONFIGURATION'CONCAT('gID=',@gid), 'configuration''Y', @gid); 

    And here is the working example:

    PHP Code:
    DELETE FROM configuration_group WHERE `configuration_group_titleLIKE 'Manufacturers All Config' LIMIT 2;
    DELETE FROM configuration WHERE `configuration_descriptionLIKE 'Manufacturers All Listing:%' LIMIT 7;

    INSERT INTO configuration_group VALUES ('''Manufacturers All Config''Manufacturers All Config''1''1');
    SELECT @gida := configuration_group_id FROM `configuration_groupwhere `configuration_group_titleLIKE 'Layout Settings';
    SELECT @gid := configuration_group_id FROM `configuration_groupwhere `configuration_group_titleLIKE 'Manufacturers All Config';
    UPDATE configuration_group SET sort_order = @gid WHERE configuration_group_id = @gid;

    INSERT INTO configuration VALUES ('''Categories Box - Show Manufacturers All Link''SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL''1''Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida'0'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),"NULL);
    INSERT INTO configuration VALUES ('''Display Empty Manufacturers''MANUFACTURERS_ALL_EMPTY_SHOW''0''Manufacturers All Listing: Set this to 1 if you want manufacturers with no products to show on the list.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),"NULL);
    INSERT INTO configuration VALUES ('''Display Manufacturer Image''MANUFACTURERS_ALL_IMAGE_SHOW''1''Manufacturers All Listing: Set this to 1 if you want the manufacturers logo to appear with the listing.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),"NULL);
    INSERT INTO configuration VALUES ('''Display Manufacturer URL''MANUFACTURERS_ALL_URL_SHOW''1''Manufacturers All Listing: Set this to 1 if you want the manufacturers URL to appear with the listing.', @gid'7'now(), now(), NULL"zen_cfg_select_option(array('0', '1'),"NULL);
    INSERT INTO configuration VALUES ('''Manufacturers Per Row''MANUFACTURERS_ALL_COLUMNS''4''Manufacturers All Listing: Set the number of manufacturers per row to display.<br>(default 4)', @gid'7'now(), now(), NULLNULLNULL);
    INSERT INTO configuration VALUES ('''Manufacturer Image Width''MANUFACTURERS_ALL_WIDTH''100px''Manufacturers All Listing: Set the maximum width of the manufacturers image.<br>(default 100px)', @gid'7'now(), now(), NULLNULLNULL);
    INSERT INTO configuration VALUES ('''Manufacturer Image Height''MANUFACTURERS_ALL_HEIGHT''100px''Manufacturers All Listing: Set the maximum height of the manufacturers image<br>(default 100px)', @gid'7'now(), now(), NULLNULLNULL);


    /*
    Admin page (Zen-cart 1.5.0)
    */
    INSERT INTO `admin_pages` (`page_key` ,`language_key` ,`main_page` ,`page_params` ,`menu_key` ,`display_on_menu` ,`sort_order`)VALUES 
    ('configManufacturersList''BOX_CONFIGURATION_MANUFACTURERS_LIST''FILENAME_CONFIGURATION'CONCAT('gID=',@gid), 'configuration''Y', @gid); 

    All the best!
    My most recent work: magprom.net

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: HOW TO INSTALL OLDER VERSION PLUGINS WITH install.sql on the latest zencart versi

    The root cause of the issue you're having is that that install.sql is using blind inserts, i.e. identifying only the values to be placed into the database table without regard to the names of the fields that the specific bits of data should be placed. In addition, that install.sql posted presumes to put an empty string ('') into the configuration_id field which is an integer -- that won't fly with more recent and strict versions of mySQL.

    For each configuration item, the INSERT statement should be changed from (using the first as an example):
    Code:
    INSERT INTO configuration VALUES ('', 'Categories Box - Show Manufacturers All Link', 'SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL', '1', 'Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida, '0', now(), now(), NULL, "zen_cfg_select_option(array('0', '1'),", NULL);
    to
    Code:
    INSERT INTO configuration 
        (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function, use_function) 
    VALUES 
        ('Categories Box - Show Manufacturers All Link', 'SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL', '1', 'Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida, '0', now(), now(), NULL, "zen_cfg_select_option(array('0', '1'),", NULL);
    ... noting the removal of that first '', from each insertion.

  3. #3
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: HOW TO INSTALL OLDER VERSION PLUGINS WITH install.sql on the latest zencart versi

    Quote Originally Posted by lat9 View Post
    Code:
    INSERT INTO configuration 
        (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function, use_function) 
    VALUES 
        ('Categories Box - Show Manufacturers All Link', 'SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL', '1', 'Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida, '0', now(), now(), NULL, "zen_cfg_select_option(array('0', '1'),", NULL);
    Extra NULL at the end wouldn't you have to add the , val_function to the first statement? Would cause a count difference in SQL.
    Dave
    Always forward thinking... Lost my mind!

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: HOW TO INSTALL OLDER VERSION PLUGINS WITH install.sql on the latest zencart versi

    Quote Originally Posted by davewest View Post
    Extra NULL at the end wouldn't you have to add the , val_function to the first statement? Would cause a count difference in SQL.
    Thanks, Dave, the correction (since those pre-zc156 plugins don't include a val_function) should read:
    Code:
    INSERT INTO configuration 
        (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function, use_function) 
    VALUES 
        ('Categories Box - Show Manufacturers All Link', 'SHOW_CATEGORIES_BOX_MANUFACTURERS_ALL', '1', 'Manufacturers All Listing: Set this to 1 if you want to show the All Manufacturers link to show in the Categories Box.', @gida, '0', now(), now(), NULL, "zen_cfg_select_option(array('0', '1'),");
    ... removing that extra ,NULL.

 

 

Similar Threads

  1. v151 Possible to use an older template version with version 1.5.1?
    By fashion2 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Jun 2013, 11:11 PM
  2. Using latest PayPal Express Checkout with older version of ZenCart
    By jeffmic in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Sep 2010, 11:09 PM
  3. Which is best? Latest Version of XAMPP for Local Windows Install?
    By sweber in forum Installing on a Windows Server
    Replies: 3
    Last Post: 13 Apr 2009, 08:50 AM
  4. latest version (1.3.5) error/warning after fresh install
    By john95051 in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 6 Sep 2006, 12:30 AM

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