Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Sudan and South Sudan are two different countries  (Read 11775 times)

Offline OneMore

  • Newbie
  • *
  • Posts: 46
  • Karma: +13/-0
    • View Profile
Sudan and South Sudan are two different countries
« on: December 11, 2023, 12:24:00 PM »
Just for your info, South Sudan is not the South of the Sudan, but an independant country that is missing in the database  of Abantecart 1.3.4.

I found this when setting delivery locations.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5993
  • Karma: +284/-2
    • View Profile
Re: Sudan and South Sudan are two different countries
« Reply #1 on: December 12, 2023, 02:49:39 AM »
Hello.
Thank you for letting us know.  The demo data will be updated in the next version.

Offline OneMore

  • Newbie
  • *
  • Posts: 46
  • Karma: +13/-0
    • View Profile
Re: Sudan and South Sudan are two different countries
« Reply #2 on: December 13, 2023, 04:44:52 AM »
Hello,
Thank you.
As in version 1.3.4 the latest country is (242,...,'Kosovo'), I would suggest in next version South Sudan to take id 243 (or greater), so that it does not break relationships based on countries ids of the actual list. That seems to be the way you do things. Thanks.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5993
  • Karma: +284/-2
    • View Profile
Re: Sudan and South Sudan are two different countries
« Reply #3 on: December 14, 2023, 04:43:28 AM »
Hello,
Thank you.
As in version 1.3.4 the latest country is (242,...,'Kosovo'), I would suggest in next version South Sudan to take id 243 (or greater), so that it does not break relationships based on countries ids of the actual list. That seems to be the way you do things. Thanks.
Hello. The relationships are not broken if added from admin.
"That seems to be the way you do things." this is how Mysql databases are working. The next ID has come from the database driver and not controlled and should not be by the AbanteCart code.

Offline OneMore

  • Newbie
  • *
  • Posts: 46
  • Karma: +13/-0
    • View Profile
Re: Sudan and South Sudan are two different countries
« Reply #4 on: December 17, 2023, 09:57:53 AM »
Yes, relationships are not broken if new countries are added from admin.

But assume that there are new countries, like what happened after Yugoslavia was splitted in several countries.

If new countries are appended at the end of the list in the SQL (like it has been done so far), you just have to have a glance at the INSERT statements for table `ac_countries` from "install/abantecart_database.sql", and insert those countries through the admin (which will autoincrement the ID), or with a few SQL INSERT queries.

Now, assume that new countries that instead of being appended to the list in "install/abantecart_database.sql" would have been alphabetically inserted in it, and ID renumbered accordingly (which would be a "wrong good idea").

In such case, a user that doesn't know if any new country has been added to the list would have to upgrade a few tables with "TRUNCATE ..." SQL queries and reinserting the whole list of countries and regions with ("INSERT INTO ..."). But the IDs of countries would not be same, and if some `zones`and `zones_to_locations`had been defined (for shipping, a.s.o.), those relationships would be broken because the countries would have got different IDs than previously.
In such a case, extensions based on zones would become uncompatible between several AbanteCart versions.

So, in summary, in the installer of any newer version of Abantecart, new countries must simply be apended at the end of the list in "ac_countries" table from "install/abantecart_database.sql".
Countries that previously existed must keep the same ID like they already have  "install/abantecart_database.sql".
This is the way to ensure maximum compatibility among different versions of AbanteCart.



Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5993
  • Karma: +284/-2
    • View Profile
Re: Sudan and South Sudan are two different countries
« Reply #5 on: December 18, 2023, 01:50:09 AM »
Hello.
Once you install AbanteCart the file abantecart_database.sql is never run again. No matter what we have in the new version your dynamic data like locations, taxes, counties, products, categories, regions, and usually language definitions are not affected. The upgrade process does not change your countries.

 

Powered by SMFPacks Social Login Mod