Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Need an uninstall SQL query

    So installed the recover cart plug in and ran the sql query. I have it show up in the admin but it doesn't run. The following is what my hosting company told me.

    This appears to be related to the recover cart sale plugin. We recommend you contact the developer of this plugin and let them know that the script appears to be attempting to access a table that hasn't been created yet.

    The error message I got when I ran a strace on the script says "Table 'coucho_zncr1.zen_scart' doesn't exist."

    21:50:47 write(3, "\352\2\0\0\3SELECT cb.customers_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cb.products_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cb.customers_basket_quantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cb.customers_basket_date_added,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cus.customers_firstname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cus.customers_lastname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cus.customers_telephone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t cus.customers_email_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t sc.datemodified\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM zen_customers_basket cb\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN zen_customers cus ON (cb.customers_id = cus.customers_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN zen_scart sc ON (cb.customers_id = sc.customers_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE cb.customers_basket_date_added >= '20121111'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND cb.customers_id NOT IN ('')\n\t\t\t\t\t\t\t\t\t\t\t\t\tORDER BY cb.customers_id A SC, cb.customers_basket_date_added DESC", 750) = 750
    21:50:47 read(3, "5\0\0\1\377z\4#42S02Table 'coucho_zncr1.zen_scart' doesn't exist", 16384) = 57
    21:50:47 write(1, "<div class=\"systemError\">", 25) = 25
    21:50:47 write(1, "WARNING: An Error occurred, please refresh the page and try again.", 66) = 66

    Maybe my copy and paste of the provided sql query didnt go through. Can someone give me and uninstall query so I can try it again.
    I have already tried to reinstall the php files.

    Thanks!

  2. #2
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    This is the sql query:

    DROP TABLE IF EXISTS scart;
    CREATE TABLE scart (
    scartid int(11) NOT NULL auto_increment,
    customers_id int(11) NOT NULL default '0',
    dateadded varchar(8) NOT NULL default '',
    datemodified varchar(8) NOT NULL default '',
    PRIMARY KEY (scartid),
    UNIQUE KEY customers_id (customers_id),
    UNIQUE KEY scartid (scartid)
    ) TYPE=MyISAM;

    SET @configuration_group_id=0;
    SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'Recover Cart Sales' LIMIT 1;
    DELETE FROM configuration WHERE configuration_group_id = @configuration_group_id AND configuration_group_id != 0;
    DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id AND configuration_group_id != 0;

    INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'Recover Cart Sales', 'Recover Cart Sales (RCS) Configuration Values', '1', '1');
    SET @configuration_group_id=last_insert_id();
    UPDATE configuration_group SET sort_order = @configuration_group_id WHERE configuration_group_id = @configuration_group_id;

    SET @configuration_group_id=0;
    SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'Recover Cart Sales' LIMIT 1;

    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
    (NULL, 'Look back days', 'RCS_BASE_DAYS', '30', 'Number of days to look back from today for abandoned cards.', @configuration_group_id, 10, NULL, NOW(), NULL, NULL),
    (NULL, 'Sales Results Report days', 'RCS_REPORT_DAYS', '90', 'Number of days the sales results report takes into account. The more days the longer the SQL queries!.', @configuration_group_id, 15, NULL, NOW(), NULL, NULL),
    (NULL, 'E-Mail time to live', 'RCS_EMAIL_TTL', '90', 'Number of days to give for emails before they no longer show as being sent', @configuration_group_id, 20, NULL, NOW(), NULL, NULL),
    (NULL, 'Friendly E-Mails', 'RCS_EMAIL_FRIENDLY', 'true', 'If <b>true</b> then the customer\'s name will be used in the greeting. If <b>false</b> then a generic greeting will be used.', @configuration_group_id, 30, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Show Attributes', 'RCS_SHOW_ATTRIBUTES', 'false', 'Controls display of item attributes.<br /><br />Some sites have attributes for their items.<br /><br />Set this to <b>true</b> if yours does and you want to show them, otherwise set to <b>false</b>.', @configuration_group_id, 40, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Ignore Customers with Sessions', 'RCS_CHECK_SESSIONS', 'false', 'If you want the tool to ignore customers with an active session (ie, probably still shopping) set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will operate in the default manner of ignoring session data &amp; using less resources', @configuration_group_id, 40, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Ignore Repeat Customers', 'RCS_CHECK_REPEAT', 'false', 'Setting this to true will cause recover cart sales to ignore abandoned carts by repeat customers', @configuration_group_id, 45, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Current Customer Color', 'RCS_CURCUST_COLOR', '0000FF', 'Color for the word/phrase used to notate a current customer<br /><br />A current customer is someone who has purchased items from your store in the past.', @configuration_group_id, 50, NULL, NOW(), NULL, NULL),
    (NULL, 'Uncontacted hilight color', 'RCS_UNCONTACTED_COLOR', '80FFFF', 'Row highlight color for uncontacted customers.<br /><br />An uncontacted customer is one that you have <i>not</i> used this tool to send an email to before.', @configuration_group_id, 60, NULL, NOW(), NULL, NULL),
    (NULL, 'Contacted hilight color', 'RCS_CONTACTED_COLOR', 'FF9FA2', 'Row highlight color for contacted customers.<br /><br />An contacted customer is one that you <i>have</i> used this tool to send an email to before.', @configuration_group_id, 70, NULL, NOW(), NULL, NULL),
    (NULL, 'Matching Order Hilight', 'RCS_MATCHED_ORDER_COLOR', '9FFF22', 'Row highlight color for entrees that may have a matching order.<br /><br />An entry will be marked with this color if an order contains one or more of an item in the abandoned cart <b>and</b> matches either the cart\'s customer email address or database ID.', @configuration_group_id, 72, NULL, NOW(), NULL, NULL),
    (NULL, 'Skip Carts w/Matched Orders', 'RCS_SKIP_MATCHED_CARTS', 'true', 'To ignore carts with an a matching order set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will cause entries with a matching order to show, along with the matching order\'s status.<br /><br />See documentation for details.', @configuration_group_id, 80, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Lowest Pending sales status', 'RCS_PENDING_SALE_STATUS', '1', 'The highest value that an order can have and still be considered pending. Any value higher than this will be considered by RCS as sale which completed.<br /><br />See documentation for details.', @configuration_group_id, 85, NULL, NOW(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses('),
    (NULL, 'Report Even Row Style', 'RCS_REPORT_EVEN_STYLE', 'dataTableRow', 'Style for even rows in results report. Typical options are <i>dataTableRow</i> and <i>attributes-even</i>.', @configuration_group_id, 90, NULL, NOW(), NULL, NULL),
    (NULL, 'Report Odd Row Style', 'RCS_REPORT_ODD_STYLE', '', 'Style for odd rows in results report. Typical options are NULL (ie, no entry) and <i>attributes-odd</i>.', @configuration_group_id, 92, NULL, NOW(), NULL, NULL),
    (NULL, 'E-Mail Copies to', 'RCS_EMAIL_COPIES_TO', '', 'If you want copies of emails that are sent to customers by this contribution, enter the email address here. If empty no copies are sent', @configuration_group_id, 35, NULL, NOW(), NULL, NULL),
    (NULL, 'Autocheck \'safe\' carts to email', 'RCS_AUTO_CHECK', 'true', 'To check entries which are most likely safe to email (ie, not existing customers, not previously emailed, etc.) set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will leave all entries unchecked (you will have to check each entry you want to send an email for).', @configuration_group_id, 82, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Match orders from any date', 'RCS_CARTS_MATCH_ALL_DATES', 'true', 'If <b>true</b> then any order found with a matching item will be considered a matched order.<br /><br />If <b>false</b> only orders placed after the abandoned cart are considered.', @configuration_group_id, 84, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');

    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('recover_cart_sales', 'BOX_TOOLS_RECOVER_CART', 'FILENAME_RECOVER_CART_SALES', '', 'tools', 'Y', 200);

    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('stats_recover_cart_sales', 'BOX_REPORTS_RECOVER_CART_SALES', 'FILENAME_STATS_RECOVER_CART_SALES', '', 'reports', 'Y', 200);

    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('config_recover_cart_sales', 'BOX_CONFIG_RECOVER_CART_SALES', 'FILENAME_CONFIGURATION',CONCAT('gID=',@configuration_group_id), 'configuration', 'Y', @configuration_group_id);

  3. #3
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    Change TYPE=MyISAM to ENGINE=MyISAM

    And rerun the SQL query from within ZenCart Admin -> Tools -> Install SQL Patches
    Last edited by Limitless; 12 Dec 2012 at 06:45 AM.

  4. #4
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    I don't want it to undo everything I have done Limiteless. Will this just undo the recover cart?

  5. #5
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    Quote Originally Posted by coucho View Post
    I don't want it to undo everything I have done Limiteless. Will this just undo the recover cart?
    That will properly install the recover cart module.

    TYPE= is deprecated, the proper syntax is ENGINE=

    That will create the scart table that your hosting company says is missing (due to syntax error while creating table). All the rest of the statement is in the configuration table.

  6. #6
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    Sorry it didn't work

  7. #7
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    Error message?

  8. #8
    Join Date
    Jan 2008
    Location
    Memphis, USA
    Posts
    299
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    Can I give you access to my zen cart so you can do it in an im?

  9. #9
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need an uninstall SQL query

    This query runs fine:


    Code:
    
    DROP TABLE IF EXISTS scart; 
    CREATE TABLE scart (
    scartid int(11) NOT NULL auto_increment,
    customers_id int(11) NOT NULL default '0',
    dateadded varchar(8) NOT NULL default '',
    datemodified varchar(8) NOT NULL default '',
    PRIMARY KEY (scartid),
    UNIQUE KEY customers_id (customers_id),
    UNIQUE KEY scartid (scartid)
    ) ENGINE=MyISAM;
    
    SET @configuration_group_id=0;
    SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'Recover Cart Sales' LIMIT 1;
    DELETE FROM configuration WHERE configuration_group_id = @configuration_group_id AND configuration_group_id != 0;
    DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id AND configuration_group_id != 0;
    
    INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'Recover Cart Sales', 'Recover Cart Sales (RCS) Configuration Values', '1', '1');
    SET @configuration_group_id=last_insert_id();
    UPDATE configuration_group SET sort_order = @configuration_group_id WHERE configuration_group_id = @configuration_group_id;
    
    SET @configuration_group_id=0;
    SELECT (@configuration_group_id:=configuration_group_id) FROM configuration_group WHERE configuration_group_title= 'Recover Cart Sales' LIMIT 1;
    
    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 
    (NULL, 'Look back days', 'RCS_BASE_DAYS', '30', 'Number of days to look back from today for abandoned cards.', @configuration_group_id, 10, NULL, NOW(), NULL, NULL),
    (NULL, 'Sales Results Report days', 'RCS_REPORT_DAYS', '90', 'Number of days the sales results report takes into account. The more days the longer the SQL queries!.', @configuration_group_id, 15, NULL, NOW(), NULL, NULL),
    (NULL, 'E-Mail time to live', 'RCS_EMAIL_TTL', '90', 'Number of days to give for emails before they no longer show as being sent', @configuration_group_id, 20, NULL, NOW(), NULL, NULL),
    (NULL, 'Friendly E-Mails', 'RCS_EMAIL_FRIENDLY', 'true', 'If <b>true</b> then the customer\'s name will be used in the greeting. If <b>false</b> then a generic greeting will be used.', @configuration_group_id, 30, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Show Attributes', 'RCS_SHOW_ATTRIBUTES', 'false', 'Controls display of item attributes.<br /><br />Some sites have attributes for their items.<br /><br />Set this to <b>true</b> if yours does and you want to show them, otherwise set to <b>false</b>.', @configuration_group_id, 40, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Ignore Customers with Sessions', 'RCS_CHECK_SESSIONS', 'false', 'If you want the tool to ignore customers with an active session (ie, probably still shopping) set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will operate in the default manner of ignoring session data &amp; using less resources', @configuration_group_id, 40, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Ignore Repeat Customers', 'RCS_CHECK_REPEAT', 'false', 'Setting this to true will cause recover cart sales to ignore abandoned carts by repeat customers', @configuration_group_id, 45, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Current Customer Color', 'RCS_CURCUST_COLOR', '0000FF', 'Color for the word/phrase used to notate a current customer<br /><br />A current customer is someone who has purchased items from your store in the past.', @configuration_group_id, 50, NULL, NOW(), NULL, NULL),
    (NULL, 'Uncontacted hilight color', 'RCS_UNCONTACTED_COLOR', '80FFFF', 'Row highlight color for uncontacted customers.<br /><br />An uncontacted customer is one that you have <i>not</i> used this tool to send an email to before.', @configuration_group_id, 60, NULL, NOW(), NULL, NULL),
    (NULL, 'Contacted hilight color', 'RCS_CONTACTED_COLOR', 'FF9FA2', 'Row highlight color for contacted customers.<br /><br />An contacted customer is one that you <i>have</i> used this tool to send an email to before.', @configuration_group_id, 70, NULL, NOW(), NULL, NULL),
    (NULL, 'Matching Order Hilight', 'RCS_MATCHED_ORDER_COLOR', '9FFF22', 'Row highlight color for entrees that may have a matching order.<br /><br />An entry will be marked with this color if an order contains one or more of an item in the abandoned cart <b>and</b> matches either the cart\'s customer email address or database ID.', @configuration_group_id, 72, NULL, NOW(), NULL, NULL),
    (NULL, 'Skip Carts w/Matched Orders', 'RCS_SKIP_MATCHED_CARTS', 'true', 'To ignore carts with an a matching order set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will cause entries with a matching order to show, along with the matching order\'s status.<br /><br />See documentation for details.', @configuration_group_id, 80, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Lowest Pending sales status', 'RCS_PENDING_SALE_STATUS', '1', 'The highest value that an order can have and still be considered pending. Any value higher than this will be considered by RCS as sale which completed.<br /><br />See documentation for details.', @configuration_group_id, 85, NULL, NOW(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses('),
    (NULL, 'Report Even Row Style', 'RCS_REPORT_EVEN_STYLE', 'dataTableRow', 'Style for even rows in results report. Typical options are <i>dataTableRow</i> and <i>attributes-even</i>.', @configuration_group_id, 90, NULL, NOW(), NULL, NULL),
    (NULL, 'Report Odd Row Style', 'RCS_REPORT_ODD_STYLE', '', 'Style for odd rows in results report. Typical options are NULL (ie, no entry) and <i>attributes-odd</i>.', @configuration_group_id, 92, NULL, NOW(), NULL, NULL),
    (NULL, 'E-Mail Copies to', 'RCS_EMAIL_COPIES_TO', '', 'If you want copies of emails that are sent to customers by this contribution, enter the email address here. If empty no copies are sent', @configuration_group_id, 35, NULL, NOW(), NULL, NULL),
    (NULL, 'Autocheck \'safe\' carts to email', 'RCS_AUTO_CHECK', 'true', 'To check entries which are most likely safe to email (ie, not existing customers, not previously emailed, etc.) set this to <b>true</b>.<br /><br />Setting this to <b>false</b> will leave all entries unchecked (you will have to check each entry you want to send an email for).', @configuration_group_id, 82, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
    (NULL, 'Match orders from any date', 'RCS_CARTS_MATCH_ALL_DATES', 'true', 'If <b>true</b> then any order found with a matching item will be considered a matched order.<br /><br />If <b>false</b> only orders placed after the abandoned cart are considered.', @configuration_group_id, 84, NULL, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),');
    
    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('recover_cart_sales', 'BOX_TOOLS_RECOVER_CART', 'FILENAME_RECOVER_CART_SALES', '', 'tools', 'Y', 200);
    
    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('stats_recover_cart_sales', 'BOX_REPORTS_RECOVER_CART_SALES', 'FILENAME_STATS_RECOVER_CART_SALES', '', 'reports', 'Y', 200);
    
    INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('config_recover_cart_sales', 'BOX_CONFIG_RECOVER_CART_SALES', 'FILENAME_CONFIGURATION',CONCAT('gID=',@configuration_group_id), 'configuration', 'Y', @configuration_group_id);

 

 

Similar Threads

  1. v151 Need some help building a looping SQL query to fill an array.
    By Chris Stackhouse in forum General Questions
    Replies: 2
    Last Post: 3 Sep 2015, 08:19 PM
  2. v151 need a complicated SQL query for setting up a sale
    By crbsmith in forum Setting Up Specials and SaleMaker
    Replies: 6
    Last Post: 4 Jul 2013, 02:05 AM
  3. Need help creating SQL query...
    By DigitalShadow in forum General Questions
    Replies: 2
    Last Post: 22 Jun 2011, 02:05 PM
  4. Need help w/ SQL query in phpMyAdmin
    By audradh in forum General Questions
    Replies: 17
    Last Post: 16 Nov 2009, 01:05 PM
  5. Need uninstall sql file for this mod
    By coucho in forum General Questions
    Replies: 5
    Last Post: 14 Jan 2008, 07:14 AM

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