Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2011
    Posts
    29
    Plugin Contributions
    0

    Default Cross Sell SQL error

    I am trying to use this module
    HTML Code:
    http://www.zen-cart.com/downloads.php?do=file&id=2
    as it is compatible with MagneticOne Store manager.

    I am getting an error when patching with the included SQL:

    HTML Code:
    ## Cross Sell v1.3.0
    #
    ## The following is used to install the Cross-Sell Products mapping table and the admin switches for display control in the catalog.
    ## This script should be able to be run from Admin->Tools->Install SQL Patches
    #
    
    #DROP TABLE IF EXISTS products_xsell;
    CREATE TABLE products_xsell (
      ID int(10) NOT NULL auto_increment,
      products_id int(10) unsigned NOT NULL default 1,
      xsell_id int(10) unsigned NOT NULL default 1,
      sort_order int(10) unsigned NOT NULL default 1,
      PRIMARY KEY  (ID), 
      KEY idx_products_id_xsell (products_id)
    ) TYPE=MyISAM;
    
    
    ## add switches for:  MIN_DISPLAY_XSELL, MAX_DISPLAY_XSELL
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Cross-Sell Products', 'MIN_DISPLAY_XSELL', 1, 'This is the minimum number of configured Cross-Sell products required in order to cause the Cross Sell information to be displayed.<br />Default: 1', 2, 17, now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Display Cross-Sell Products', 'MAX_DISPLAY_XSELL', 6, 'This is the maximum number of configured Cross-Sell products to be displayed.<br />Default: 6', 3, 66, now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Cross-Sell Products Columns per Row', 'SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUCTS', '3', 'Cross-Sell Products Columns to display per Row<br />0= off or set the sort order.<br />Default: 3', 18, 72, 'zen_cfg_select_option(array(0, 1, 2, 3, 4), ', now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Cross-Sell - Display prices?', 'XSELL_DISPLAY_PRICE', 'false', 'Cross-Sell -- Do you want to display the product prices too?<br />Default: false', 18, 72, 'zen_cfg_select_option(array(\'true\',\'false\'), ', now());
    
    
    ## For upgraders, you may want to add the additional index for marginal speed improvements:
    # ALTER TABLE products_xsell ADD INDEX idx_products_id_xsell (products_id);
    # INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Cross-Sell - Display prices?', 'XSELL_DISPLAY_PRICE', 'false', 'Cross-Sell -- Do you want to display the product prices too?<br />Default: false', 18, 72, 'zen_cfg_select_option(array(\'true\',\'false\'), ', now());
    I get the following error message:
    HTML Code:
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 1
    in:
    [CREATE TABLE products_xsell ( ID int(10) NOT NULL auto_increment, products_id int(10) unsigned NOT NULL default 1, xsell_id int(10) unsigned NOT NULL default 1, sort_order int(10) unsigned NOT NULL default 1, PRIMARY KEY (ID), KEY idx_products_id_xsell (products_id) ) TYPE=MyISAM;]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Can anyone suggest what the problem might be please?

    Thanks
    Gary

  2. #2
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Re: Cross Sell SQL error

    Change
    TYPE=MyISAM
    to
    ENGINE=MyISAM

    TYPE is now deprecated
    and ENGINE is the correct replacement.
    See if that works?

  3. #3
    Join Date
    Feb 2011
    Posts
    29
    Plugin Contributions
    0

    Default Re: Cross Sell SQL error

    That fixed it. Thankyou so much for the help.

    Cheers
    Gary

  4. #4
    selcyis Guest

    Default Re: Cross Sell SQL error

    Quote Originally Posted by gilby View Post
    Change
    TYPE=MyISAM
    to
    ENGINE=MyISAM

    TYPE is now deprecated
    and ENGINE is the correct replacement.
    See if that works?

    Admin/includes/functions/extra_funtions/multi_xsell.php line 294 replace
    PHP Code:
    KEY `idx_products_id_xsell` (`products_id`) ) TYPE=MyISAM"); 
    to
    PHP Code:
    KEY `idx_products_id_xsell` (`products_id`) ) ENGINE=MyISAM"); 

 

 

Similar Threads

  1. Fatal Error After installing Cross Sell - Just Another Cross Sell Mod
    By kconklin in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 9 Jul 2010, 02:38 PM
  2. Cross Sell SQL Error
    By TurtleDove in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 12 Mar 2008, 04:42 AM
  3. Cross Sell Install Trouble - SQL Error - help would be great!
    By steveo3279 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 25 Jan 2008, 08:14 PM
  4. Cross Sell My Sql Syntax Error
    By squid in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 22 Sep 2007, 11:04 PM
  5. Cross sell sql error
    By bean_2k1 in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 10 Apr 2007, 03:19 PM

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