Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers from other countries

    It's unadvisable to delete any countries from your database. Doing so DOES prevent ANY use of those removed countries for anything, including registration and sales and shipping quotes.

    It's better to "disable" certain countries via your Admin. Deleting them altogether is generally a bad idea.


    And, now that you've deleted them, you'll need to put them back by completely wiping out all the tables related to countries/zones, and put back the originals that came with Zen Cart: countries, zones, geo_zones, zones_to_geo_zones.
    And, if you've ever added any countries/zones back via your Admin after having deleted some, you're going to run into some issues with your historical data that utilized those incorrectly-added records.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  2. #2
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Customers from other countries

    Quote Originally Posted by DrByte View Post
    It's unadvisable to delete any countries from your database. Doing so DOES prevent ANY use of those removed countries for anything, including registration and sales and shipping quotes.

    It's better to "disable" certain countries via your Admin. Deleting them altogether is generally a bad idea.


    And, now that you've deleted them, you'll need to put them back by completely wiping out all the tables related to countries/zones, and put back the originals that came with Zen Cart: countries, zones, geo_zones, zones_to_geo_zones.
    And, if you've ever added any countries/zones back via your Admin after having deleted some, you're going to run into some issues with your historical data that utilized those incorrectly-added records.
    So if I only ship within United States I still need to put all the countries back into the Database after I delete them. So if did put them back into the Database how can I keep other countries from registering?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers from other countries

    Quote Originally Posted by wmorris View Post
    how can I keep other countries from registering?
    Admin->Locations->Countries ... click the green dot next to any country you wish to "disable" registration/sales for. That will turn it red so that it's disabled.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Customers from other countries

    Quote Originally Posted by DrByte View Post
    Admin->Locations->Countries ... click the green dot next to any country you wish to "disable" registration/sales for. That will turn it red so that it's disabled.
    What is the best way to insert those countries back into the database?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers from other countries

    Quote Originally Posted by wmorris View Post
    What is the best way to insert those countries back into the database?
    All the data for the "countries" and "zones" tables is in the /zc_install/sql/install/mysql_utf8.sql file.

    If you've added records to the geo_zones or zones_to_geo_zones tables that refer to countries or zones that are outside the normal list, or have manually added back any countries to the database that has resulted in those records getting a different countries_id or zone_id then you'll need to manually fix all the conflicts and point the IDs back to the proper original values.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Customers from other countries

    Quote Originally Posted by DrByte View Post
    All the data for the "countries" and "zones" tables is in the /zc_install/sql/install/mysql_utf8.sql file.

    If you've added records to the geo_zones or zones_to_geo_zones tables that refer to countries or zones that are outside the normal list, or have manually added back any countries to the database that has resulted in those records getting a different countries_id or zone_id then you'll need to manually fix all the conflicts and point the IDs back to the proper original values.
    Code:
    Ok, when I try to re-insert the SQL I got this:
    
    Error
    SQL query:
    
    
    ## SQL Sections Specific to UTF8 character set
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Convert currencies for Text emails', 'CURRENCIES_TRANSLATIONS', '&pound;,£:&euro;,€:&reg;,®:&trade;,™', 'What currency conversions do you need for Text emails?<br />Example = &amp;pound;,&pound;:&amp;euro;,&euro;', 12, 120, NULL, '2003-11-21 00:00:00', NULL, 'zen_cfg_textarea_small(');
    MySQL said: Documentation
    
    #1062 - Duplicate entry 'CURRENCIES_TRANSLATIONS' for key 'unq_config_key_zen'

  7. #7
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers from other countries

    That particular INSERT is for the "configuration" table.
    You only want to run the ones for countries and zones (which I think are all the "rest" of the file, except that first one).
    And, you'll get an error for any countries and zones that already exist in your database. You'll need to accommodate that manually. (Some people do that by TRUNCATEing the tables first; others do it by running each INSERT one at a time; others do it by running everything up until an error occurs and then deleting all the ones up until the error, and then continuing with the ones after that error and then repeat similarly until done. Lots of ways to do it, depending on how important it is to you to keep existing data in the table.)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Customers from other countries

    Quote Originally Posted by DrByte View Post
    That particular INSERT is for the "configuration" table.
    You only want to run the ones for countries and zones (which I think are all the "rest" of the file, except that first one).
    And, you'll get an error for any countries and zones that already exist in your database. You'll need to accommodate that manually. (Some people do that by TRUNCATEing the tables first; others do it by running each INSERT one at a time; others do it by running everything up until an error occurs and then deleting all the ones up until the error, and then continuing with the ones after that error and then repeat similarly until done. Lots of ways to do it, depending on how important it is to you to keep existing data in the table.)
    What do you mean by "TRUNCATEing"?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Customers from other countries

    There are 3 ways to "get rid of all records in a table":

    a) manually delete all records. But this doesn't also reset the "id autoincrement counter"
    b) TRUNCATE the table (TRUNCATE is the SQL statement, like INSERT is a SQL statement). This wipes the table empty and resets the autoincrement counter, giving the table and indexes a clean slate.
    c) drop the table and recreate it; but this requires knowing how to recreate the table. But it does also give a clean slate.

    In PhpMyAdmin you can truncate a table by listing all tables and clicking the "Empty" button beside the table you wish to truncate.
    Be aware that this deletes EVERYTHING in the table.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Customers from other countries

    Quote Originally Posted by DrByte View Post
    There are 3 ways to "get rid of all records in a table":

    a) manually delete all records. But this doesn't also reset the "id autoincrement counter"
    b) TRUNCATE the table (TRUNCATE is the SQL statement, like INSERT is a SQL statement). This wipes the table empty and resets the autoincrement counter, giving the table and indexes a clean slate.
    c) drop the table and recreate it; but this requires knowing how to recreate the table. But it does also give a clean slate.

    In PhpMyAdmin you can truncate a table by listing all tables and clicking the "Empty" button beside the table you wish to truncate.
    Be aware that this deletes EVERYTHING in the table.
    Well they finally all got back into the database. So right now I am hitting the green buttons and make sure its red for other countries.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 5 May 2016, 01:25 AM
  2. v139h Hiding categories from specific customers/countries
    By igi2011 in forum General Questions
    Replies: 0
    Last Post: 22 Mar 2012, 10:45 AM
  3. Remove conversion rates when users are from other countries
    By kylex in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 1
    Last Post: 21 Jan 2011, 01:02 AM
  4. New Customers showing order history from other customers?
    By gbensonii in forum Managing Customers and Orders
    Replies: 5
    Last Post: 3 Oct 2009, 08:24 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