Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Cross Sell My Sql Syntax Error

    I had this problem, and the easiest solution was to just cut and paste a section at a time.

    For example, the sql file in it's entirety looks like this:

    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());
    Cutting and pasting it basically just boils down to doing a group at a time. For it to work on mine, I did this section first:
    Code:
    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;
    Next I did:
    Code:
    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());
    and so on and so on. Just doing each section that isn't commented using the #. I didnt have any SQL errors, and then just followed the 'readme' file that comes with the setting up the cross sell module in a template.

  2. #12
    Join Date
    Nov 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Cross Sell My Sql Syntax Error

    yeah i'm having the same syntax problem. i tried uploading the file and copying and pasting it in and still won't work. any other suggestions?

  3. #13
    Join Date
    Aug 2006
    Posts
    135
    Plugin Contributions
    0

    Default Re: Cross Sell My Sql Syntax Error

    I have the say error... why would I be getting this now??? I haven't made any changes.

  4. #14
    Join Date
    Aug 2006
    Posts
    135
    Plugin Contributions
    0

    Default Re: Cross Sell My Sql Syntax Error

    Quote Originally Posted by DrByte View Post
    You could save the trouble of guessing by just using phpMyAdmin instead of the SQL Patch screen.
    What do I need to do to fix it DrByte?

    Thanks
    Dan

  5. #15
    Join Date
    Aug 2007
    Location
    Oklahoma City, OK, USA
    Posts
    12
    Plugin Contributions
    0

    Default Re: Cross-Sell Syntax Error

    My syntax error is a little different; After installing the latest mod version (1.3.1), copying the required files, modifying the two required files, importing code into the database via Zen Admin (no errors), I get this error message on the product info page:

    Parse error: syntax error, unexpected T_REQUIRE in /home/thephoen/public_html/HouseStore/includes/templates/gloss_black/templates/tpl_product_info_display.php on line 1

    Now, while I realize that this is usually indicitive of a missing semicolon, I cannot find a single line of code requiring one that doesn't already have one. What's more, when restoring the original two files which I backed up beforehand I get a different syntax error.

    Examining the database code, it would seem that restoring the originals would make the admin script simply not seem to function, as the cross-sell module and associated files would not ever be called from product_info.php or tpl_product_info_display.php. Why the new syntax error? I cannot figure out how to make this module work...
    Remember, boys and girls, alcohol and calculus don't mix; never drink and derive!

  6. #16
    Join Date
    Aug 2007
    Location
    Oklahoma City, OK, USA
    Posts
    12
    Plugin Contributions
    0

    Default Re: Cross Sell Syntax Error

    My site is:

    http://shop.thephoenixhouse.net

    Warning: Adult Content!

    If anyone has a suggestion, it would be greatly appreciated. If this code hase been revised for 1.3.7, please point me to the revision? I tried to find a similar issue on the forums, but no luck.
    Remember, boys and girls, alcohol and calculus don't mix; never drink and derive!

  7. #17
    Join Date
    Sep 2007
    Posts
    35
    Plugin Contributions
    0

    Default Re: Cross Sell My Sql Syntax Error

    can some one please advise me on what to do ..
    have installed Cross-Sell then Advanced Cross Sell..
    Cross Sell seems to be working and so does Advanced Cross Sell to a degree but when i try and "CLEAN CROSS SELL" i get this error ..

    ##################################################################################################################################__
    1064 You have an error in your SQL syntax near 'SELECT products_id FROM products WHERE 1=1)' at line 1
    in:
    [DELETE FROM products_xsell WHERE products_id NOT IN (SELECT products_id FROM products WHERE 1=1)]
    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.
    ##################################################################################################################################___

    Also i can not use the "ADD PRODUCT FIELD BUTTON" nothing seems to happen, nor does the "CROSS SELL ONWAY" tick box.

    I have tried updateing my SQL database with the sql_patch through myPHPadmin but get this error ..

    ##################################################################################################################################____
    SQL-query :

    INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
    VALUES (
    '', 'Input type to be used in form', 'XSELL_FORM_INPUT_TYPE', 'model', 'Choose to use product ID or MODEL as your input type. Check readme file for more info', @t4, 1, NOW( ) , NOW( ) , NULL , 'zen_cfg_select_option(array(''id'', ''model''),'
    )

    MySQL said:

    Duplicate entry 'XSELL_FORM_INPUT_TYPE' for key 2
    ##################################################################################################################################_

    I have also tried it through "INSTALL SQL PATCH" both as small file sand one large one as suggested but still no go ..

    This is the sql_patch
    ##################################################################################################################################_
    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4
    FROM configuration_group
    WHERE configuration_group_title= 'Cross Sell';
    DELETE FROM configuration WHERE configuration_group_id = @t4;
    DELETE FROM configuration_group WHERE configuration_group_id = @t4;

    INSERT INTO configuration_group VALUES ('', 'Cross Sell', 'Set Cross Sell Options', '1', '1');
    UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

    SET @t4=0;
    SELECT (@t4:=configuration_group_id) as t4
    FROM configuration_group
    WHERE configuration_group_title= 'Cross Sell';


    UPDATE configuration SET configuration_group_id = @t4 WHERE configuration_key IN ('MIN_DISPLAY_XSELL','MAX_DISPLAY_XSELL','SHOW_PRODUCT_INFO_COLUMNS_XSELL_PRODUC TS','XSELL_DISPLAY_PRICE');

    INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
    ('', 'Input type to be used in form', 'XSELL_FORM_INPUT_TYPE', 'model', 'Choose to use product ID or MODEL as your input type. Check readme file for more info', @t4, 1, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''id'', ''model''),');
    ################################################################################################################################################################ ##################################################__

    I am running the latest Zen-Cart (Zen Cart 1.3.7.1) with database patch ( Database Patch Level: 1.3.7.1)

    Please help me out guys.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Cross Sell SQL error
    By garwak in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 18 Jan 2013, 03:06 AM
  2. 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
  3. Cross Sell SQL Error
    By TurtleDove in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 12 Mar 2008, 04:42 AM
  4. 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
  5. Cross sell sql error
    By bean_2k1 in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 10 Apr 2007, 03:19 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