Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Help uninstalling How Did You Hear About Us addon

    Hello I was wondering if someone can please tell me the exact code I would need to enter and run in the Install SQL Patches in the ZenCart Admin Panel to uninstall the following code from the database?

    As the following code was entered and ran in the Install SQL Patches in the ZenCart Admin Panel for the mod to work. But now I would like to remove all traces of it from the Database.

    Code:
    DROP TABLE IF EXISTS sources;
    CREATE TABLE sources (
      sources_id int NOT NULL auto_increment,
      sources_name varchar(64) NOT NULL,
      PRIMARY KEY (sources_id),
      KEY IDX_SOURCES_NAME (sources_name)
    );
    
    INSERT INTO sources VALUES (1, 'Google');
    INSERT INTO sources VALUES (2, 'Yahoo!');
    INSERT INTO sources VALUES (3, 'AOL');
    INSERT INTO sources VALUES (4, 'MSN');
    INSERT INTO sources VALUES (5, 'ZenCart');
    
    DROP TABLE IF EXISTS sources_other;
    CREATE TABLE sources_other (
      customers_id int NOT NULL default '0',
      sources_other_name varchar(64) NOT NULL,
      PRIMARY KEY (customers_id)
    );
    
    ALTER TABLE customers_info ADD customers_info_source_id int NOT NULL AFTER customers_info_date_account_last_modified;
    
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display "Other" Referral option', 'DISPLAY_REFERRAL_OTHER', 'true', 'Display "Other - please specify" with text box in referral source in account creation', '1', '22', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Referral', 'REFERRAL_REQUIRED', 'true', 'Require the Referral Source in account creation', '5', '6', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    This question was asked in the mods thread a couple of times but no one replied. So I thought it best to ask this question in this section as a general question in the hope that someone will know how to do this and be kind enough to reply on how it can be done properly.

    If someone can please help me with this that would be great and I will let the others know how it can be done as well.

    Thanks.

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Help uninstalling How Did You Hear About Us addon

    Quote Originally Posted by CybaGirl View Post
    Hello I was wondering if someone can please tell me the exact code I would need to enter and run in the Install SQL Patches in the ZenCart Admin Panel to uninstall the following code from the database?
    WARNING: The code below is untested. Use at your own risk.

    GENERAL INFO: As a rule there is rarely ever a need to 'undo' changes made to the database when removing modules. Doing so will often cause more problems that its worth.

    If this module has changed any files by including references to these database fields, and you remove the fields, the store will crash. On the other hand, these fields will happily exist without causing any harm or problems if nothing else exists that refer to them.

    Anyway, if you feel you must, then the following code should work.

    Code:
    DROP TABLE IF EXISTS sources;
    DROP TABLE IF EXISTS sources_other;
    ALTER TABLE customers_info DROP COLUMN customers_info_source_id
    DELETE from configuration where configuration_key = 'DISPLAY_REFERRAL_OTHER'
    DELETE from configuration where configuration_key = 'REFERRAL_REQUIRED'
    Cheers
    Rod

  3. #3
    Join Date
    Jul 2009
    Posts
    122
    Plugin Contributions
    0

    Default Re: Help uninstalling How Did You Hear About Us addon

    Hello Rod hope all is well and thank you so very much for your reply.

    I should have known that you would know how to do this .

    Thanks again!


 

 

Similar Threads

  1. How did you hear about us? HELP
    By narsaw in forum Managing Customers and Orders
    Replies: 12
    Last Post: 10 Mar 2011, 03:35 AM
  2. "How did you hear about us" addon problem
    By scatzc in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 29 Sep 2010, 08:13 PM
  3. How did you hear about us help
    By dapottster in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 24 Sep 2010, 08:08 PM
  4. Replies: 2
    Last Post: 23 Jul 2009, 02:11 PM
  5. 'how did you hear about us' addon
    By oksana in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 12 Jun 2009, 01:36 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