diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 8a10f38..72eede2 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.6.0] - 2020-02-24 + +* Ability to manage affiliate products +* Refreshed design for checkout details screen +* New logic to manage shipping better +* Bug fixes + ## [2.5.1] - 2020-02-21 * Pubspec.yaml dependency updates diff --git a/LabelStoreMax/assets/default_shipping.json b/LabelStoreMax/assets/default_shipping.json new file mode 100644 index 0000000..f0e56c5 --- /dev/null +++ b/LabelStoreMax/assets/default_shipping.json @@ -0,0 +1,2645 @@ +{ + "AF": { + "country": "Afghanistan", + "states": {} + }, + "AX": { + "country": "Åland Islands", + "states": {} + }, + "AL": { + "country": "Albania", + "states": {} + }, + "DZ": { + "country": "Algeria", + "states": { + "DZ:DZ-01": "Adrar", + "DZ:DZ-02": "Chlef", + "DZ:DZ-03": "Laghouat", + "DZ:DZ-04": "Oum El Bouaghi", + "DZ:DZ-05": "Batna", + "DZ:DZ-06": "Béjaïa", + "DZ:DZ-07": "Biskra", + "DZ:DZ-08": "Béchar", + "DZ:DZ-09": "Blida", + "DZ:DZ-10": "Bouira", + "DZ:DZ-11": "Tamanghasset", + "DZ:DZ-12": "Tébessa", + "DZ:DZ-13": "Tlemcen", + "DZ:DZ-14": "Tiaret", + "DZ:DZ-15": "Tizi Ouzou", + "DZ:DZ-16": "Algiers", + "DZ:DZ-17": "Djelfa", + "DZ:DZ-18": "Jijel", + "DZ:DZ-19": "Sétif", + "DZ:DZ-20": "Saïda", + "DZ:DZ-21": "Skikda", + "DZ:DZ-22": "Sidi Bel Abbès", + "DZ:DZ-23": "Annaba", + "DZ:DZ-24": "Guelma", + "DZ:DZ-25": "Constantine", + "DZ:DZ-26": "Médéa", + "DZ:DZ-27": "Mostaganem", + "DZ:DZ-28": "M’Sila", + "DZ:DZ-29": "Mascara", + "DZ:DZ-30": "Ouargla", + "DZ:DZ-31": "Oran", + "DZ:DZ-32": "El Bayadh", + "DZ:DZ-33": "Illizi", + "DZ:DZ-34": "Bordj Bou Arréridj", + "DZ:DZ-35": "Boumerdès", + "DZ:DZ-36": "El Tarf", + "DZ:DZ-37": "Tindouf", + "DZ:DZ-38": "Tissemsilt", + "DZ:DZ-39": "El Oued", + "DZ:DZ-40": "Khenchela", + "DZ:DZ-41": "Souk Ahras", + "DZ:DZ-42": "Tipasa", + "DZ:DZ-43": "Mila", + "DZ:DZ-44": "Aïn Defla", + "DZ:DZ-45": "Naama", + "DZ:DZ-46": "Aïn Témouchent", + "DZ:DZ-47": "Ghardaïa", + "DZ:DZ-48": "Relizane" + } + }, + "AS": { + "country": "American Samoa", + "states": {} + }, + "AD": { + "country": "Andorra", + "states": {} + }, + "AO": { + "country": "Angola", + "states": { + "AO:BGO": "Bengo", + "AO:BLU": "Benguela", + "AO:BIE": "Bié", + "AO:CAB": "Cabinda", + "AO:CNN": "Cunene", + "AO:HUA": "Huambo", + "AO:HUI": "Huíla", + "AO:CCU": "Kuando Kubango", + "AO:CNO": "Kwanza-Norte", + "AO:CUS": "Kwanza-Sul", + "AO:LUA": "Luanda", + "AO:LNO": "Lunda-Norte", + "AO:LSU": "Lunda-Sul", + "AO:MAL": "Malanje", + "AO:MOX": "Moxico", + "AO:NAM": "Namibe", + "AO:UIG": "Uíge", + "AO:ZAI": "Zaire" + } + }, + "AI": { + "country": "Anguilla", + "states": {} + }, + "AQ": { + "country": "Antarctica", + "states": {} + }, + "AG": { + "country": "Antigua and Barbuda", + "states": {} + }, + "AR": { + "country": "Argentina", + "states": { + "AR:C": "Ciudad Autónoma de Buenos Aires", + "AR:B": "Buenos Aires", + "AR:K": "Catamarca", + "AR:H": "Chaco", + "AR:U": "Chubut", + "AR:X": "Córdoba", + "AR:W": "Corrientes", + "AR:E": "Entre Ríos", + "AR:P": "Formosa", + "AR:Y": "Jujuy", + "AR:L": "La Pampa", + "AR:F": "La Rioja", + "AR:M": "Mendoza", + "AR:N": "Misiones", + "AR:Q": "Neuquén", + "AR:R": "Río Negro", + "AR:A": "Salta", + "AR:J": "San Juan", + "AR:D": "San Luis", + "AR:Z": "Santa Cruz", + "AR:S": "Santa Fe", + "AR:G": "Santiago del Estero", + "AR:V": "Tierra del Fuego", + "AR:T": "Tucumán" + } + }, + "AM": { + "country": "Armenia", + "states": {} + }, + "AW": { + "country": "Aruba", + "states": {} + }, + "AU": { + "country": "Australia", + "states": { + "AU:ACT": "Australian Capital Territory", + "AU:NSW": "New South Wales", + "AU:NT": "Northern Territory", + "AU:QLD": "Queensland", + "AU:SA": "South Australia", + "AU:TAS": "Tasmania", + "AU:VIC": "Victoria", + "AU:WA": "Western Australia" + } + }, + "AT": { + "country": "Austria", + "states": {} + }, + "AZ": { + "country": "Azerbaijan", + "states": {} + }, + "BS": { + "country": "Bahamas", + "states": {} + }, + "BH": { + "country": "Bahrain", + "states": {} + }, + "BD": { + "country": "Bangladesh", + "states": { + "BD:BD-05": "Bagerhat", + "BD:BD-01": "Bandarban", + "BD:BD-02": "Barguna", + "BD:BD-06": "Barishal", + "BD:BD-07": "Bhola", + "BD:BD-03": "Bogura", + "BD:BD-04": "Brahmanbaria", + "BD:BD-09": "Chandpur", + "BD:BD-10": "Chattogram", + "BD:BD-12": "Chuadanga", + "BD:BD-11": "Cox's Bazar", + "BD:BD-08": "Cumilla", + "BD:BD-13": "Dhaka", + "BD:BD-14": "Dinajpur", + "BD:BD-15": "Faridpur ", + "BD:BD-16": "Feni", + "BD:BD-19": "Gaibandha", + "BD:BD-18": "Gazipur", + "BD:BD-17": "Gopalganj", + "BD:BD-20": "Habiganj", + "BD:BD-21": "Jamalpur", + "BD:BD-22": "Jashore", + "BD:BD-25": "Jhalokati", + "BD:BD-23": "Jhenaidah", + "BD:BD-24": "Joypurhat", + "BD:BD-29": "Khagrachhari", + "BD:BD-27": "Khulna", + "BD:BD-26": "Kishoreganj", + "BD:BD-28": "Kurigram", + "BD:BD-30": "Kushtia", + "BD:BD-31": "Lakshmipur", + "BD:BD-32": "Lalmonirhat", + "BD:BD-36": "Madaripur", + "BD:BD-37": "Magura", + "BD:BD-33": "Manikganj ", + "BD:BD-39": "Meherpur", + "BD:BD-38": "Moulvibazar", + "BD:BD-35": "Munshiganj", + "BD:BD-34": "Mymensingh", + "BD:BD-48": "Naogaon", + "BD:BD-43": "Narail", + "BD:BD-40": "Narayanganj", + "BD:BD-42": "Narsingdi", + "BD:BD-44": "Natore", + "BD:BD-45": "Nawabganj", + "BD:BD-41": "Netrakona", + "BD:BD-46": "Nilphamari", + "BD:BD-47": "Noakhali", + "BD:BD-49": "Pabna", + "BD:BD-52": "Panchagarh", + "BD:BD-51": "Patuakhali", + "BD:BD-50": "Pirojpur", + "BD:BD-53": "Rajbari", + "BD:BD-54": "Rajshahi", + "BD:BD-56": "Rangamati", + "BD:BD-55": "Rangpur", + "BD:BD-58": "Satkhira", + "BD:BD-62": "Shariatpur", + "BD:BD-57": "Sherpur", + "BD:BD-59": "Sirajganj", + "BD:BD-61": "Sunamganj", + "BD:BD-60": "Sylhet", + "BD:BD-63": "Tangail", + "BD:BD-64": "Thakurgaon" + } + }, + "BB": { + "country": "Barbados", + "states": {} + }, + "BY": { + "country": "Belarus", + "states": {} + }, + "PW": { + "country": "Belau", + "states": {} + }, + "BE": { + "country": "Belgium", + "states": {} + }, + "BZ": { + "country": "Belize", + "states": {} + }, + "BJ": { + "country": "Benin", + "states": { + "BJ:AL": "Alibori", + "BJ:AK": "Atakora", + "BJ:AQ": "Atlantique", + "BJ:BO": "Borgou", + "BJ:CO": "Collines", + "BJ:KO": "Kouffo", + "BJ:DO": "Donga", + "BJ:LI": "Littoral", + "BJ:MO": "Mono", + "BJ:OU": "Ouémé", + "BJ:PL": "Plateau", + "BJ:ZO": "Zou" + } + }, + "BM": { + "country": "Bermuda", + "states": {} + }, + "BT": { + "country": "Bhutan", + "states": {} + }, + "BO": { + "country": "Bolivia", + "states": { + "BO:B": "Chuquisaca", + "BO:H": "Beni", + "BO:C": "Cochabamba", + "BO:L": "La Paz", + "BO:O": "Oruro", + "BO:N": "Pando", + "BO:P": "Potosí", + "BO:S": "Santa Cruz", + "BO:T": "Tarija" + } + }, + "BQ": { + "country": "Bonaire, Saint Eustatius and Saba", + "states": {} + }, + "BA": { + "country": "Bosnia and Herzegovina", + "states": {} + }, + "BW": { + "country": "Botswana", + "states": {} + }, + "BV": { + "country": "Bouvet Island", + "states": {} + }, + "BR": { + "country": "Brazil", + "states": { + "BR:AC": "Acre", + "BR:AL": "Alagoas", + "BR:AP": "Amapá", + "BR:AM": "Amazonas", + "BR:BA": "Bahia", + "BR:CE": "Ceará", + "BR:DF": "Distrito Federal", + "BR:ES": "Espírito Santo", + "BR:GO": "Goiás", + "BR:MA": "Maranhão", + "BR:MT": "Mato Grosso", + "BR:MS": "Mato Grosso do Sul", + "BR:MG": "Minas Gerais", + "BR:PA": "Pará", + "BR:PB": "Paraíba", + "BR:PR": "Paraná", + "BR:PE": "Pernambuco", + "BR:PI": "Piauí", + "BR:RJ": "Rio de Janeiro", + "BR:RN": "Rio Grande do Norte", + "BR:RS": "Rio Grande do Sul", + "BR:RO": "Rondônia", + "BR:RR": "Roraima", + "BR:SC": "Santa Catarina", + "BR:SP": "São Paulo", + "BR:SE": "Sergipe", + "BR:TO": "Tocantins" + } + }, + "IO": { + "country": "British Indian Ocean Territory", + "states": {} + }, + "BN": { + "country": "Brunei", + "states": {} + }, + "BG": { + "country": "Bulgaria", + "states": { + "BG:BG-01": "Blagoevgrad", + "BG:BG-02": "Burgas", + "BG:BG-08": "Dobrich", + "BG:BG-07": "Gabrovo", + "BG:BG-26": "Haskovo", + "BG:BG-09": "Kardzhali", + "BG:BG-10": "Kyustendil", + "BG:BG-11": "Lovech", + "BG:BG-12": "Montana", + "BG:BG-13": "Pazardzhik", + "BG:BG-14": "Pernik", + "BG:BG-15": "Pleven", + "BG:BG-16": "Plovdiv", + "BG:BG-17": "Razgrad", + "BG:BG-18": "Ruse", + "BG:BG-27": "Shumen", + "BG:BG-19": "Silistra", + "BG:BG-20": "Sliven", + "BG:BG-21": "Smolyan", + "BG:BG-23": "Sofia", + "BG:BG-22": "Sofia-Grad", + "BG:BG-24": "Stara Zagora", + "BG:BG-25": "Targovishte", + "BG:BG-03": "Varna", + "BG:BG-04": "Veliko Tarnovo", + "BG:BG-05": "Vidin", + "BG:BG-06": "Vratsa", + "BG:BG-28": "Yambol" + } + }, + "BF": { + "country": "Burkina Faso", + "states": {} + }, + "BI": { + "country": "Burundi", + "states": {} + }, + "KH": { + "country": "Cambodia", + "states": {} + }, + "CM": { + "country": "Cameroon", + "states": {} + }, + "CA": { + "country": "Canada", + "states": { + "CA:AB": "Alberta", + "CA:BC": "British Columbia", + "CA:MB": "Manitoba", + "CA:NB": "New Brunswick", + "CA:NL": "Newfoundland and Labrador", + "CA:NT": "Northwest Territories", + "CA:NS": "Nova Scotia", + "CA:NU": "Nunavut", + "CA:ON": "Ontario", + "CA:PE": "Prince Edward Island", + "CA:QC": "Quebec", + "CA:SK": "Saskatchewan", + "CA:YT": "Yukon Territory" + } + }, + "CV": { + "country": "Cape Verde", + "states": {} + }, + "KY": { + "country": "Cayman Islands", + "states": {} + }, + "CF": { + "country": "Central African Republic", + "states": {} + }, + "TD": { + "country": "Chad", + "states": {} + }, + "CL": { + "country": "Chile", + "states": {} + }, + "CN": { + "country": "China", + "states": { + "CN:CN1": "Yunnan / 云南", + "CN:CN2": "Beijing / 北京", + "CN:CN3": "Tianjin / 天津", + "CN:CN4": "Hebei / 河北", + "CN:CN5": "Shanxi / 山西", + "CN:CN6": "Inner Mongolia / 內蒙古", + "CN:CN7": "Liaoning / 辽宁", + "CN:CN8": "Jilin / 吉林", + "CN:CN9": "Heilongjiang / 黑龙江", + "CN:CN10": "Shanghai / 上海", + "CN:CN11": "Jiangsu / 江苏", + "CN:CN12": "Zhejiang / 浙江", + "CN:CN13": "Anhui / 安徽", + "CN:CN14": "Fujian / 福建", + "CN:CN15": "Jiangxi / 江西", + "CN:CN16": "Shandong / 山东", + "CN:CN17": "Henan / 河南", + "CN:CN18": "Hubei / 湖北", + "CN:CN19": "Hunan / 湖南", + "CN:CN20": "Guangdong / 广东", + "CN:CN21": "Guangxi Zhuang / 广西壮族", + "CN:CN22": "Hainan / 海南", + "CN:CN23": "Chongqing / 重庆", + "CN:CN24": "Sichuan / 四川", + "CN:CN25": "Guizhou / 贵州", + "CN:CN26": "Shaanxi / 陕西", + "CN:CN27": "Gansu / 甘肃", + "CN:CN28": "Qinghai / 青海", + "CN:CN29": "Ningxia Hui / 宁夏", + "CN:CN30": "Macao / 澳门", + "CN:CN31": "Tibet / 西藏", + "CN:CN32": "Xinjiang / 新疆" + } + }, + "CX": { + "country": "Christmas Island", + "states": {} + }, + "CC": { + "country": "Cocos (Keeling) Islands", + "states": {} + }, + "CO": { + "country": "Colombia", + "states": {} + }, + "KM": { + "country": "Comoros", + "states": {} + }, + "CG": { + "country": "Congo (Brazzaville)", + "states": {} + }, + "CD": { + "country": "Congo (Kinshasa)", + "states": {} + }, + "CK": { + "country": "Cook Islands", + "states": {} + }, + "CR": { + "country": "Costa Rica", + "states": {} + }, + "HR": { + "country": "Croatia", + "states": {} + }, + "CU": { + "country": "Cuba", + "states": {} + }, + "CW": { + "country": "Curaçao", + "states": {} + }, + "CY": { + "country": "Cyprus", + "states": {} + }, + "CZ": { + "country": "Czech Republic", + "states": {} + }, + "DK": { + "country": "Denmark", + "states": {} + }, + "DJ": { + "country": "Djibouti", + "states": {} + }, + "DM": { + "country": "Dominica", + "states": {} + }, + "DO": { + "country": "Dominican Republic", + "states": {} + }, + "EC": { + "country": "Ecuador", + "states": {} + }, + "EG": { + "country": "Egypt", + "states": { + "EG:EGALX": "Alexandria", + "EG:EGASN": "Aswan", + "EG:EGAST": "Asyut", + "EG:EGBA": "Red Sea", + "EG:EGBH": "Beheira", + "EG:EGBNS": "Beni Suef", + "EG:EGC": "Cairo", + "EG:EGDK": "Dakahlia", + "EG:EGDT": "Damietta", + "EG:EGFYM": "Faiyum", + "EG:EGGH": "Gharbia", + "EG:EGGZ": "Giza", + "EG:EGIS": "Ismailia", + "EG:EGJS": "South Sinai", + "EG:EGKB": "Qalyubia", + "EG:EGKFS": "Kafr el-Sheikh", + "EG:EGKN": "Qena", + "EG:EGLX": "Luxor", + "EG:EGMN": "Minya", + "EG:EGMNF": "Monufia", + "EG:EGMT": "Matrouh", + "EG:EGPTS": "Port Said", + "EG:EGSHG": "Sohag", + "EG:EGSHR": "Al Sharqia", + "EG:EGSIN": "North Sinai", + "EG:EGSUZ": "Suez", + "EG:EGWAD": "New Valley" + } + }, + "SV": { + "country": "El Salvador", + "states": {} + }, + "GQ": { + "country": "Equatorial Guinea", + "states": {} + }, + "ER": { + "country": "Eritrea", + "states": {} + }, + "EE": { + "country": "Estonia", + "states": {} + }, + "ET": { + "country": "Ethiopia", + "states": {} + }, + "FK": { + "country": "Falkland Islands", + "states": {} + }, + "FO": { + "country": "Faroe Islands", + "states": {} + }, + "FJ": { + "country": "Fiji", + "states": {} + }, + "FI": { + "country": "Finland", + "states": {} + }, + "FR": { + "country": "France", + "states": {} + }, + "GF": { + "country": "French Guiana", + "states": {} + }, + "PF": { + "country": "French Polynesia", + "states": {} + }, + "TF": { + "country": "French Southern Territories", + "states": {} + }, + "GA": { + "country": "Gabon", + "states": {} + }, + "GM": { + "country": "Gambia", + "states": {} + }, + "GE": { + "country": "Georgia", + "states": {} + }, + "DE": { + "country": "Germany", + "states": {} + }, + "GH": { + "country": "Ghana", + "states": { + "GH:AF": "Ahafo", + "GH:AH": "Ashanti", + "GH:BA": "Brong-Ahafo", + "GH:BO": "Bono", + "GH:BE": "Bono East", + "GH:CP": "Central", + "GH:EP": "Eastern", + "GH:AA": "Greater Accra", + "GH:NE": "North East", + "GH:NP": "Northern", + "GH:OT": "Oti", + "GH:SV": "Savannah", + "GH:UE": "Upper East", + "GH:UW": "Upper West", + "GH:TV": "Volta", + "GH:WP": "Western", + "GH:WN": "Western North" + } + }, + "GI": { + "country": "Gibraltar", + "states": {} + }, + "GR": { + "country": "Greece", + "states": { + "GR:I": "Attica", + "GR:A": "East Macedonia and Thrace", + "GR:B": "Central Macedonia", + "GR:C": "West Macedonia", + "GR:D": "Epirus", + "GR:E": "Thessaly", + "GR:F": "Ionian Islands", + "GR:G": "West Greece", + "GR:H": "Central Greece", + "GR:J": "Peloponnese", + "GR:K": "North Aegean", + "GR:L": "South Aegean", + "GR:M": "Crete" + } + }, + "GL": { + "country": "Greenland", + "states": {} + }, + "GD": { + "country": "Grenada", + "states": {} + }, + "GP": { + "country": "Guadeloupe", + "states": {} + }, + "GU": { + "country": "Guam", + "states": {} + }, + "GT": { + "country": "Guatemala", + "states": {} + }, + "GG": { + "country": "Guernsey", + "states": {} + }, + "GN": { + "country": "Guinea", + "states": {} + }, + "GW": { + "country": "Guinea-Bissau", + "states": {} + }, + "GY": { + "country": "Guyana", + "states": {} + }, + "HT": { + "country": "Haiti", + "states": {} + }, + "HM": { + "country": "Heard Island and McDonald Islands", + "states": {} + }, + "HN": { + "country": "Honduras", + "states": {} + }, + "HK": { + "country": "Hong Kong", + "states": { + "HK:HONG KONG": "Hong Kong Island", + "HK:KOWLOON": "Kowloon", + "HK:NEW TERRITORIES": "New Territories" + } + }, + "HU": { + "country": "Hungary", + "states": { + "HU:BK": "Bács-Kiskun", + "HU:BE": "Békés", + "HU:BA": "Baranya", + "HU:BZ": "Borsod-Abaúj-Zemplén", + "HU:BU": "Budapest", + "HU:CS": "Csongrád-Csanád", + "HU:FE": "Fejér", + "HU:GS": "Győr-Moson-Sopron", + "HU:HB": "Hajdú-Bihar", + "HU:HE": "Heves", + "HU:JN": "Jász-Nagykun-Szolnok", + "HU:KE": "Komárom-Esztergom", + "HU:NO": "Nógrád", + "HU:PE": "Pest", + "HU:SO": "Somogy", + "HU:SZ": "Szabolcs-Szatmár-Bereg", + "HU:TO": "Tolna", + "HU:VA": "Vas", + "HU:VE": "Veszprém", + "HU:ZA": "Zala" + } + }, + "IS": { + "country": "Iceland", + "states": {} + }, + "IN": { + "country": "India", + "states": { + "IN:AP": "Andhra Pradesh", + "IN:AR": "Arunachal Pradesh", + "IN:AS": "Assam", + "IN:BR": "Bihar", + "IN:CT": "Chhattisgarh", + "IN:GA": "Goa", + "IN:GJ": "Gujarat", + "IN:HR": "Haryana", + "IN:HP": "Himachal Pradesh", + "IN:JK": "Jammu and Kashmir", + "IN:JH": "Jharkhand", + "IN:KA": "Karnataka", + "IN:KL": "Kerala", + "IN:MP": "Madhya Pradesh", + "IN:MH": "Maharashtra", + "IN:MN": "Manipur", + "IN:ML": "Meghalaya", + "IN:MZ": "Mizoram", + "IN:NL": "Nagaland", + "IN:OR": "Orissa", + "IN:PB": "Punjab", + "IN:RJ": "Rajasthan", + "IN:SK": "Sikkim", + "IN:TN": "Tamil Nadu", + "IN:TS": "Telangana", + "IN:TR": "Tripura", + "IN:UK": "Uttarakhand", + "IN:UP": "Uttar Pradesh", + "IN:WB": "West Bengal", + "IN:AN": "Andaman and Nicobar Islands", + "IN:CH": "Chandigarh", + "IN:DN": "Dadra and Nagar Haveli", + "IN:DD": "Daman and Diu", + "IN:DL": "Delhi", + "IN:LD": "Lakshadeep", + "IN:PY": "Pondicherry (Puducherry)" + } + }, + "ID": { + "country": "Indonesia", + "states": { + "ID:AC": "Daerah Istimewa Aceh", + "ID:SU": "Sumatera Utara", + "ID:SB": "Sumatera Barat", + "ID:RI": "Riau", + "ID:KR": "Kepulauan Riau", + "ID:JA": "Jambi", + "ID:SS": "Sumatera Selatan", + "ID:BB": "Bangka Belitung", + "ID:BE": "Bengkulu", + "ID:LA": "Lampung", + "ID:JK": "DKI Jakarta", + "ID:JB": "Jawa Barat", + "ID:BT": "Banten", + "ID:JT": "Jawa Tengah", + "ID:JI": "Jawa Timur", + "ID:YO": "Daerah Istimewa Yogyakarta", + "ID:BA": "Bali", + "ID:NB": "Nusa Tenggara Barat", + "ID:NT": "Nusa Tenggara Timur", + "ID:KB": "Kalimantan Barat", + "ID:KT": "Kalimantan Tengah", + "ID:KI": "Kalimantan Timur", + "ID:KS": "Kalimantan Selatan", + "ID:KU": "Kalimantan Utara", + "ID:SA": "Sulawesi Utara", + "ID:ST": "Sulawesi Tengah", + "ID:SG": "Sulawesi Tenggara", + "ID:SR": "Sulawesi Barat", + "ID:SN": "Sulawesi Selatan", + "ID:GO": "Gorontalo", + "ID:MA": "Maluku", + "ID:MU": "Maluku Utara", + "ID:PA": "Papua", + "ID:PB": "Papua Barat" + } + }, + "IR": { + "country": "Iran", + "states": { + "IR:KHZ": "Khuzestan (خوزستان)", + "IR:THR": "Tehran (تهران)", + "IR:ILM": "Ilaam (ایلام)", + "IR:BHR": "Bushehr (بوشهر)", + "IR:ADL": "Ardabil (اردبیل)", + "IR:ESF": "Isfahan (اصفهان)", + "IR:YZD": "Yazd (یزد)", + "IR:KRH": "Kermanshah (کرمانشاه)", + "IR:KRN": "Kerman (کرمان)", + "IR:HDN": "Hamadan (همدان)", + "IR:GZN": "Ghazvin (قزوین)", + "IR:ZJN": "Zanjan (زنجان)", + "IR:LRS": "Luristan (لرستان)", + "IR:ABZ": "Alborz (البرز)", + "IR:EAZ": "East Azarbaijan (آذربایجان شرقی)", + "IR:WAZ": "West Azarbaijan (آذربایجان غربی)", + "IR:CHB": "Chaharmahal and Bakhtiari (چهارمحال و بختیاری)", + "IR:SKH": "South Khorasan (خراسان جنوبی)", + "IR:RKH": "Razavi Khorasan (خراسان رضوی)", + "IR:NKH": "North Khorasan (خراسان شمالی)", + "IR:SMN": "Semnan (سمنان)", + "IR:FRS": "Fars (فارس)", + "IR:QHM": "Qom (قم)", + "IR:KRD": "Kurdistan / کردستان)", + "IR:KBD": "Kohgiluyeh and BoyerAhmad (کهگیلوییه و بویراحمد)", + "IR:GLS": "Golestan (گلستان)", + "IR:GIL": "Gilan (گیلان)", + "IR:MZN": "Mazandaran (مازندران)", + "IR:MKZ": "Markazi (مرکزی)", + "IR:HRZ": "Hormozgan (هرمزگان)", + "IR:SBN": "Sistan and Baluchestan (سیستان و بلوچستان)" + } + }, + "IQ": { + "country": "Iraq", + "states": {} + }, + "IE": { + "country": "Ireland", + "states": { + "IE:CW": "Carlow", + "IE:CN": "Cavan", + "IE:CE": "Clare", + "IE:CO": "Cork", + "IE:DL": "Donegal", + "IE:D": "Dublin", + "IE:G": "Galway", + "IE:KY": "Kerry", + "IE:KE": "Kildare", + "IE:KK": "Kilkenny", + "IE:LS": "Laois", + "IE:LM": "Leitrim", + "IE:LK": "Limerick", + "IE:LD": "Longford", + "IE:LH": "Louth", + "IE:MO": "Mayo", + "IE:MH": "Meath", + "IE:MN": "Monaghan", + "IE:OY": "Offaly", + "IE:RN": "Roscommon", + "IE:SO": "Sligo", + "IE:TA": "Tipperary", + "IE:WD": "Waterford", + "IE:WH": "Westmeath", + "IE:WX": "Wexford", + "IE:WW": "Wicklow" + } + }, + "IM": { + "country": "Isle of Man", + "states": {} + }, + "IL": { + "country": "Israel", + "states": {} + }, + "IT": { + "country": "Italy", + "states": { + "IT:AG": "Agrigento", + "IT:AL": "Alessandria", + "IT:AN": "Ancona", + "IT:AO": "Aosta", + "IT:AR": "Arezzo", + "IT:AP": "Ascoli Piceno", + "IT:AT": "Asti", + "IT:AV": "Avellino", + "IT:BA": "Bari", + "IT:BT": "Barletta-Andria-Trani", + "IT:BL": "Belluno", + "IT:BN": "Benevento", + "IT:BG": "Bergamo", + "IT:BI": "Biella", + "IT:BO": "Bologna", + "IT:BZ": "Bolzano", + "IT:BS": "Brescia", + "IT:BR": "Brindisi", + "IT:CA": "Cagliari", + "IT:CL": "Caltanissetta", + "IT:CB": "Campobasso", + "IT:CE": "Caserta", + "IT:CT": "Catania", + "IT:CZ": "Catanzaro", + "IT:CH": "Chieti", + "IT:CO": "Como", + "IT:CS": "Cosenza", + "IT:CR": "Cremona", + "IT:KR": "Crotone", + "IT:CN": "Cuneo", + "IT:EN": "Enna", + "IT:FM": "Fermo", + "IT:FE": "Ferrara", + "IT:FI": "Firenze", + "IT:FG": "Foggia", + "IT:FC": "Forlì-Cesena", + "IT:FR": "Frosinone", + "IT:GE": "Genova", + "IT:GO": "Gorizia", + "IT:GR": "Grosseto", + "IT:IM": "Imperia", + "IT:IS": "Isernia", + "IT:SP": "La Spezia", + "IT:AQ": "L'Aquila", + "IT:LT": "Latina", + "IT:LE": "Lecce", + "IT:LC": "Lecco", + "IT:LI": "Livorno", + "IT:LO": "Lodi", + "IT:LU": "Lucca", + "IT:MC": "Macerata", + "IT:MN": "Mantova", + "IT:MS": "Massa-Carrara", + "IT:MT": "Matera", + "IT:ME": "Messina", + "IT:MI": "Milano", + "IT:MO": "Modena", + "IT:MB": "Monza e della Brianza", + "IT:NA": "Napoli", + "IT:NO": "Novara", + "IT:NU": "Nuoro", + "IT:OR": "Oristano", + "IT:PD": "Padova", + "IT:PA": "Palermo", + "IT:PR": "Parma", + "IT:PV": "Pavia", + "IT:PG": "Perugia", + "IT:PU": "Pesaro e Urbino", + "IT:PE": "Pescara", + "IT:PC": "Piacenza", + "IT:PI": "Pisa", + "IT:PT": "Pistoia", + "IT:PN": "Pordenone", + "IT:PZ": "Potenza", + "IT:PO": "Prato", + "IT:RG": "Ragusa", + "IT:RA": "Ravenna", + "IT:RC": "Reggio Calabria", + "IT:RE": "Reggio Emilia", + "IT:RI": "Rieti", + "IT:RN": "Rimini", + "IT:RM": "Roma", + "IT:RO": "Rovigo", + "IT:SA": "Salerno", + "IT:SS": "Sassari", + "IT:SV": "Savona", + "IT:SI": "Siena", + "IT:SR": "Siracusa", + "IT:SO": "Sondrio", + "IT:SU": "Sud Sardegna", + "IT:TA": "Taranto", + "IT:TE": "Teramo", + "IT:TR": "Terni", + "IT:TO": "Torino", + "IT:TP": "Trapani", + "IT:TN": "Trento", + "IT:TV": "Treviso", + "IT:TS": "Trieste", + "IT:UD": "Udine", + "IT:VA": "Varese", + "IT:VE": "Venezia", + "IT:VB": "Verbano-Cusio-Ossola", + "IT:VC": "Vercelli", + "IT:VR": "Verona", + "IT:VV": "Vibo Valentia", + "IT:VI": "Vicenza", + "IT:VT": "Viterbo" + } + }, + "CI": { + "country": "Ivory Coast", + "states": {} + }, + "JM": { + "country": "Jamaica", + "states": { + "JM:JM-01": "Kingston", + "JM:JM-02": "Saint Andrew", + "JM:JM-03": "Saint Thomas", + "JM:JM-04": "Portland", + "JM:JM-05": "Saint Mary", + "JM:JM-06": "Saint Ann", + "JM:JM-07": "Trelawny", + "JM:JM-08": "Saint James", + "JM:JM-09": "Hanover", + "JM:JM-10": "Westmoreland", + "JM:JM-11": "Saint Elizabeth", + "JM:JM-12": "Manchester", + "JM:JM-13": "Clarendon", + "JM:JM-14": "Saint Catherine" + } + }, + "JP": { + "country": "Japan", + "states": { + "JP:JP01": "Hokkaido", + "JP:JP02": "Aomori", + "JP:JP03": "Iwate", + "JP:JP04": "Miyagi", + "JP:JP05": "Akita", + "JP:JP06": "Yamagata", + "JP:JP07": "Fukushima", + "JP:JP08": "Ibaraki", + "JP:JP09": "Tochigi", + "JP:JP10": "Gunma", + "JP:JP11": "Saitama", + "JP:JP12": "Chiba", + "JP:JP13": "Tokyo", + "JP:JP14": "Kanagawa", + "JP:JP15": "Niigata", + "JP:JP16": "Toyama", + "JP:JP17": "Ishikawa", + "JP:JP18": "Fukui", + "JP:JP19": "Yamanashi", + "JP:JP20": "Nagano", + "JP:JP21": "Gifu", + "JP:JP22": "Shizuoka", + "JP:JP23": "Aichi", + "JP:JP24": "Mie", + "JP:JP25": "Shiga", + "JP:JP26": "Kyoto", + "JP:JP27": "Osaka", + "JP:JP28": "Hyogo", + "JP:JP29": "Nara", + "JP:JP30": "Wakayama", + "JP:JP31": "Tottori", + "JP:JP32": "Shimane", + "JP:JP33": "Okayama", + "JP:JP34": "Hiroshima", + "JP:JP35": "Yamaguchi", + "JP:JP36": "Tokushima", + "JP:JP37": "Kagawa", + "JP:JP38": "Ehime", + "JP:JP39": "Kochi", + "JP:JP40": "Fukuoka", + "JP:JP41": "Saga", + "JP:JP42": "Nagasaki", + "JP:JP43": "Kumamoto", + "JP:JP44": "Oita", + "JP:JP45": "Miyazaki", + "JP:JP46": "Kagoshima", + "JP:JP47": "Okinawa" + } + }, + "JE": { + "country": "Jersey", + "states": {} + }, + "JO": { + "country": "Jordan", + "states": {} + }, + "KZ": { + "country": "Kazakhstan", + "states": {} + }, + "KE": { + "country": "Kenya", + "states": { + "KE:KE01": "Baringo", + "KE:KE02": "Bomet", + "KE:KE03": "Bungoma", + "KE:KE04": "Busia", + "KE:KE05": "Elgeyo-Marakwet", + "KE:KE06": "Embu", + "KE:KE07": "Garissa", + "KE:KE08": "Homa Bay", + "KE:KE09": "Isiolo", + "KE:KE10": "Kajiado", + "KE:KE11": "Kakamega", + "KE:KE12": "Kericho", + "KE:KE13": "Kiambu", + "KE:KE14": "Kilifi", + "KE:KE15": "Kirinyaga", + "KE:KE16": "Kisii", + "KE:KE17": "Kisumu", + "KE:KE18": "Kitui", + "KE:KE19": "Kwale", + "KE:KE20": "Laikipia", + "KE:KE21": "Lamu", + "KE:KE22": "Machakos", + "KE:KE23": "Makueni", + "KE:KE24": "Mandera", + "KE:KE25": "Marsabit", + "KE:KE26": "Meru", + "KE:KE27": "Migori", + "KE:KE28": "Mombasa", + "KE:KE29": "Murang’a", + "KE:KE30": "Nairobi County", + "KE:KE31": "Nakuru", + "KE:KE32": "Nandi", + "KE:KE33": "Narok", + "KE:KE34": "Nyamira", + "KE:KE35": "Nyandarua", + "KE:KE36": "Nyeri", + "KE:KE37": "Samburu", + "KE:KE38": "Siaya", + "KE:KE39": "Taita-Taveta", + "KE:KE40": "Tana River", + "KE:KE41": "Tharaka-Nithi", + "KE:KE42": "Trans Nzoia", + "KE:KE43": "Turkana", + "KE:KE44": "Uasin Gishu", + "KE:KE45": "Vihiga", + "KE:KE46": "Wajir", + "KE:KE47": "West Pokot" + } + }, + "KI": { + "country": "Kiribati", + "states": {} + }, + "KW": { + "country": "Kuwait", + "states": {} + }, + "KG": { + "country": "Kyrgyzstan", + "states": {} + }, + "LA": { + "country": "Laos", + "states": { + "LA:AT": "Attapeu", + "LA:BK": "Bokeo", + "LA:BL": "Bolikhamsai", + "LA:CH": "Champasak", + "LA:HO": "Houaphanh", + "LA:KH": "Khammouane", + "LA:LM": "Luang Namtha", + "LA:LP": "Luang Prabang", + "LA:OU": "Oudomxay", + "LA:PH": "Phongsaly", + "LA:SL": "Salavan", + "LA:SV": "Savannakhet", + "LA:VI": "Vientiane Province", + "LA:VT": "Vientiane", + "LA:XA": "Sainyabuli", + "LA:XE": "Sekong", + "LA:XI": "Xiangkhouang", + "LA:XS": "Xaisomboun" + } + }, + "LV": { + "country": "Latvia", + "states": {} + }, + "LB": { + "country": "Lebanon", + "states": {} + }, + "LS": { + "country": "Lesotho", + "states": {} + }, + "LR": { + "country": "Liberia", + "states": { + "LR:BM": "Bomi", + "LR:BN": "Bong", + "LR:GA": "Gbarpolu", + "LR:GB": "Grand Bassa", + "LR:GC": "Grand Cape Mount", + "LR:GG": "Grand Gedeh", + "LR:GK": "Grand Kru", + "LR:LO": "Lofa", + "LR:MA": "Margibi", + "LR:MY": "Maryland", + "LR:MO": "Montserrado", + "LR:NM": "Nimba", + "LR:RV": "Rivercess", + "LR:RG": "River Gee", + "LR:SN": "Sinoe" + } + }, + "LY": { + "country": "Libya", + "states": {} + }, + "LI": { + "country": "Liechtenstein", + "states": {} + }, + "LT": { + "country": "Lithuania", + "states": {} + }, + "LU": { + "country": "Luxembourg", + "states": {} + }, + "MO": { + "country": "Macao", + "states": {} + }, + "MG": { + "country": "Madagascar", + "states": {} + }, + "MW": { + "country": "Malawi", + "states": {} + }, + "MY": { + "country": "Malaysia", + "states": { + "MY:JHR": "Johor", + "MY:KDH": "Kedah", + "MY:KTN": "Kelantan", + "MY:LBN": "Labuan", + "MY:MLK": "Malacca (Melaka)", + "MY:NSN": "Negeri Sembilan", + "MY:PHG": "Pahang", + "MY:PNG": "Penang (Pulau Pinang)", + "MY:PRK": "Perak", + "MY:PLS": "Perlis", + "MY:SBH": "Sabah", + "MY:SWK": "Sarawak", + "MY:SGR": "Selangor", + "MY:TRG": "Terengganu", + "MY:PJY": "Putrajaya", + "MY:KUL": "Kuala Lumpur" + } + }, + "MV": { + "country": "Maldives", + "states": {} + }, + "ML": { + "country": "Mali", + "states": {} + }, + "MT": { + "country": "Malta", + "states": {} + }, + "MH": { + "country": "Marshall Islands", + "states": {} + }, + "MQ": { + "country": "Martinique", + "states": {} + }, + "MR": { + "country": "Mauritania", + "states": {} + }, + "MU": { + "country": "Mauritius", + "states": {} + }, + "YT": { + "country": "Mayotte", + "states": {} + }, + "MX": { + "country": "Mexico", + "states": { + "MX:DF": "Ciudad de México", + "MX:JA": "Jalisco", + "MX:NL": "Nuevo León", + "MX:AG": "Aguascalientes", + "MX:BC": "Baja California", + "MX:BS": "Baja California Sur", + "MX:CM": "Campeche", + "MX:CS": "Chiapas", + "MX:CH": "Chihuahua", + "MX:CO": "Coahuila", + "MX:CL": "Colima", + "MX:DG": "Durango", + "MX:GT": "Guanajuato", + "MX:GR": "Guerrero", + "MX:HG": "Hidalgo", + "MX:MX": "Estado de México", + "MX:MI": "Michoacán", + "MX:MO": "Morelos", + "MX:NA": "Nayarit", + "MX:OA": "Oaxaca", + "MX:PU": "Puebla", + "MX:QT": "Querétaro", + "MX:QR": "Quintana Roo", + "MX:SL": "San Luis Potosí", + "MX:SI": "Sinaloa", + "MX:SO": "Sonora", + "MX:TB": "Tabasco", + "MX:TM": "Tamaulipas", + "MX:TL": "Tlaxcala", + "MX:VE": "Veracruz", + "MX:YU": "Yucatán", + "MX:ZA": "Zacatecas" + } + }, + "FM": { + "country": "Micronesia", + "states": {} + }, + "MD": { + "country": "Moldova", + "states": { + "MD:C": "Chișinău", + "MD:BL": "Bălți", + "MD:AN": "Anenii Noi", + "MD:BS": "Basarabeasca", + "MD:BR": "Briceni", + "MD:CH": "Cahul", + "MD:CT": "Cantemir", + "MD:CL": "Călărași", + "MD:CS": "Căușeni", + "MD:CM": "Cimișlia", + "MD:CR": "Criuleni", + "MD:DN": "Dondușeni", + "MD:DR": "Drochia", + "MD:DB": "Dubăsari", + "MD:ED": "Edineț", + "MD:FL": "Fălești", + "MD:FR": "Florești", + "MD:GE": "UTA Găgăuzia", + "MD:GL": "Glodeni", + "MD:HN": "Hîncești", + "MD:IL": "Ialoveni", + "MD:LV": "Leova", + "MD:NS": "Nisporeni", + "MD:OC": "Ocnița", + "MD:OR": "Orhei", + "MD:RZ": "Rezina", + "MD:RS": "Rîșcani", + "MD:SG": "Sîngerei", + "MD:SR": "Soroca", + "MD:ST": "Strășeni", + "MD:SD": "Șoldănești", + "MD:SV": "Ștefan Vodă", + "MD:TR": "Taraclia", + "MD:TL": "Telenești", + "MD:UN": "Ungheni" + } + }, + "MC": { + "country": "Monaco", + "states": {} + }, + "MN": { + "country": "Mongolia", + "states": {} + }, + "ME": { + "country": "Montenegro", + "states": {} + }, + "MS": { + "country": "Montserrat", + "states": {} + }, + "MA": { + "country": "Morocco", + "states": {} + }, + "MZ": { + "country": "Mozambique", + "states": { + "MZ:MZP": "Cabo Delgado", + "MZ:MZG": "Gaza", + "MZ:MZI": "Inhambane", + "MZ:MZB": "Manica", + "MZ:MZL": "Maputo Province", + "MZ:MZMPM": "Maputo", + "MZ:MZN": "Nampula", + "MZ:MZA": "Niassa", + "MZ:MZS": "Sofala", + "MZ:MZT": "Tete", + "MZ:MZQ": "Zambézia" + } + }, + "MM": { + "country": "Myanmar", + "states": {} + }, + "NA": { + "country": "Namibia", + "states": { + "NA:ER": "Erongo", + "NA:HA": "Hardap", + "NA:KA": "Karas", + "NA:KE": "Kavango East", + "NA:KW": "Kavango West", + "NA:KH": "Khomas", + "NA:KU": "Kunene", + "NA:OW": "Ohangwena", + "NA:OH": "Omaheke", + "NA:OS": "Omusati", + "NA:ON": "Oshana", + "NA:OT": "Oshikoto", + "NA:OD": "Otjozondjupa", + "NA:CA": "Zambezi" + } + }, + "NR": { + "country": "Nauru", + "states": {} + }, + "NP": { + "country": "Nepal", + "states": { + "NP:BAG": "Bagmati", + "NP:BHE": "Bheri", + "NP:DHA": "Dhaulagiri", + "NP:GAN": "Gandaki", + "NP:JAN": "Janakpur", + "NP:KAR": "Karnali", + "NP:KOS": "Koshi", + "NP:LUM": "Lumbini", + "NP:MAH": "Mahakali", + "NP:MEC": "Mechi", + "NP:NAR": "Narayani", + "NP:RAP": "Rapti", + "NP:SAG": "Sagarmatha", + "NP:SET": "Seti" + } + }, + "NL": { + "country": "Netherlands", + "states": {} + }, + "NC": { + "country": "New Caledonia", + "states": {} + }, + "NZ": { + "country": "New Zealand", + "states": { + "NZ:NL": "Northland", + "NZ:AK": "Auckland", + "NZ:WA": "Waikato", + "NZ:BP": "Bay of Plenty", + "NZ:TK": "Taranaki", + "NZ:GI": "Gisborne", + "NZ:HB": "Hawke’s Bay", + "NZ:MW": "Manawatu-Wanganui", + "NZ:WE": "Wellington", + "NZ:NS": "Nelson", + "NZ:MB": "Marlborough", + "NZ:TM": "Tasman", + "NZ:WC": "West Coast", + "NZ:CT": "Canterbury", + "NZ:OT": "Otago", + "NZ:SL": "Southland" + } + }, + "NI": { + "country": "Nicaragua", + "states": {} + }, + "NE": { + "country": "Niger", + "states": {} + }, + "NG": { + "country": "Nigeria", + "states": { + "NG:AB": "Abia", + "NG:FC": "Abuja", + "NG:AD": "Adamawa", + "NG:AK": "Akwa Ibom", + "NG:AN": "Anambra", + "NG:BA": "Bauchi", + "NG:BY": "Bayelsa", + "NG:BE": "Benue", + "NG:BO": "Borno", + "NG:CR": "Cross River", + "NG:DE": "Delta", + "NG:EB": "Ebonyi", + "NG:ED": "Edo", + "NG:EK": "Ekiti", + "NG:EN": "Enugu", + "NG:GO": "Gombe", + "NG:IM": "Imo", + "NG:JI": "Jigawa", + "NG:KD": "Kaduna", + "NG:KN": "Kano", + "NG:KT": "Katsina", + "NG:KE": "Kebbi", + "NG:KO": "Kogi", + "NG:KW": "Kwara", + "NG:LA": "Lagos", + "NG:NA": "Nasarawa", + "NG:NI": "Niger", + "NG:OG": "Ogun", + "NG:ON": "Ondo", + "NG:OS": "Osun", + "NG:OY": "Oyo", + "NG:PL": "Plateau", + "NG:RI": "Rivers", + "NG:SO": "Sokoto", + "NG:TA": "Taraba", + "NG:YO": "Yobe", + "NG:ZA": "Zamfara" + } + }, + "NU": { + "country": "Niue", + "states": {} + }, + "NF": { + "country": "Norfolk Island", + "states": {} + }, + "KP": { + "country": "North Korea", + "states": {} + }, + "MK": { + "country": "North Macedonia", + "states": {} + }, + "MP": { + "country": "Northern Mariana Islands", + "states": {} + }, + "NO": { + "country": "Norway", + "states": {} + }, + "OM": { + "country": "Oman", + "states": {} + }, + "PK": { + "country": "Pakistan", + "states": { + "PK:JK": "Azad Kashmir", + "PK:BA": "Balochistan", + "PK:TA": "FATA", + "PK:GB": "Gilgit Baltistan", + "PK:IS": "Islamabad Capital Territory", + "PK:KP": "Khyber Pakhtunkhwa", + "PK:PB": "Punjab", + "PK:SD": "Sindh" + } + }, + "PS": { + "country": "Palestinian Territory", + "states": {} + }, + "PA": { + "country": "Panama", + "states": {} + }, + "PG": { + "country": "Papua New Guinea", + "states": {} + }, + "PY": { + "country": "Paraguay", + "states": { + "PY:PY-ASU": "Asunción", + "PY:PY-1": "Concepción", + "PY:PY-2": "San Pedro", + "PY:PY-3": "Cordillera", + "PY:PY-4": "Guairá", + "PY:PY-5": "Caaguazú", + "PY:PY-6": "Caazapá", + "PY:PY-7": "Itapúa", + "PY:PY-8": "Misiones", + "PY:PY-9": "Paraguarí", + "PY:PY-10": "Alto Paraná", + "PY:PY-11": "Central", + "PY:PY-12": "Ñeembucú", + "PY:PY-13": "Amambay", + "PY:PY-14": "Canindeyú", + "PY:PY-15": "Presidente Hayes", + "PY:PY-16": "Alto Paraguay", + "PY:PY-17": "Boquerón" + } + }, + "PE": { + "country": "Peru", + "states": { + "PE:CAL": "El Callao", + "PE:LMA": "Municipalidad Metropolitana de Lima", + "PE:AMA": "Amazonas", + "PE:ANC": "Ancash", + "PE:APU": "Apurímac", + "PE:ARE": "Arequipa", + "PE:AYA": "Ayacucho", + "PE:CAJ": "Cajamarca", + "PE:CUS": "Cusco", + "PE:HUV": "Huancavelica", + "PE:HUC": "Huánuco", + "PE:ICA": "Ica", + "PE:JUN": "Junín", + "PE:LAL": "La Libertad", + "PE:LAM": "Lambayeque", + "PE:LIM": "Lima", + "PE:LOR": "Loreto", + "PE:MDD": "Madre de Dios", + "PE:MOQ": "Moquegua", + "PE:PAS": "Pasco", + "PE:PIU": "Piura", + "PE:PUN": "Puno", + "PE:SAM": "San Martín", + "PE:TAC": "Tacna", + "PE:TUM": "Tumbes", + "PE:UCA": "Ucayali" + } + }, + "PH": { + "country": "Philippines", + "states": { + "PH:ABR": "Abra", + "PH:AGN": "Agusan del Norte", + "PH:AGS": "Agusan del Sur", + "PH:AKL": "Aklan", + "PH:ALB": "Albay", + "PH:ANT": "Antique", + "PH:APA": "Apayao", + "PH:AUR": "Aurora", + "PH:BAS": "Basilan", + "PH:BAN": "Bataan", + "PH:BTN": "Batanes", + "PH:BTG": "Batangas", + "PH:BEN": "Benguet", + "PH:BIL": "Biliran", + "PH:BOH": "Bohol", + "PH:BUK": "Bukidnon", + "PH:BUL": "Bulacan", + "PH:CAG": "Cagayan", + "PH:CAN": "Camarines Norte", + "PH:CAS": "Camarines Sur", + "PH:CAM": "Camiguin", + "PH:CAP": "Capiz", + "PH:CAT": "Catanduanes", + "PH:CAV": "Cavite", + "PH:CEB": "Cebu", + "PH:COM": "Compostela Valley", + "PH:NCO": "Cotabato", + "PH:DAV": "Davao del Norte", + "PH:DAS": "Davao del Sur", + "PH:DAC": "Davao Occidental", + "PH:DAO": "Davao Oriental", + "PH:DIN": "Dinagat Islands", + "PH:EAS": "Eastern Samar", + "PH:GUI": "Guimaras", + "PH:IFU": "Ifugao", + "PH:ILN": "Ilocos Norte", + "PH:ILS": "Ilocos Sur", + "PH:ILI": "Iloilo", + "PH:ISA": "Isabela", + "PH:KAL": "Kalinga", + "PH:LUN": "La Union", + "PH:LAG": "Laguna", + "PH:LAN": "Lanao del Norte", + "PH:LAS": "Lanao del Sur", + "PH:LEY": "Leyte", + "PH:MAG": "Maguindanao", + "PH:MAD": "Marinduque", + "PH:MAS": "Masbate", + "PH:MSC": "Misamis Occidental", + "PH:MSR": "Misamis Oriental", + "PH:MOU": "Mountain Province", + "PH:NEC": "Negros Occidental", + "PH:NER": "Negros Oriental", + "PH:NSA": "Northern Samar", + "PH:NUE": "Nueva Ecija", + "PH:NUV": "Nueva Vizcaya", + "PH:MDC": "Occidental Mindoro", + "PH:MDR": "Oriental Mindoro", + "PH:PLW": "Palawan", + "PH:PAM": "Pampanga", + "PH:PAN": "Pangasinan", + "PH:QUE": "Quezon", + "PH:QUI": "Quirino", + "PH:RIZ": "Rizal", + "PH:ROM": "Romblon", + "PH:WSA": "Samar", + "PH:SAR": "Sarangani", + "PH:SIQ": "Siquijor", + "PH:SOR": "Sorsogon", + "PH:SCO": "South Cotabato", + "PH:SLE": "Southern Leyte", + "PH:SUK": "Sultan Kudarat", + "PH:SLU": "Sulu", + "PH:SUN": "Surigao del Norte", + "PH:SUR": "Surigao del Sur", + "PH:TAR": "Tarlac", + "PH:TAW": "Tawi-Tawi", + "PH:ZMB": "Zambales", + "PH:ZAN": "Zamboanga del Norte", + "PH:ZAS": "Zamboanga del Sur", + "PH:ZSI": "Zamboanga Sibugay", + "PH:00": "Metro Manila" + } + }, + "PN": { + "country": "Pitcairn", + "states": {} + }, + "PL": { + "country": "Poland", + "states": {} + }, + "PT": { + "country": "Portugal", + "states": {} + }, + "PR": { + "country": "Puerto Rico", + "states": {} + }, + "QA": { + "country": "Qatar", + "states": {} + }, + "RE": { + "country": "Reunion", + "states": {} + }, + "RO": { + "country": "Romania", + "states": { + "RO:AB": "Alba", + "RO:AR": "Arad", + "RO:AG": "Argeș", + "RO:BC": "Bacău", + "RO:BH": "Bihor", + "RO:BN": "Bistrița-Năsăud", + "RO:BT": "Botoșani", + "RO:BR": "Brăila", + "RO:BV": "Brașov", + "RO:B": "București", + "RO:BZ": "Buzău", + "RO:CL": "Călărași", + "RO:CS": "Caraș-Severin", + "RO:CJ": "Cluj", + "RO:CT": "Constanța", + "RO:CV": "Covasna", + "RO:DB": "Dâmbovița", + "RO:DJ": "Dolj", + "RO:GL": "Galați", + "RO:GR": "Giurgiu", + "RO:GJ": "Gorj", + "RO:HR": "Harghita", + "RO:HD": "Hunedoara", + "RO:IL": "Ialomița", + "RO:IS": "Iași", + "RO:IF": "Ilfov", + "RO:MM": "Maramureș", + "RO:MH": "Mehedinți", + "RO:MS": "Mureș", + "RO:NT": "Neamț", + "RO:OT": "Olt", + "RO:PH": "Prahova", + "RO:SJ": "Sălaj", + "RO:SM": "Satu Mare", + "RO:SB": "Sibiu", + "RO:SV": "Suceava", + "RO:TR": "Teleorman", + "RO:TM": "Timiș", + "RO:TL": "Tulcea", + "RO:VL": "Vâlcea", + "RO:VS": "Vaslui", + "RO:VN": "Vrancea" + } + }, + "RU": { + "country": "Russia", + "states": {} + }, + "RW": { + "country": "Rwanda", + "states": {} + }, + "ST": { + "country": "São Tomé and Príncipe", + "states": {} + }, + "BL": { + "country": "Saint Barthélemy", + "states": {} + }, + "SH": { + "country": "Saint Helena", + "states": {} + }, + "KN": { + "country": "Saint Kitts and Nevis", + "states": {} + }, + "LC": { + "country": "Saint Lucia", + "states": {} + }, + "SX": { + "country": "Saint Martin (Dutch part)", + "states": {} + }, + "MF": { + "country": "Saint Martin (French part)", + "states": {} + }, + "PM": { + "country": "Saint Pierre and Miquelon", + "states": {} + }, + "VC": { + "country": "Saint Vincent and the Grenadines", + "states": {} + }, + "WS": { + "country": "Samoa", + "states": {} + }, + "SM": { + "country": "San Marino", + "states": {} + }, + "SA": { + "country": "Saudi Arabia", + "states": {} + }, + "SN": { + "country": "Senegal", + "states": {} + }, + "RS": { + "country": "Serbia", + "states": { + "RS:RS00": "Belgrade", + "RS:RS14": "Bor", + "RS:RS11": "Braničevo", + "RS:RS02": "Central Banat", + "RS:RS10": "Danube", + "RS:RS23": "Jablanica", + "RS:RS09": "Kolubara", + "RS:RS08": "Mačva", + "RS:RS17": "Morava", + "RS:RS20": "Nišava", + "RS:RS01": "North Bačka", + "RS:RS03": "North Banat", + "RS:RS24": "Pčinja", + "RS:RS22": "Pirot", + "RS:RS13": "Pomoravlje", + "RS:RS19": "Rasina", + "RS:RS18": "Raška", + "RS:RS06": "South Bačka", + "RS:RS04": "South Banat", + "RS:RS07": "Srem", + "RS:RS12": "Šumadija", + "RS:RS21": "Toplica", + "RS:RS05": "West Bačka", + "RS:RS15": "Zaječar", + "RS:RS16": "Zlatibor", + "RS:RS25": "Kosovo", + "RS:RS26": "Peć", + "RS:RS27": "Prizren", + "RS:RS28": "Kosovska Mitrovica", + "RS:RS29": "Kosovo-Pomoravlje", + "RS:RSKM": "Kosovo-Metohija", + "RS:RSVO": "Vojvodina" + } + }, + "SC": { + "country": "Seychelles", + "states": {} + }, + "SL": { + "country": "Sierra Leone", + "states": {} + }, + "SG": { + "country": "Singapore", + "states": {} + }, + "SK": { + "country": "Slovakia", + "states": {} + }, + "SI": { + "country": "Slovenia", + "states": {} + }, + "SB": { + "country": "Solomon Islands", + "states": {} + }, + "SO": { + "country": "Somalia", + "states": {} + }, + "ZA": { + "country": "South Africa", + "states": { + "ZA:EC": "Eastern Cape", + "ZA:FS": "Free State", + "ZA:GP": "Gauteng", + "ZA:KZN": "KwaZulu-Natal", + "ZA:LP": "Limpopo", + "ZA:MP": "Mpumalanga", + "ZA:NC": "Northern Cape", + "ZA:NW": "North West", + "ZA:WC": "Western Cape" + } + }, + "GS": { + "country": "South Georgia/Sandwich Islands", + "states": {} + }, + "KR": { + "country": "South Korea", + "states": {} + }, + "SS": { + "country": "South Sudan", + "states": {} + }, + "ES": { + "country": "Spain", + "states": { + "ES:C": "A Coruña", + "ES:VI": "Araba/Álava", + "ES:AB": "Albacete", + "ES:A": "Alicante", + "ES:AL": "Almería", + "ES:O": "Asturias", + "ES:AV": "Ávila", + "ES:BA": "Badajoz", + "ES:PM": "Baleares", + "ES:B": "Barcelona", + "ES:BU": "Burgos", + "ES:CC": "Cáceres", + "ES:CA": "Cádiz", + "ES:S": "Cantabria", + "ES:CS": "Castellón", + "ES:CE": "Ceuta", + "ES:CR": "Ciudad Real", + "ES:CO": "Córdoba", + "ES:CU": "Cuenca", + "ES:GI": "Girona", + "ES:GR": "Granada", + "ES:GU": "Guadalajara", + "ES:SS": "Gipuzkoa", + "ES:H": "Huelva", + "ES:HU": "Huesca", + "ES:J": "Jaén", + "ES:LO": "La Rioja", + "ES:GC": "Las Palmas", + "ES:LE": "León", + "ES:L": "Lleida", + "ES:LU": "Lugo", + "ES:M": "Madrid", + "ES:MA": "Málaga", + "ES:ML": "Melilla", + "ES:MU": "Murcia", + "ES:NA": "Navarra", + "ES:OR": "Ourense", + "ES:P": "Palencia", + "ES:PO": "Pontevedra", + "ES:SA": "Salamanca", + "ES:TF": "Santa Cruz de Tenerife", + "ES:SG": "Segovia", + "ES:SE": "Sevilla", + "ES:SO": "Soria", + "ES:T": "Tarragona", + "ES:TE": "Teruel", + "ES:TO": "Toledo", + "ES:V": "Valencia", + "ES:VA": "Valladolid", + "ES:BI": "Biscay", + "ES:ZA": "Zamora", + "ES:Z": "Zaragoza" + } + }, + "LK": { + "country": "Sri Lanka", + "states": {} + }, + "SD": { + "country": "Sudan", + "states": {} + }, + "SR": { + "country": "Suriname", + "states": {} + }, + "SJ": { + "country": "Svalbard and Jan Mayen", + "states": {} + }, + "SZ": { + "country": "Swaziland", + "states": {} + }, + "SE": { + "country": "Sweden", + "states": {} + }, + "CH": { + "country": "Switzerland", + "states": { + "CH:AG": "Aargau", + "CH:AR": "Appenzell Ausserrhoden", + "CH:AI": "Appenzell Innerrhoden", + "CH:BL": "Basel-Landschaft", + "CH:BS": "Basel-Stadt", + "CH:BE": "Bern", + "CH:FR": "Fribourg", + "CH:GE": "Geneva", + "CH:GL": "Glarus", + "CH:GR": "Graubünden", + "CH:JU": "Jura", + "CH:LU": "Luzern", + "CH:NE": "Neuchâtel", + "CH:NW": "Nidwalden", + "CH:OW": "Obwalden", + "CH:SH": "Schaffhausen", + "CH:SZ": "Schwyz", + "CH:SO": "Solothurn", + "CH:SG": "St. Gallen", + "CH:TG": "Thurgau", + "CH:TI": "Ticino", + "CH:UR": "Uri", + "CH:VS": "Valais", + "CH:VD": "Vaud", + "CH:ZG": "Zug", + "CH:ZH": "Zürich" + } + }, + "SY": { + "country": "Syria", + "states": {} + }, + "TW": { + "country": "Taiwan", + "states": {} + }, + "TJ": { + "country": "Tajikistan", + "states": {} + }, + "TZ": { + "country": "Tanzania", + "states": { + "TZ:TZ01": "Arusha", + "TZ:TZ02": "Dar es Salaam", + "TZ:TZ03": "Dodoma", + "TZ:TZ04": "Iringa", + "TZ:TZ05": "Kagera", + "TZ:TZ06": "Pemba North", + "TZ:TZ07": "Zanzibar North", + "TZ:TZ08": "Kigoma", + "TZ:TZ09": "Kilimanjaro", + "TZ:TZ10": "Pemba South", + "TZ:TZ11": "Zanzibar South", + "TZ:TZ12": "Lindi", + "TZ:TZ13": "Mara", + "TZ:TZ14": "Mbeya", + "TZ:TZ15": "Zanzibar West", + "TZ:TZ16": "Morogoro", + "TZ:TZ17": "Mtwara", + "TZ:TZ18": "Mwanza", + "TZ:TZ19": "Coast", + "TZ:TZ20": "Rukwa", + "TZ:TZ21": "Ruvuma", + "TZ:TZ22": "Shinyanga", + "TZ:TZ23": "Singida", + "TZ:TZ24": "Tabora", + "TZ:TZ25": "Tanga", + "TZ:TZ26": "Manyara", + "TZ:TZ27": "Geita", + "TZ:TZ28": "Katavi", + "TZ:TZ29": "Njombe", + "TZ:TZ30": "Simiyu" + } + }, + "TH": { + "country": "Thailand", + "states": { + "TH:TH-37": "Amnat Charoen", + "TH:TH-15": "Ang Thong", + "TH:TH-14": "Ayutthaya", + "TH:TH-10": "Bangkok", + "TH:TH-38": "Bueng Kan", + "TH:TH-31": "Buri Ram", + "TH:TH-24": "Chachoengsao", + "TH:TH-18": "Chai Nat", + "TH:TH-36": "Chaiyaphum", + "TH:TH-22": "Chanthaburi", + "TH:TH-50": "Chiang Mai", + "TH:TH-57": "Chiang Rai", + "TH:TH-20": "Chonburi", + "TH:TH-86": "Chumphon", + "TH:TH-46": "Kalasin", + "TH:TH-62": "Kamphaeng Phet", + "TH:TH-71": "Kanchanaburi", + "TH:TH-40": "Khon Kaen", + "TH:TH-81": "Krabi", + "TH:TH-52": "Lampang", + "TH:TH-51": "Lamphun", + "TH:TH-42": "Loei", + "TH:TH-16": "Lopburi", + "TH:TH-58": "Mae Hong Son", + "TH:TH-44": "Maha Sarakham", + "TH:TH-49": "Mukdahan", + "TH:TH-26": "Nakhon Nayok", + "TH:TH-73": "Nakhon Pathom", + "TH:TH-48": "Nakhon Phanom", + "TH:TH-30": "Nakhon Ratchasima", + "TH:TH-60": "Nakhon Sawan", + "TH:TH-80": "Nakhon Si Thammarat", + "TH:TH-55": "Nan", + "TH:TH-96": "Narathiwat", + "TH:TH-39": "Nong Bua Lam Phu", + "TH:TH-43": "Nong Khai", + "TH:TH-12": "Nonthaburi", + "TH:TH-13": "Pathum Thani", + "TH:TH-94": "Pattani", + "TH:TH-82": "Phang Nga", + "TH:TH-93": "Phatthalung", + "TH:TH-56": "Phayao", + "TH:TH-67": "Phetchabun", + "TH:TH-76": "Phetchaburi", + "TH:TH-66": "Phichit", + "TH:TH-65": "Phitsanulok", + "TH:TH-54": "Phrae", + "TH:TH-83": "Phuket", + "TH:TH-25": "Prachin Buri", + "TH:TH-77": "Prachuap Khiri Khan", + "TH:TH-85": "Ranong", + "TH:TH-70": "Ratchaburi", + "TH:TH-21": "Rayong", + "TH:TH-45": "Roi Et", + "TH:TH-27": "Sa Kaeo", + "TH:TH-47": "Sakon Nakhon", + "TH:TH-11": "Samut Prakan", + "TH:TH-74": "Samut Sakhon", + "TH:TH-75": "Samut Songkhram", + "TH:TH-19": "Saraburi", + "TH:TH-91": "Satun", + "TH:TH-17": "Sing Buri", + "TH:TH-33": "Sisaket", + "TH:TH-90": "Songkhla", + "TH:TH-64": "Sukhothai", + "TH:TH-72": "Suphan Buri", + "TH:TH-84": "Surat Thani", + "TH:TH-32": "Surin", + "TH:TH-63": "Tak", + "TH:TH-92": "Trang", + "TH:TH-23": "Trat", + "TH:TH-34": "Ubon Ratchathani", + "TH:TH-41": "Udon Thani", + "TH:TH-61": "Uthai Thani", + "TH:TH-53": "Uttaradit", + "TH:TH-95": "Yala", + "TH:TH-35": "Yasothon" + } + }, + "TL": { + "country": "Timor-Leste", + "states": {} + }, + "TG": { + "country": "Togo", + "states": {} + }, + "TK": { + "country": "Tokelau", + "states": {} + }, + "TO": { + "country": "Tonga", + "states": {} + }, + "TT": { + "country": "Trinidad and Tobago", + "states": {} + }, + "TN": { + "country": "Tunisia", + "states": {} + }, + "TR": { + "country": "Turkey", + "states": { + "TR:TR01": "Adana", + "TR:TR02": "Adıyaman", + "TR:TR03": "Afyon", + "TR:TR04": "Ağrı", + "TR:TR05": "Amasya", + "TR:TR06": "Ankara", + "TR:TR07": "Antalya", + "TR:TR08": "Artvin", + "TR:TR09": "Aydın", + "TR:TR10": "Balıkesir", + "TR:TR11": "Bilecik", + "TR:TR12": "Bingöl", + "TR:TR13": "Bitlis", + "TR:TR14": "Bolu", + "TR:TR15": "Burdur", + "TR:TR16": "Bursa", + "TR:TR17": "Çanakkale", + "TR:TR18": "Çankırı", + "TR:TR19": "Çorum", + "TR:TR20": "Denizli", + "TR:TR21": "Diyarbakır", + "TR:TR22": "Edirne", + "TR:TR23": "Elazığ", + "TR:TR24": "Erzincan", + "TR:TR25": "Erzurum", + "TR:TR26": "Eskişehir", + "TR:TR27": "Gaziantep", + "TR:TR28": "Giresun", + "TR:TR29": "Gümüşhane", + "TR:TR30": "Hakkari", + "TR:TR31": "Hatay", + "TR:TR32": "Isparta", + "TR:TR33": "İçel", + "TR:TR34": "İstanbul", + "TR:TR35": "İzmir", + "TR:TR36": "Kars", + "TR:TR37": "Kastamonu", + "TR:TR38": "Kayseri", + "TR:TR39": "Kırklareli", + "TR:TR40": "Kırşehir", + "TR:TR41": "Kocaeli", + "TR:TR42": "Konya", + "TR:TR43": "Kütahya", + "TR:TR44": "Malatya", + "TR:TR45": "Manisa", + "TR:TR46": "Kahramanmaraş", + "TR:TR47": "Mardin", + "TR:TR48": "Muğla", + "TR:TR49": "Muş", + "TR:TR50": "Nevşehir", + "TR:TR51": "Niğde", + "TR:TR52": "Ordu", + "TR:TR53": "Rize", + "TR:TR54": "Sakarya", + "TR:TR55": "Samsun", + "TR:TR56": "Siirt", + "TR:TR57": "Sinop", + "TR:TR58": "Sivas", + "TR:TR59": "Tekirdağ", + "TR:TR60": "Tokat", + "TR:TR61": "Trabzon", + "TR:TR62": "Tunceli", + "TR:TR63": "Şanlıurfa", + "TR:TR64": "Uşak", + "TR:TR65": "Van", + "TR:TR66": "Yozgat", + "TR:TR67": "Zonguldak", + "TR:TR68": "Aksaray", + "TR:TR69": "Bayburt", + "TR:TR70": "Karaman", + "TR:TR71": "Kırıkkale", + "TR:TR72": "Batman", + "TR:TR73": "Şırnak", + "TR:TR74": "Bartın", + "TR:TR75": "Ardahan", + "TR:TR76": "Iğdır", + "TR:TR77": "Yalova", + "TR:TR78": "Karabük", + "TR:TR79": "Kilis", + "TR:TR80": "Osmaniye", + "TR:TR81": "Düzce" + } + }, + "TM": { + "country": "Turkmenistan", + "states": {} + }, + "TC": { + "country": "Turks and Caicos Islands", + "states": {} + }, + "TV": { + "country": "Tuvalu", + "states": {} + }, + "UG": { + "country": "Uganda", + "states": { + "UG:UG314": "Abim", + "UG:UG301": "Adjumani", + "UG:UG322": "Agago", + "UG:UG323": "Alebtong", + "UG:UG315": "Amolatar", + "UG:UG324": "Amudat", + "UG:UG216": "Amuria", + "UG:UG316": "Amuru", + "UG:UG302": "Apac", + "UG:UG303": "Arua", + "UG:UG217": "Budaka", + "UG:UG218": "Bududa", + "UG:UG201": "Bugiri", + "UG:UG235": "Bugweri", + "UG:UG420": "Buhweju", + "UG:UG117": "Buikwe", + "UG:UG219": "Bukedea", + "UG:UG118": "Bukomansimbi", + "UG:UG220": "Bukwa", + "UG:UG225": "Bulambuli", + "UG:UG416": "Buliisa", + "UG:UG401": "Bundibugyo", + "UG:UG430": "Bunyangabu", + "UG:UG402": "Bushenyi", + "UG:UG202": "Busia", + "UG:UG221": "Butaleja", + "UG:UG119": "Butambala", + "UG:UG233": "Butebo", + "UG:UG120": "Buvuma", + "UG:UG226": "Buyende", + "UG:UG317": "Dokolo", + "UG:UG121": "Gomba", + "UG:UG304": "Gulu", + "UG:UG403": "Hoima", + "UG:UG417": "Ibanda", + "UG:UG203": "Iganga", + "UG:UG418": "Isingiro", + "UG:UG204": "Jinja", + "UG:UG318": "Kaabong", + "UG:UG404": "Kabale", + "UG:UG405": "Kabarole", + "UG:UG213": "Kaberamaido", + "UG:UG427": "Kagadi", + "UG:UG428": "Kakumiro", + "UG:UG101": "Kalangala", + "UG:UG222": "Kaliro", + "UG:UG122": "Kalungu", + "UG:UG102": "Kampala", + "UG:UG205": "Kamuli", + "UG:UG413": "Kamwenge", + "UG:UG414": "Kanungu", + "UG:UG206": "Kapchorwa", + "UG:UG236": "Kapelebyong", + "UG:UG126": "Kasanda", + "UG:UG406": "Kasese", + "UG:UG207": "Katakwi", + "UG:UG112": "Kayunga", + "UG:UG407": "Kibaale", + "UG:UG103": "Kiboga", + "UG:UG227": "Kibuku", + "UG:UG432": "Kikuube", + "UG:UG419": "Kiruhura", + "UG:UG421": "Kiryandongo", + "UG:UG408": "Kisoro", + "UG:UG305": "Kitgum", + "UG:UG319": "Koboko", + "UG:UG325": "Kole", + "UG:UG306": "Kotido", + "UG:UG208": "Kumi", + "UG:UG333": "Kwania", + "UG:UG228": "Kween", + "UG:UG123": "Kyankwanzi", + "UG:UG422": "Kyegegwa", + "UG:UG415": "Kyenjojo", + "UG:UG125": "Kyotera", + "UG:UG326": "Lamwo", + "UG:UG307": "Lira", + "UG:UG229": "Luuka", + "UG:UG104": "Luwero", + "UG:UG124": "Lwengo", + "UG:UG114": "Lyantonde", + "UG:UG223": "Manafwa", + "UG:UG320": "Maracha", + "UG:UG105": "Masaka", + "UG:UG409": "Masindi", + "UG:UG214": "Mayuge", + "UG:UG209": "Mbale", + "UG:UG410": "Mbarara", + "UG:UG423": "Mitooma", + "UG:UG115": "Mityana", + "UG:UG308": "Moroto", + "UG:UG309": "Moyo", + "UG:UG106": "Mpigi", + "UG:UG107": "Mubende", + "UG:UG108": "Mukono", + "UG:UG334": "Nabilatuk", + "UG:UG311": "Nakapiripirit", + "UG:UG116": "Nakaseke", + "UG:UG109": "Nakasongola", + "UG:UG230": "Namayingo", + "UG:UG234": "Namisindwa", + "UG:UG224": "Namutumba", + "UG:UG327": "Napak", + "UG:UG310": "Nebbi", + "UG:UG231": "Ngora", + "UG:UG424": "Ntoroko", + "UG:UG411": "Ntungamo", + "UG:UG328": "Nwoya", + "UG:UG331": "Omoro", + "UG:UG329": "Otuke", + "UG:UG321": "Oyam", + "UG:UG312": "Pader", + "UG:UG332": "Pakwach", + "UG:UG210": "Pallisa", + "UG:UG110": "Rakai", + "UG:UG429": "Rubanda", + "UG:UG425": "Rubirizi", + "UG:UG431": "Rukiga", + "UG:UG412": "Rukungiri", + "UG:UG111": "Sembabule", + "UG:UG232": "Serere", + "UG:UG426": "Sheema", + "UG:UG215": "Sironko", + "UG:UG211": "Soroti", + "UG:UG212": "Tororo", + "UG:UG113": "Wakiso", + "UG:UG313": "Yumbe", + "UG:UG330": "Zombo" + } + }, + "UA": { + "country": "Ukraine", + "states": {} + }, + "AE": { + "country": "United Arab Emirates", + "states": {} + }, + "GB": { + "country": "United Kingdom (UK)", + "states": {} + }, + "US": { + "country": "United States (US)", + "states": { + "US:AL": "Alabama", + "US:AK": "Alaska", + "US:AZ": "Arizona", + "US:AR": "Arkansas", + "US:CA": "California", + "US:CO": "Colorado", + "US:CT": "Connecticut", + "US:DE": "Delaware", + "US:DC": "District Of Columbia", + "US:FL": "Florida", + "US:GA": "Georgia", + "US:HI": "Hawaii", + "US:ID": "Idaho", + "US:IL": "Illinois", + "US:IN": "Indiana", + "US:IA": "Iowa", + "US:KS": "Kansas", + "US:KY": "Kentucky", + "US:LA": "Louisiana", + "US:ME": "Maine", + "US:MD": "Maryland", + "US:MA": "Massachusetts", + "US:MI": "Michigan", + "US:MN": "Minnesota", + "US:MS": "Mississippi", + "US:MO": "Missouri", + "US:MT": "Montana", + "US:NE": "Nebraska", + "US:NV": "Nevada", + "US:NH": "New Hampshire", + "US:NJ": "New Jersey", + "US:NM": "New Mexico", + "US:NY": "New York", + "US:NC": "North Carolina", + "US:ND": "North Dakota", + "US:OH": "Ohio", + "US:OK": "Oklahoma", + "US:OR": "Oregon", + "US:PA": "Pennsylvania", + "US:RI": "Rhode Island", + "US:SC": "South Carolina", + "US:SD": "South Dakota", + "US:TN": "Tennessee", + "US:TX": "Texas", + "US:UT": "Utah", + "US:VT": "Vermont", + "US:VA": "Virginia", + "US:WA": "Washington", + "US:WV": "West Virginia", + "US:WI": "Wisconsin", + "US:WY": "Wyoming", + "US:AA": "Armed Forces (AA)", + "US:AE": "Armed Forces (AE)", + "US:AP": "Armed Forces (AP)" + } + }, + "UM": { + "country": "United States (US) Minor Outlying Islands", + "states": { + "UM:81": "Baker Island", + "UM:84": "Howland Island", + "UM:86": "Jarvis Island", + "UM:67": "Johnston Atoll", + "UM:89": "Kingman Reef", + "UM:71": "Midway Atoll", + "UM:76": "Navassa Island", + "UM:95": "Palmyra Atoll", + "UM:79": "Wake Island" + } + }, + "UY": { + "country": "Uruguay", + "states": {} + }, + "UZ": { + "country": "Uzbekistan", + "states": {} + }, + "VU": { + "country": "Vanuatu", + "states": {} + }, + "VA": { + "country": "Vatican", + "states": {} + }, + "VE": { + "country": "Venezuela", + "states": {} + }, + "VN": { + "country": "Vietnam", + "states": {} + }, + "VG": { + "country": "Virgin Islands (British)", + "states": {} + }, + "VI": { + "country": "Virgin Islands (US)", + "states": {} + }, + "WF": { + "country": "Wallis and Futuna", + "states": {} + }, + "EH": { + "country": "Western Sahara", + "states": {} + }, + "YE": { + "country": "Yemen", + "states": {} + }, + "ZM": { + "country": "Zambia", + "states": { + "ZM:ZM-01": "Western", + "ZM:ZM-02": "Central", + "ZM:ZM-03": "Eastern", + "ZM:ZM-04": "Luapula", + "ZM:ZM-05": "Northern", + "ZM:ZM-06": "North-Western", + "ZM:ZM-07": "Southern", + "ZM:ZM-08": "Copperbelt", + "ZM:ZM-09": "Lusaka", + "ZM:ZM-10": "Muchinga" + } + }, + "ZW": { + "country": "Zimbabwe", + "states": {} + } +} \ No newline at end of file diff --git a/LabelStoreMax/lang/de.json b/LabelStoreMax/lang/de.json index 0a20ad1..cf2dbab 100644 --- a/LabelStoreMax/lang/de.json +++ b/LabelStoreMax/lang/de.json @@ -171,5 +171,6 @@ "No more orders": "Keine Bestellungen mehr", "Account updated": "Konto aktualisiert", "Spend a minimum of": "Geben Sie mindestens ein", - "for": "zum" + "for": "zum", + "Buy Product": "Produkt kaufen" } \ No newline at end of file diff --git a/LabelStoreMax/lang/en.json b/LabelStoreMax/lang/en.json index 792a1d0..76c2249 100644 --- a/LabelStoreMax/lang/en.json +++ b/LabelStoreMax/lang/en.json @@ -171,5 +171,6 @@ "No more orders": "No more orders", "Account updated": "Account updated", "Spend a minimum of": "Spend a minimum of", - "for": "for" + "for": "for", + "Buy Product": "Buy Product" } \ No newline at end of file diff --git a/LabelStoreMax/lang/es.json b/LabelStoreMax/lang/es.json index f47aa6b..fd06f5b 100644 --- a/LabelStoreMax/lang/es.json +++ b/LabelStoreMax/lang/es.json @@ -171,5 +171,6 @@ "No more orders": "No mas pedidos", "Account updated": "Cuenta actualizada", "Spend a minimum of": "Gasta un mínimo de", - "for": "para" + "for": "para", + "Buy Product": "Comprar producto" } \ No newline at end of file diff --git a/LabelStoreMax/lang/fr.json b/LabelStoreMax/lang/fr.json index ec4c248..351a445 100644 --- a/LabelStoreMax/lang/fr.json +++ b/LabelStoreMax/lang/fr.json @@ -171,5 +171,6 @@ "No more orders": "Plus de commandes", "Account updated": "Compte mis à jour", "Spend a minimum of": "Dépensez un minimum de", - "for": "pour" + "for": "pour", + "Buy Product": "Acheter un produit" } \ No newline at end of file diff --git a/LabelStoreMax/lang/hi.json b/LabelStoreMax/lang/hi.json index 45350cb..f981092 100644 --- a/LabelStoreMax/lang/hi.json +++ b/LabelStoreMax/lang/hi.json @@ -171,5 +171,6 @@ "No more orders": "aur koee aadesh nahin", "Account updated": "khaata apadet kiya gaya", "Spend a minimum of": "kam se kam kharch karen", - "for": "ke liye" + "for": "ke liye", + "Buy Product": "utpaad khareeden" } \ No newline at end of file diff --git a/LabelStoreMax/lang/it.json b/LabelStoreMax/lang/it.json index 8a4091d..768bfeb 100644 --- a/LabelStoreMax/lang/it.json +++ b/LabelStoreMax/lang/it.json @@ -171,5 +171,6 @@ "No more orders": "Niente più ordini", "Account updated": "Account aggiornato", "Spend a minimum of": "Spendi un minimo di", - "for": "per" + "for": "per", + "Buy Product": "Acquista prodotto" } \ No newline at end of file diff --git a/LabelStoreMax/lang/pt.json b/LabelStoreMax/lang/pt.json index 9075bea..6cc09fa 100644 --- a/LabelStoreMax/lang/pt.json +++ b/LabelStoreMax/lang/pt.json @@ -171,5 +171,6 @@ "No more orders": "Não há mais pedidos", "Account updated": "Conta atualizada", "Spend a minimum of": "Gaste um mínimo de", - "for": "para" + "for": "para", + "Buy Product": "Comprar Produto" } \ No newline at end of file diff --git a/LabelStoreMax/lib/app_country_options.dart b/LabelStoreMax/lib/app_country_options.dart deleted file mode 100644 index ca7803b..0000000 --- a/LabelStoreMax/lib/app_country_options.dart +++ /dev/null @@ -1,257 +0,0 @@ -// Label StoreMAX -// -// Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. -// - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -// COUNTRY OPTIONS - -var appCountryOptions = [ - {"name": "United Kingdom", "code": "GB"}, - {"name": "United States", "code": "US"}, - {"name": "Afghanistan", "code": "AF"}, - {"name": "Åland Islands", "code": "AX"}, - {"name": "Albania", "code": "AL"}, - {"name": "Algeria", "code": "DZ"}, - {"name": "American Samoa", "code": "AS"}, - {"name": "AndorrA", "code": "AD"}, - {"name": "Angola", "code": "AO"}, - {"name": "Anguilla", "code": "AI"}, - {"name": "Antarctica", "code": "AQ"}, - {"name": "Antigua and Barbuda", "code": "AG"}, - {"name": "Argentina", "code": "AR"}, - {"name": "Armenia", "code": "AM"}, - {"name": "Aruba", "code": "AW"}, - {"name": "Australia", "code": "AU"}, - {"name": "Austria", "code": "AT"}, - {"name": "Azerbaijan", "code": "AZ"}, - {"name": "Bahamas", "code": "BS"}, - {"name": "Bahrain", "code": "BH"}, - {"name": "Bangladesh", "code": "BD"}, - {"name": "Barbados", "code": "BB"}, - {"name": "Belarus", "code": "BY"}, - {"name": "Belgium", "code": "BE"}, - {"name": "Belize", "code": "BZ"}, - {"name": "Benin", "code": "BJ"}, - {"name": "Bermuda", "code": "BM"}, - {"name": "Bhutan", "code": "BT"}, - {"name": "Bolivia", "code": "BO"}, - {"name": "Bosnia and Herzegovina", "code": "BA"}, - {"name": "Botswana", "code": "BW"}, - {"name": "Bouvet Island", "code": "BV"}, - {"name": "Brazil", "code": "BR"}, - {"name": "British Indian Ocean Territory", "code": "IO"}, - {"name": "Brunei Darussalam", "code": "BN"}, - {"name": "Bulgaria", "code": "BG"}, - {"name": "Burkina Faso", "code": "BF"}, - {"name": "Burundi", "code": "BI"}, - {"name": "Cambodia", "code": "KH"}, - {"name": "Cameroon", "code": "CM"}, - {"name": "Canada", "code": "CA"}, - {"name": "Cape Verde", "code": "CV"}, - {"name": "Cayman Islands", "code": "KY"}, - {"name": "Central African Republic", "code": "CF"}, - {"name": "Chad", "code": "TD"}, - {"name": "Chile", "code": "CL"}, - {"name": "China", "code": "CN"}, - {"name": "Christmas Island", "code": "CX"}, - {"name": "Cocos (Keeling) Islands", "code": "CC"}, - {"name": "Colombia", "code": "CO"}, - {"name": "Comoros", "code": "KM"}, - {"name": "Congo", "code": "CG"}, - {"name": "Congo, The Democratic Republic of the", "code": "CD"}, - {"name": "Cook Islands", "code": "CK"}, - {"name": "Costa Rica", "code": "CR"}, - {"name": "Cote D\"Ivoire", "code": "CI"}, - {"name": "Croatia", "code": "HR"}, - {"name": "Cuba", "code": "CU"}, - {"name": "Cyprus", "code": "CY"}, - {"name": "Czech Republic", "code": "CZ"}, - {"name": "Denmark", "code": "DK"}, - {"name": "Djibouti", "code": "DJ"}, - {"name": "Dominica", "code": "DM"}, - {"name": "Dominican Republic", "code": "DO"}, - {"name": "Ecuador", "code": "EC"}, - {"name": "Egypt", "code": "EG"}, - {"name": "El Salvador", "code": "SV"}, - {"name": "Equatorial Guinea", "code": "GQ"}, - {"name": "Eritrea", "code": "ER"}, - {"name": "Estonia", "code": "EE"}, - {"name": "Ethiopia", "code": "ET"}, - {"name": "Falkland Islands (Malvinas)", "code": "FK"}, - {"name": "Faroe Islands", "code": "FO"}, - {"name": "Fiji", "code": "FJ"}, - {"name": "Finland", "code": "FI"}, - {"name": "France", "code": "FR"}, - {"name": "French Guiana", "code": "GF"}, - {"name": "French Polynesia", "code": "PF"}, - {"name": "French Southern Territories", "code": "TF"}, - {"name": "Gabon", "code": "GA"}, - {"name": "Gambia", "code": "GM"}, - {"name": "Georgia", "code": "GE"}, - {"name": "Germany", "code": "DE"}, - {"name": "Ghana", "code": "GH"}, - {"name": "Gibraltar", "code": "GI"}, - {"name": "Greece", "code": "GR"}, - {"name": "Greenland", "code": "GL"}, - {"name": "Grenada", "code": "GD"}, - {"name": "Guadeloupe", "code": "GP"}, - {"name": "Guam", "code": "GU"}, - {"name": "Guatemala", "code": "GT"}, - {"name": "Guernsey", "code": "GG"}, - {"name": "Guinea", "code": "GN"}, - {"name": "Guinea-Bissau", "code": "GW"}, - {"name": "Guyana", "code": "GY"}, - {"name": "Haiti", "code": "HT"}, - {"name": "Heard Island and Mcdonald Islands", "code": "HM"}, - {"name": "Holy See (Vatican City State)", "code": "VA"}, - {"name": "Honduras", "code": "HN"}, - {"name": "Hong Kong", "code": "HK"}, - {"name": "Hungary", "code": "HU"}, - {"name": "Iceland", "code": "IS"}, - {"name": "India", "code": "IN"}, - {"name": "Indonesia", "code": "ID"}, - {"name": "Iran, Islamic Republic Of", "code": "IR"}, - {"name": "Iraq", "code": "IQ"}, - {"name": "Ireland", "code": "IE"}, - {"name": "Isle of Man", "code": "IM"}, - {"name": "Israel", "code": "IL"}, - {"name": "Italy", "code": "IT"}, - {"name": "Jamaica", "code": "JM"}, - {"name": "Japan", "code": "JP"}, - {"name": "Jersey", "code": "JE"}, - {"name": "Jordan", "code": "JO"}, - {"name": "Kazakhstan", "code": "KZ"}, - {"name": "Kenya", "code": "KE"}, - {"name": "Kiribati", "code": "KI"}, - {"name": "Korea, Democratic People\"S Republic of", "code": "KP"}, - {"name": "Korea, Republic of", "code": "KR"}, - {"name": "Kuwait", "code": "KW"}, - {"name": "Kyrgyzstan", "code": "KG"}, - {"name": "Lao People\"S Democratic Republic", "code": "LA"}, - {"name": "Latvia", "code": "LV"}, - {"name": "Lebanon", "code": "LB"}, - {"name": "Lesotho", "code": "LS"}, - {"name": "Liberia", "code": "LR"}, - {"name": "Libyan Arab Jamahiriya", "code": "LY"}, - {"name": "Liechtenstein", "code": "LI"}, - {"name": "Lithuania", "code": "LT"}, - {"name": "Luxembourg", "code": "LU"}, - {"name": "Macao", "code": "MO"}, - {"name": "Macedonia, The Former Yugoslav Republic of", "code": "MK"}, - {"name": "Madagascar", "code": "MG"}, - {"name": "Malawi", "code": "MW"}, - {"name": "Malaysia", "code": "MY"}, - {"name": "Maldives", "code": "MV"}, - {"name": "Mali", "code": "ML"}, - {"name": "Malta", "code": "MT"}, - {"name": "Marshall Islands", "code": "MH"}, - {"name": "Martinique", "code": "MQ"}, - {"name": "Mauritania", "code": "MR"}, - {"name": "Mauritius", "code": "MU"}, - {"name": "Mayotte", "code": "YT"}, - {"name": "Mexico", "code": "MX"}, - {"name": "Micronesia, Federated States of", "code": "FM"}, - {"name": "Moldova, Republic of", "code": "MD"}, - {"name": "Monaco", "code": "MC"}, - {"name": "Mongolia", "code": "MN"}, - {"name": "Montserrat", "code": "MS"}, - {"name": "Morocco", "code": "MA"}, - {"name": "Mozambique", "code": "MZ"}, - {"name": "Myanmar", "code": "MM"}, - {"name": "Namibia", "code": "NA"}, - {"name": "Nauru", "code": "NR"}, - {"name": "Nepal", "code": "NP"}, - {"name": "Netherlands", "code": "NL"}, - {"name": "Netherlands Antilles", "code": "AN"}, - {"name": "New Caledonia", "code": "NC"}, - {"name": "New Zealand", "code": "NZ"}, - {"name": "Nicaragua", "code": "NI"}, - {"name": "Niger", "code": "NE"}, - {"name": "Nigeria", "code": "NG"}, - {"name": "Niue", "code": "NU"}, - {"name": "Norfolk Island", "code": "NF"}, - {"name": "Northern Mariana Islands", "code": "MP"}, - {"name": "Norway", "code": "NO"}, - {"name": "Oman", "code": "OM"}, - {"name": "Pakistan", "code": "PK"}, - {"name": "Palau", "code": "PW"}, - {"name": "Palestinian Territory, Occupied", "code": "PS"}, - {"name": "Panama", "code": "PA"}, - {"name": "Papua New Guinea", "code": "PG"}, - {"name": "Paraguay", "code": "PY"}, - {"name": "Peru", "code": "PE"}, - {"name": "Philippines", "code": "PH"}, - {"name": "Pitcairn", "code": "PN"}, - {"name": "Poland", "code": "PL"}, - {"name": "Portugal", "code": "PT"}, - {"name": "Puerto Rico", "code": "PR"}, - {"name": "Qatar", "code": "QA"}, - {"name": "Reunion", "code": "RE"}, - {"name": "Romania", "code": "RO"}, - {"name": "Russian Federation", "code": "RU"}, - {"name": "RWANDA", "code": "RW"}, - {"name": "Saint Helena", "code": "SH"}, - {"name": "Saint Kitts and Nevis", "code": "KN"}, - {"name": "Saint Lucia", "code": "LC"}, - {"name": "Saint Pierre and Miquelon", "code": "PM"}, - {"name": "Saint Vincent and the Grenadines", "code": "VC"}, - {"name": "Samoa", "code": "WS"}, - {"name": "San Marino", "code": "SM"}, - {"name": "Sao Tome and Principe", "code": "ST"}, - {"name": "Saudi Arabia", "code": "SA"}, - {"name": "Senegal", "code": "SN"}, - {"name": "Serbia and Montenegro", "code": "CS"}, - {"name": "Seychelles", "code": "SC"}, - {"name": "Sierra Leone", "code": "SL"}, - {"name": "Singapore", "code": "SG"}, - {"name": "Slovakia", "code": "SK"}, - {"name": "Slovenia", "code": "SI"}, - {"name": "Solomon Islands", "code": "SB"}, - {"name": "Somalia", "code": "SO"}, - {"name": "South Africa", "code": "ZA"}, - {"name": "South Georgia and the South Sandwich Islands", "code": "GS"}, - {"name": "Spain", "code": "ES"}, - {"name": "Sri Lanka", "code": "LK"}, - {"name": "Sudan", "code": "SD"}, - {"name": "Suriname", "code": "SR"}, - {"name": "Svalbard and Jan Mayen", "code": "SJ"}, - {"name": "Swaziland", "code": "SZ"}, - {"name": "Sweden", "code": "SE"}, - {"name": "Switzerland", "code": "CH"}, - {"name": "Syrian Arab Republic", "code": "SY"}, - {"name": "Taiwan, Province of China", "code": "TW"}, - {"name": "Tajikistan", "code": "TJ"}, - {"name": "Tanzania, United Republic of", "code": "TZ"}, - {"name": "Thailand", "code": "TH"}, - {"name": "Timor-Leste", "code": "TL"}, - {"name": "Togo", "code": "TG"}, - {"name": "Tokelau", "code": "TK"}, - {"name": "Tonga", "code": "TO"}, - {"name": "Trinidad and Tobago", "code": "TT"}, - {"name": "Tunisia", "code": "TN"}, - {"name": "Turkey", "code": "TR"}, - {"name": "Turkmenistan", "code": "TM"}, - {"name": "Turks and Caicos Islands", "code": "TC"}, - {"name": "Tuvalu", "code": "TV"}, - {"name": "Uganda", "code": "UG"}, - {"name": "Ukraine", "code": "UA"}, - {"name": "United Arab Emirates", "code": "AE"}, - {"name": "United States Minor Outlying Islands", "code": "UM"}, - {"name": "Uruguay", "code": "UY"}, - {"name": "Uzbekistan", "code": "UZ"}, - {"name": "Vanuatu", "code": "VU"}, - {"name": "Venezuela", "code": "VE"}, - {"name": "Viet Nam", "code": "VN"}, - {"name": "Virgin Islands, British", "code": "VG"}, - {"name": "Virgin Islands, U.S.", "code": "VI"}, - {"name": "Wallis and Futuna", "code": "WF"}, - {"name": "Western Sahara", "code": "EH"}, - {"name": "Yemen", "code": "YE"}, - {"name": "Zambia", "code": "ZM"}, - {"name": "Zimbabwe", "code": "ZW"} -]; diff --git a/LabelStoreMax/lib/app_payment_methods.dart b/LabelStoreMax/lib/app_payment_methods.dart index 7a51bbf..44b584d 100644 --- a/LabelStoreMax/lib/app_payment_methods.dart +++ b/LabelStoreMax/lib/app_payment_methods.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/app_state_options.dart b/LabelStoreMax/lib/app_state_options.dart deleted file mode 100644 index 89d6157..0000000 --- a/LabelStoreMax/lib/app_state_options.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Label StoreMAX -// -// Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. -// - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -// STATE OPTIONS -// ONLY USED IF COUNTRY IS US - -var appStateOptions = [ - {"code": "AL", "name": "Alabama"}, - {"code": "AK", "name": "Alaska"}, - {"code": "AS", "name": "American Samoa"}, - {"code": "AZ", "name": "Arizona"}, - {"code": "AR", "name": "Arkansas"}, - {"code": "CA", "name": "California"}, - {"code": "CO", "name": "Colorado"}, - {"code": "CT", "name": "Connecticut"}, - {"code": "DE", "name": "Delaware"}, - {"code": "DC", "name": "District Of Columbia"}, - {"code": "FM", "name": "Federated States Of Micronesia"}, - {"code": "FL", "name": "Florida"}, - {"code": "GA", "name": "Georgia"}, - {"code": "GU", "name": "Guam"}, - {"code": "HI", "name": "Hawaii"}, - {"code": "ID", "name": "Idaho"}, - {"code": "IL", "name": "Illinois"}, - {"code": "IN", "name": "Indiana"}, - {"code": "IA", "name": "Iowa"}, - {"code": "KS", "name": "Kansas"}, - {"code": "KY", "name": "Kentucky"}, - {"code": "LA", "name": "Louisiana"}, - {"code": "ME", "name": "Maine"}, - {"code": "MH", "name": "Marshall Islands"}, - {"code": "MD", "name": "Maryland"}, - {"code": "MA", "name": "Massachusetts"}, - {"code": "MI", "name": "Michigan"}, - {"code": "MN", "name": "Minnesota"}, - {"code": "MS", "name": "Mississippi"}, - {"code": "MO", "name": "Missouri"}, - {"code": "MT", "name": "Montana"}, - {"code": "NE", "name": "Nebraska"}, - {"code": "NV", "name": "Nevada"}, - {"code": "NH", "name": "New Hampshire"}, - {"code": "NJ", "name": "New Jersey"}, - {"code": "NM", "name": "New Mexico"}, - {"code": "NY", "name": "New York"}, - {"code": "NC", "name": "North Carolina"}, - {"code": "ND", "name": "North Dakota"}, - {"code": "MP", "name": "Northern Mariana Islands"}, - {"code": "OH", "name": "Ohio"}, - {"code": "OK", "name": "Oklahoma"}, - {"code": "OR", "name": "Oregon"}, - {"code": "PW", "name": "Palau"}, - {"code": "PA", "name": "Pennsylvania"}, - {"code": "PR", "name": "Puerto Rico"}, - {"code": "RI", "name": "Rhode Island"}, - {"code": "SC", "name": "South Carolina"}, - {"code": "SD", "name": "South Dakota"}, - {"code": "TN", "name": "Tennessee"}, - {"code": "TX", "name": "Texas"}, - {"code": "UT", "name": "Utah"}, - {"code": "VT", "name": "Vermont"}, - {"code": "VI", "name": "Virgin Islands"}, - {"code": "VA", "name": "Virginia"}, - {"code": "WA", "name": "Washington"}, - {"code": "WV", "name": "West Virginia"}, - {"code": "WI", "name": "Wisconsin"}, - {"code": "WY", "name": "Wyoming"} -]; diff --git a/LabelStoreMax/lib/helpers/app_localizations.dart b/LabelStoreMax/lib/helpers/app_localizations.dart index 9a67ead..fc3bb6b 100644 --- a/LabelStoreMax/lib/helpers/app_localizations.dart +++ b/LabelStoreMax/lib/helpers/app_localizations.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/app_themes.dart b/LabelStoreMax/lib/helpers/app_themes.dart index 8d75a0a..8e5477f 100644 --- a/LabelStoreMax/lib/helpers/app_themes.dart +++ b/LabelStoreMax/lib/helpers/app_themes.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/data/order_wc.dart b/LabelStoreMax/lib/helpers/data/order_wc.dart index 19e5962..b531f0f 100644 --- a/LabelStoreMax/lib/helpers/data/order_wc.dart +++ b/LabelStoreMax/lib/helpers/data/order_wc.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -50,7 +50,7 @@ Future buildOrderWC({TaxRate taxRate, bool markPaid = true}) async { tmpLineItem.total = (cartItem.quantity > 1 ? cartItem.getCartTotal() : cartItem.subtotal); - tmpLineItem.subtotal = + tmpLineItem.subtotal = (parseWcPrice(cartItem.subtotal) * cartItem.quantity).toString(); lineItems.add(tmpLineItem); @@ -66,11 +66,11 @@ Future buildOrderWC({TaxRate taxRate, bool markPaid = true}) async { billing.address1 = billingDetails.billingAddress.addressLine; billing.city = billingDetails.billingAddress.city; billing.postcode = billingDetails.billingAddress.postalCode; - billing.country = billingDetails.billingAddress.country; billing.email = billingDetails.billingAddress.emailAddress; - if (billingDetails.billingAddress.country == "United States") { - billing.state = billingDetails.billingAddress.state; + if (billingDetails.billingAddress.customerCountry.hasState()) { + billing.state = billingDetails.billingAddress.customerCountry.state.name; } + billing.country = billingDetails.billingAddress.customerCountry.name; orderWC.billing = billing; @@ -81,10 +81,10 @@ Future buildOrderWC({TaxRate taxRate, bool markPaid = true}) async { shipping.address1 = billingDetails.shippingAddress.addressLine; shipping.city = billingDetails.shippingAddress.city; shipping.postcode = billingDetails.shippingAddress.postalCode; - if (billingDetails.shippingAddress.country == "United States") { - shipping.state = billingDetails.shippingAddress.state; + if (billingDetails.shippingAddress.customerCountry.hasState()) { + billing.state = billingDetails.shippingAddress.customerCountry.state.name; } - shipping.country = billingDetails.shippingAddress.country; + billing.country = billingDetails.shippingAddress.customerCountry.name; orderWC.shipping = shipping; diff --git a/LabelStoreMax/lib/helpers/enums/sort_enums.dart b/LabelStoreMax/lib/helpers/enums/sort_enums.dart index 126a203..26a9a00 100644 --- a/LabelStoreMax/lib/helpers/enums/sort_enums.dart +++ b/LabelStoreMax/lib/helpers/enums/sort_enums.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/shared_pref.dart b/LabelStoreMax/lib/helpers/shared_pref.dart index 131c980..0cbd652 100644 --- a/LabelStoreMax/lib/helpers/shared_pref.dart +++ b/LabelStoreMax/lib/helpers/shared_pref.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/shared_pref/sp_auth.dart b/LabelStoreMax/lib/helpers/shared_pref/sp_auth.dart index 183cf73..f655c75 100644 --- a/LabelStoreMax/lib/helpers/shared_pref/sp_auth.dart +++ b/LabelStoreMax/lib/helpers/shared_pref/sp_auth.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/shared_pref/sp_user_id.dart b/LabelStoreMax/lib/helpers/shared_pref/sp_user_id.dart index 33a87bc..130a301 100644 --- a/LabelStoreMax/lib/helpers/shared_pref/sp_user_id.dart +++ b/LabelStoreMax/lib/helpers/shared_pref/sp_user_id.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/helpers/tools.dart b/LabelStoreMax/lib/helpers/tools.dart index 8af0994..388efd1 100644 --- a/LabelStoreMax/lib/helpers/tools.dart +++ b/LabelStoreMax/lib/helpers/tools.dart @@ -1,13 +1,14 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +import 'dart:convert'; import 'dart:developer'; import 'package:flutter/cupertino.dart'; @@ -22,6 +23,7 @@ import 'package:label_storemax/models/billing_details.dart'; import 'package:label_storemax/models/cart.dart'; import 'package:label_storemax/models/cart_line_item.dart'; import 'package:label_storemax/models/checkout_session.dart'; +import 'package:label_storemax/models/default_shipping.dart'; import 'package:label_storemax/models/payment_type.dart'; import 'package:html/parser.dart'; import 'package:flutter_web_browser/flutter_web_browser.dart'; @@ -157,7 +159,7 @@ String workoutSaleDiscount( openBrowserTab({@required String url}) async { await FlutterWebBrowser.openWebPage( - url: url, androidToolbarColor: Colors.white70); + url: url, customTabsOptions: CustomTabsOptions(toolbarColor: Colors.white70)); } EdgeInsets safeAreaDefault() { @@ -544,3 +546,26 @@ class UserAuth { String redirect = "/home"; } + +Future> getDefaultShipping(BuildContext context) async { + String data = await DefaultAssetBundle.of(context) + .loadString("assets/default_shipping.json"); + dynamic dataJson = json.decode(data); + List shipping = []; + + dataJson.forEach((key, value) { + DefaultShipping defaultShipping = DefaultShipping(); + defaultShipping.code = key; + defaultShipping.country = value['country']; + + defaultShipping.states = []; + if (value['states'] != null) { + value['states'].forEach((key1, value2) { + defaultShipping.states + .add(DefaultShippingState(code: key1, name: value2)); + }); + } + shipping.add(defaultShipping); + }); + return shipping; +} diff --git a/LabelStoreMax/lib/labelconfig.dart b/LabelStoreMax/lib/labelconfig.dart index 80fce2e..01dc0da 100644 --- a/LabelStoreMax/lib/labelconfig.dart +++ b/LabelStoreMax/lib/labelconfig.dart @@ -3,7 +3,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -16,7 +16,7 @@ import 'dart:ui'; Developer Notes SUPPORT EMAIL - support@woosignal.com - VERSION - 2.5.1 + VERSION - 2.6.0 https://woosignal.com */ diff --git a/LabelStoreMax/lib/main.dart b/LabelStoreMax/lib/main.dart index b5f729f..7c8cc62 100644 --- a/LabelStoreMax/lib/main.dart +++ b/LabelStoreMax/lib/main.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -11,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:hexcolor/hexcolor.dart'; +import 'package:label_storemax/helpers/shared_pref.dart'; import 'package:label_storemax/pages/account_billing_details.dart'; import 'package:label_storemax/pages/account_detail.dart'; import 'package:label_storemax/pages/account_landing.dart'; @@ -18,8 +19,10 @@ import 'package:label_storemax/pages/account_order_detail.dart'; import 'package:label_storemax/pages/account_profile_update.dart'; import 'package:label_storemax/pages/account_register.dart'; import 'package:label_storemax/pages/account_shipping_details.dart'; +import 'package:label_storemax/pages/customer_countries.dart'; import 'package:label_storemax/pages/error_page.dart'; import 'package:label_storemax/pages/product_image_viewer_page.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import 'package:woosignal/models/response/order.dart'; import 'package:woosignal/models/response/product_category.dart'; import 'package:woosignal/models/response/products.dart'; @@ -201,6 +204,12 @@ void main() async { child: HomeSearchPage(), type: PageTransitionType.bottomToTop, ); + + case '/customer-countries': + return PageTransition( + child: CustomerCountriesPage(), + type: PageTransitionType.bottomToTop, + ); default: return null; } diff --git a/LabelStoreMax/lib/models/billing_details.dart b/LabelStoreMax/lib/models/billing_details.dart index e60ada6..f1d194f 100644 --- a/LabelStoreMax/lib/models/billing_details.dart +++ b/LabelStoreMax/lib/models/billing_details.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/models/cart.dart b/LabelStoreMax/lib/models/cart.dart index 77bf409..3cd69f1 100644 --- a/LabelStoreMax/lib/models/cart.dart +++ b/LabelStoreMax/lib/models/cart.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/models/cart_line_item.dart b/LabelStoreMax/lib/models/cart_line_item.dart index 7597463..e99d8b7 100644 --- a/LabelStoreMax/lib/models/cart_line_item.dart +++ b/LabelStoreMax/lib/models/cart_line_item.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/models/checkout_session.dart b/LabelStoreMax/lib/models/checkout_session.dart index d7d9f3e..22a818a 100644 --- a/LabelStoreMax/lib/models/checkout_session.dart +++ b/LabelStoreMax/lib/models/checkout_session.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -49,6 +49,10 @@ class CheckoutSession { CustomerAddress customerAddress = CheckoutSession.getInstance.billingDetails.billingAddress; + if (customerAddress == null) { + return; + } + String billingAddress = jsonEncode(customerAddress.toJson()); sharedPref.save(sfKeyBillingCheckout, billingAddress); } @@ -74,6 +78,10 @@ class CheckoutSession { CustomerAddress customerAddress = CheckoutSession.getInstance.billingDetails.shippingAddress; + if (customerAddress == null) { + return; + } + String shippingAddress = jsonEncode(customerAddress.toJson()); sharedPref.save(sfKeyShippingCheckout, shippingAddress); } diff --git a/LabelStoreMax/lib/models/customer_address.dart b/LabelStoreMax/lib/models/customer_address.dart index e0880ab..d8c12b0 100644 --- a/LabelStoreMax/lib/models/customer_address.dart +++ b/LabelStoreMax/lib/models/customer_address.dart @@ -1,22 +1,23 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +import 'package:label_storemax/models/customer_country.dart'; + class CustomerAddress { String firstName; String lastName; String addressLine; String city; String postalCode; - String state; - String country; String emailAddress; + CustomerCountry customerCountry; CustomerAddress( {this.firstName, @@ -24,9 +25,8 @@ class CustomerAddress { this.addressLine, this.city, this.postalCode, - this.state, - this.country, - this.emailAddress}); + this.emailAddress, + this.customerCountry}); void initAddress() { firstName = ""; @@ -34,8 +34,7 @@ class CustomerAddress { addressLine = ""; city = ""; postalCode = ""; - state = ""; - country = ""; + customerCountry = CustomerCountry(); emailAddress = ""; } @@ -45,7 +44,9 @@ class CustomerAddress { this.addressLine.isEmpty || this.city.isEmpty || this.postalCode.isEmpty) || - (this.country == "United States" ? this.state.isEmpty : false); + (this.customerCountry.hasState() == true + ? (this.customerCountry?.state?.name ?? "").isEmpty + : false); String addressFull() { List tmpArrAddress = new List(); @@ -58,11 +59,12 @@ class CustomerAddress { if (postalCode != null && postalCode != "") { tmpArrAddress.add(postalCode); } - if (state != null && state != "") { - tmpArrAddress.add(state); + if (this.customerCountry != null && + this.customerCountry?.state?.name != null) { + tmpArrAddress.add(this.customerCountry?.state?.name); } - if (country != null && country != "") { - tmpArrAddress.add(country); + if (this.customerCountry != null && this.customerCountry?.name != null) { + tmpArrAddress.add(this.customerCountry.name); } return tmpArrAddress.join(", "); } @@ -84,8 +86,7 @@ class CustomerAddress { addressLine = json['address_line']; city = json['city']; postalCode = json['postal_code']; - state = json['state']; - country = json['country']; + this.customerCountry = CustomerCountry.fromJson(json['customer_country']); emailAddress = json['email_address']; } @@ -96,9 +97,13 @@ class CustomerAddress { data['address_line'] = this.addressLine; data['city'] = this.city; data['postal_code'] = this.postalCode; - data['state'] = this.state; - data['country'] = this.country; + data['state'] = this.customerCountry.state; + data['country'] = this.customerCountry.name; data['email_address'] = this.emailAddress; + data['customer_country'] = null; + if (this.customerCountry != null) { + data['customer_country'] = this.customerCountry.toJson(); + } return data; } } diff --git a/LabelStoreMax/lib/models/customer_country.dart b/LabelStoreMax/lib/models/customer_country.dart new file mode 100644 index 0000000..a86be52 --- /dev/null +++ b/LabelStoreMax/lib/models/customer_country.dart @@ -0,0 +1,48 @@ +// Label StoreMAX +// +// Created by Anthony Gordon. +// 2021, WooSignal Ltd. All rights reserved. +// + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +import 'package:label_storemax/models/default_shipping.dart'; + +class CustomerCountry { + String countryCode; + String name; + DefaultShippingState state; + + CustomerCountry({this.countryCode, this.name, this.state}); + + CustomerCountry.fromDefaultShipping({DefaultShipping defaultShipping}) { + countryCode = defaultShipping.code; + name = defaultShipping.country; + if ((defaultShipping.states?.length ?? 0) == 1) { + state = defaultShipping.states.first; + } + } + + CustomerCountry.fromJson(Map json) { + countryCode = json['country_code']; + name = json['name']; + state = DefaultShippingState.fromJson(json['state']); + } + + bool hasState() { + return this.state != null && this.state.name != null ? true : false; + } + + Map toJson() { + final Map data = new Map(); + data['country_code'] = this.countryCode; + data['name'] = this.name; + data['state'] = null; + if (this.state != null) { + data['state'] = this.state.toJson(); + } + return data; + } +} diff --git a/LabelStoreMax/lib/models/default_shipping.dart b/LabelStoreMax/lib/models/default_shipping.dart new file mode 100644 index 0000000..057fc38 --- /dev/null +++ b/LabelStoreMax/lib/models/default_shipping.dart @@ -0,0 +1,38 @@ +// Label StoreMAX +// +// Created by Anthony Gordon. +// 2021, WooSignal Ltd. All rights reserved. +// + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +class DefaultShipping { + String code; + String country; + List states; + DefaultShipping({this.code, this.country, this.states}); +} + +class DefaultShippingState { + String code; + String name; + + DefaultShippingState({this.code, this.name}); + + Map toJson() { + final Map data = new Map(); + data['code'] = code; + data['name'] = name; + return data; + } + + DefaultShippingState.fromJson(Map json) { + if (json == null) { + return; + } + this.code = json['code']; + this.name = json['name']; + } +} diff --git a/LabelStoreMax/lib/models/payment_type.dart b/LabelStoreMax/lib/models/payment_type.dart index 786f81a..90fec49 100644 --- a/LabelStoreMax/lib/models/payment_type.dart +++ b/LabelStoreMax/lib/models/payment_type.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/models/shipping_type.dart b/LabelStoreMax/lib/models/shipping_type.dart index 0229ef3..a3e3d45 100644 --- a/LabelStoreMax/lib/models/shipping_type.dart +++ b/LabelStoreMax/lib/models/shipping_type.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/about.dart b/LabelStoreMax/lib/pages/about.dart index f36ad98..69a7b02 100644 --- a/LabelStoreMax/lib/pages/about.dart +++ b/LabelStoreMax/lib/pages/about.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/account_billing_details.dart b/LabelStoreMax/lib/pages/account_billing_details.dart index 589037d..bbeaba6 100644 --- a/LabelStoreMax/lib/pages/account_billing_details.dart +++ b/LabelStoreMax/lib/pages/account_billing_details.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -40,8 +40,7 @@ class _AccountBillingDetailsPageState extends State { TextEditingController _txtShippingPostalCode; TextEditingController _txtShippingCountry; - bool _isLoading; - bool _isUpdating; + bool _isLoading, _isUpdating; @override void initState() { diff --git a/LabelStoreMax/lib/pages/account_detail.dart b/LabelStoreMax/lib/pages/account_detail.dart index 19ddfb4..dcb8f92 100644 --- a/LabelStoreMax/lib/pages/account_detail.dart +++ b/LabelStoreMax/lib/pages/account_detail.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -32,14 +32,11 @@ class _AccountDetailPageState extends State RefreshController _refreshController = RefreshController(initialRefresh: false); - bool _shouldStopRequests; - bool waitForNextRequest; + bool _shouldStopRequests, waitForNextRequest, _isLoading, _isLoadingOrders; int _page; List _orders; WCCustomerInfoResponse _wcCustomerInfoResponse; - bool _isLoading; - bool _isLoadingOrders; int _currentTabIndex = 0; Widget _activeBody; @@ -296,7 +293,9 @@ class _AccountDetailPageState extends State if (orders.length <= 0) { setState(() { + _isLoadingOrders = false; _shouldStopRequests = true; + _activeBody = _widgetOrders(); }); return; } @@ -359,7 +358,7 @@ class _AccountDetailPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - "#" + _orders[i].id.toString(), + "#${_orders[i].id.toString()}", maxLines: 1, overflow: TextOverflow.ellipsis, ), diff --git a/LabelStoreMax/lib/pages/account_landing.dart b/LabelStoreMax/lib/pages/account_landing.dart index 654b4cc..eab4e92 100644 --- a/LabelStoreMax/lib/pages/account_landing.dart +++ b/LabelStoreMax/lib/pages/account_landing.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -33,8 +33,7 @@ class AccountLandingPage extends StatefulWidget { class _AccountLandingPageState extends State { bool _hasTappedLogin; - TextEditingController _tfEmailController; - TextEditingController _tfPasswordController; + TextEditingController _tfEmailController, _tfPasswordController; @override void initState() { diff --git a/LabelStoreMax/lib/pages/account_order_detail.dart b/LabelStoreMax/lib/pages/account_order_detail.dart index c1f868b..e827284 100644 --- a/LabelStoreMax/lib/pages/account_order_detail.dart +++ b/LabelStoreMax/lib/pages/account_order_detail.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -53,7 +53,7 @@ class _AccountOrderDetailPageState extends State { margin: EdgeInsets.only(left: 0), ), title: Text( - "${capitalize(trans(context, "Order"))} #" + _orderId.toString(), + "${capitalize(trans(context, "Order"))} #${_orderId.toString()}", style: Theme.of(context).primaryTextTheme.headline6, ), centerTitle: true, @@ -79,8 +79,9 @@ class _AccountOrderDetailPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Flexible( - child: Text( - "${capitalize(trans(context, "Ships to"))}:")), + child: Text( + "${capitalize(trans(context, "Ships to"))}:"), + ), Flexible( child: Text( [ @@ -110,87 +111,91 @@ class _AccountOrderDetailPageState extends State { ), ), Expanded( - child: ListView.builder( - itemBuilder: (cxt, i) { - return Card( - child: ListTile( - contentPadding: EdgeInsets.only( - top: 5, bottom: 5, left: 8, right: 6), - title: Container( - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: HexColor("#fcfcfc"), width: 1), + child: ListView.builder( + itemBuilder: (cxt, i) { + return Card( + child: ListTile( + contentPadding: EdgeInsets.only( + top: 5, bottom: 5, left: 8, right: 6), + title: Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: HexColor("#fcfcfc"), width: 1), + ), ), - ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - child: Text( - _order.lineItems[i].name, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Flexible( + child: Text( + _order.lineItems[i].name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + Text( + capitalize( + formatStringCurrency( + total: _order.lineItems[i].price), + ), maxLines: 1, overflow: TextOverflow.ellipsis, ), - ), - Text( - capitalize( - formatStringCurrency( - total: _order.lineItems[i].price), - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ], + ], + ), ), - ), - subtitle: Padding( - padding: const EdgeInsets.only(top: 10), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - formatStringCurrency( - total: _order.lineItems[i].total, + subtitle: Padding( + padding: const EdgeInsets.only(top: 10), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + formatStringCurrency( + total: _order.lineItems[i].total, + ), + style: Theme.of(context) + .primaryTextTheme + .bodyText2 + .copyWith( + fontWeight: FontWeight.w600, + color: Colors.black, + ), + textAlign: TextAlign.left, ), - style: Theme.of(context) - .primaryTextTheme - .bodyText2 - .copyWith( - fontWeight: FontWeight.w600, - color: Colors.black, - ), - textAlign: TextAlign.left, - ), - Text( - "x" + - _order.lineItems[i].quantity - .toString(), - style: Theme.of(context) - .primaryTextTheme - .bodyText1 - .copyWith( - fontWeight: FontWeight.w600, - color: Colors.black, - ), - textAlign: TextAlign.left, - ), - ], - ), - ], + Text( + "x" + + _order.lineItems[i].quantity + .toString(), + style: Theme.of(context) + .primaryTextTheme + .bodyText1 + .copyWith( + fontWeight: FontWeight.w600, + color: Colors.black, + ), + textAlign: TextAlign.left, + ), + ], + ), + ], + ), ), ), - ), - ); - }, - itemCount: _order.lineItems.length, - )), + ); + }, + itemCount: _order.lineItems.length, + ), + ), ], ), ), diff --git a/LabelStoreMax/lib/pages/account_profile_update.dart b/LabelStoreMax/lib/pages/account_profile_update.dart index 7ae2ea9..533aa9c 100644 --- a/LabelStoreMax/lib/pages/account_profile_update.dart +++ b/LabelStoreMax/lib/pages/account_profile_update.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -31,8 +31,7 @@ class _AccountProfileUpdatePageState extends State { _AccountProfileUpdatePageState(); bool isLoading; - TextEditingController _tfFirstName; - TextEditingController _tfLastName; + TextEditingController _tfFirstName, _tfLastName; @override void dispose() { @@ -147,7 +146,7 @@ class _AccountProfileUpdatePageState extends State { wpUserInfoUpdatedResponse = await WPJsonAPI.instance.api((request) => request.wpUpdateUserInfo(userToken, firstName: firstName, lastName: lastName)); - } on Exception catch (e) { + } on Exception catch (_) { showEdgeAlertWith(context, title: trans(context, "Invalid details"), desc: trans(context, "Please check your email and password"), diff --git a/LabelStoreMax/lib/pages/account_register.dart b/LabelStoreMax/lib/pages/account_register.dart index 0c7629c..8fca8cc 100644 --- a/LabelStoreMax/lib/pages/account_register.dart +++ b/LabelStoreMax/lib/pages/account_register.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/account_shipping_details.dart b/LabelStoreMax/lib/pages/account_shipping_details.dart index 5477008..0c72499 100644 --- a/LabelStoreMax/lib/pages/account_shipping_details.dart +++ b/LabelStoreMax/lib/pages/account_shipping_details.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -41,8 +41,7 @@ class _AccountShippingDetailsPageState TextEditingController _txtShippingState; TextEditingController _txtShippingCountry; - bool _isLoading; - bool _isUpdating; + bool _isLoading, _isUpdating; @override void initState() { diff --git a/LabelStoreMax/lib/pages/browse_category.dart b/LabelStoreMax/lib/pages/browse_category.dart index 4d66b54..a459d4e 100644 --- a/LabelStoreMax/lib/pages/browse_category.dart +++ b/LabelStoreMax/lib/pages/browse_category.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -37,10 +37,9 @@ class _BrowseCategoryPageState extends State { RefreshController _refreshController = RefreshController(initialRefresh: false); ProductCategory _selectedCategory; - bool _isLoading; + int _page; - bool _shouldStopRequests; - bool waitForNextRequest; + bool _shouldStopRequests, waitForNextRequest, _isLoading; @override void initState() { diff --git a/LabelStoreMax/lib/pages/browse_search.dart b/LabelStoreMax/lib/pages/browse_search.dart index f4a8b2f..59804dd 100644 --- a/LabelStoreMax/lib/pages/browse_search.dart +++ b/LabelStoreMax/lib/pages/browse_search.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -27,12 +27,11 @@ class _BrowseSearchState extends State { RefreshController _refreshController = RefreshController(initialRefresh: false); + List _products = []; String _search; - bool _isLoading; int _page; - bool _shouldStopRequests; - bool waitForNextRequest; + bool _shouldStopRequests, waitForNextRequest, _isLoading; @override void initState() { diff --git a/LabelStoreMax/lib/pages/cart.dart b/LabelStoreMax/lib/pages/cart.dart index e3fba8d..e9f8f8c 100644 --- a/LabelStoreMax/lib/pages/cart.dart +++ b/LabelStoreMax/lib/pages/cart.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/checkout_confirmation.dart b/LabelStoreMax/lib/pages/checkout_confirmation.dart index 8d5859c..8140963 100644 --- a/LabelStoreMax/lib/pages/checkout_confirmation.dart +++ b/LabelStoreMax/lib/pages/checkout_confirmation.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -10,17 +10,16 @@ import 'package:flutter/material.dart'; import 'package:label_storemax/app_payment_methods.dart'; -import 'package:label_storemax/app_state_options.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/labelconfig.dart'; import 'package:label_storemax/models/cart.dart'; import 'package:label_storemax/models/checkout_session.dart'; import 'package:label_storemax/models/customer_address.dart'; +import 'package:label_storemax/models/customer_country.dart'; import 'package:label_storemax/widgets/app_loader.dart'; import 'package:label_storemax/widgets/buttons.dart'; import 'package:label_storemax/widgets/woosignal_ui.dart'; import 'package:woosignal/models/response/tax_rate.dart'; -import 'package:label_storemax/app_country_options.dart'; class CheckoutConfirmationPage extends StatefulWidget { CheckoutConfirmationPage({Key key}) : super(key: key); @@ -33,11 +32,10 @@ class CheckoutConfirmationPage extends StatefulWidget { class CheckoutConfirmationPageState extends State { CheckoutConfirmationPageState(); - bool _showFullLoader; + bool _showFullLoader, _isProcessingPayment; List _taxRates; TaxRate _taxRate; - bool _isProcessingPayment; @override void initState() { @@ -89,54 +87,57 @@ class CheckoutConfirmationPageState extends State { }); return; } - String country = - CheckoutSession.getInstance.billingDetails.shippingAddress.country; - String state = - CheckoutSession.getInstance.billingDetails.shippingAddress.state; + CustomerCountry shippingCountry = CheckoutSession + .getInstance.billingDetails.shippingAddress.customerCountry; String postalCode = CheckoutSession.getInstance.billingDetails.shippingAddress.postalCode; - Map countryMap = appCountryOptions - .firstWhere((c) => c['name'] == country, orElse: () => null); - - if (countryMap == null) { + if (shippingCountry == null) { _showFullLoader = false; setState(() {}); return; } TaxRate taxRate; - - Map stateMap; - if (state != null) { - stateMap = appStateOptions.firstWhere((c) => c['name'] == state, - orElse: () => null); - } - - if (stateMap != null) { + if (shippingCountry.hasState()) { taxRate = _taxRates.firstWhere( - (t) => - t.country == countryMap["code"] && - t.state == stateMap["code"] && - t.postcode == postalCode, - orElse: () => null); + (t) { + if (shippingCountry == null || + (shippingCountry?.state?.code ?? "") == "") { + return false; + } - if (taxRate == null) { - taxRate = _taxRates.firstWhere( - (t) => - t.country == countryMap["code"] && t.state == stateMap["code"], - orElse: () => null); - } + List stateElements = shippingCountry.state.code.split(":"); + String state = stateElements.last; + + if (t.country == shippingCountry.countryCode && + t.state == state && + t.postcode == postalCode) { + return true; + } + + if (t.country == shippingCountry.countryCode && t.state == state) { + return true; + } + return false; + }, + orElse: () => null, + ); } if (taxRate == null) { taxRate = _taxRates.firstWhere( - (t) => t.country == countryMap["code"] && t.postcode == postalCode, - orElse: () => null); + (t) => + t.country == shippingCountry.countryCode && + t.postcode == postalCode, + orElse: () => null, + ); if (taxRate == null) { - taxRate = _taxRates.firstWhere((t) => t.country == countryMap["code"], - orElse: () => null); + taxRate = _taxRates.firstWhere( + (t) => t.country == shippingCountry.countryCode, + orElse: () => null, + ); } } @@ -165,7 +166,7 @@ class CheckoutConfirmationPageState extends State { _actionSelectShipping() { CustomerAddress shippingAddress = CheckoutSession.getInstance.billingDetails.shippingAddress; - if (shippingAddress == null || shippingAddress.country == "") { + if (shippingAddress == null || shippingAddress.customerCountry == null) { showEdgeAlertWith(context, title: trans(context, "Oops"), desc: trans(context, "Add your shipping details first"), diff --git a/LabelStoreMax/lib/pages/checkout_details.dart b/LabelStoreMax/lib/pages/checkout_details.dart index df2695d..7925edd 100644 --- a/LabelStoreMax/lib/pages/checkout_details.dart +++ b/LabelStoreMax/lib/pages/checkout_details.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -9,14 +9,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import 'package:flutter/material.dart'; -import 'package:label_storemax/app_state_options.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/models/billing_details.dart'; import 'package:label_storemax/models/checkout_session.dart'; import 'package:label_storemax/models/customer_address.dart'; +import 'package:label_storemax/models/customer_country.dart'; import 'package:label_storemax/widgets/buttons.dart'; +import 'package:label_storemax/widgets/customer_address_input.dart'; +import 'package:label_storemax/widgets/switch_address_tab.dart'; import 'package:label_storemax/widgets/woosignal_ui.dart'; -import 'package:label_storemax/app_country_options.dart'; class CheckoutDetailsPage extends StatefulWidget { CheckoutDetailsPage(); @@ -28,268 +29,52 @@ class CheckoutDetailsPage extends StatefulWidget { class _CheckoutDetailsPageState extends State { _CheckoutDetailsPageState(); - bool _valDifferentShippingAddress = false; + bool _hasDifferentShippingAddress = false; int activeTabIndex = 0; - // BILLING TEXT CONTROLLERS - TextEditingController _txtBillingFirstName; - TextEditingController _txtBillingLastName; - TextEditingController _txtBillingAddressLine; - TextEditingController _txtBillingCity; - TextEditingController _txtBillingPostalCode; - TextEditingController _txtBillingEmailAddress; + // TEXT CONTROLLERS + TextEditingController + // billing + _txtBillingFirstName, + _txtBillingLastName, + _txtBillingAddressLine, + _txtBillingCity, + _txtBillingPostalCode, + _txtBillingEmailAddress, + // shipping + _txtShippingFirstName, + _txtShippingLastName, + _txtShippingAddressLine, + _txtShippingCity, + _txtShippingPostalCode, + _txtShippingEmailAddress; - TextEditingController _txtShippingFirstName; - TextEditingController _txtShippingLastName; - TextEditingController _txtShippingAddressLine; - TextEditingController _txtShippingCity; - TextEditingController _txtShippingPostalCode; - TextEditingController _txtShippingEmailAddress; - - String _strBillingCountry; - String _strBillingState; - - String _strShippingCountry; - String _strShippingState; + CustomerCountry _billingCountry, _shippingCountry; var valRememberDetails = true; Widget activeTab; - Widget tabShippingDetails() { - return Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _valDifferentShippingAddress - ? Divider( - height: 0, - ) - : null, - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "First Name"), - controller: _txtShippingFirstName, - shouldAutoFocus: true, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Last Name"), - controller: _txtShippingLastName, - ), - ), - ], - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - ), - ), - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Address Line"), - controller: _txtShippingAddressLine, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "City"), - controller: _txtShippingCity, - ), - ), - ], - ), - ), - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Postal code"), - controller: _txtShippingPostalCode, - ), - ), - Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "Email address"), - keyboardType: TextInputType.emailAddress, - controller: _txtShippingEmailAddress), - ), - ], - ), - ), - Flexible( - child: Row( - children: [ - (_strShippingCountry == "United States" - ? Flexible( - child: Padding( - child: wsSecondaryButton( - context, - title: (_strShippingState != null && - _strShippingState.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strShippingState - : trans(context, "Select state")), - action: () => _showSelectStateModal("shipping"), - ), - padding: EdgeInsets.all(8), - ), - ) - : null), - Flexible( - child: Padding( - child: wsSecondaryButton( - context, - title: (_strShippingCountry != null && - _strShippingCountry.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strShippingCountry - : trans(context, "Select country")), - action: () => _showSelectCountryModal("shipping"), - ), - padding: EdgeInsets.all(8), - ), - ), - ].where((element) => element != null).toList(), - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - ), - ), - ].where((e) => e != null).toList(), - ), - ); - } + Widget tabShippingDetails() => CustomerAddressInput( + txtControllerFirstName: _txtShippingFirstName, + txtControllerLastName: _txtShippingLastName, + txtControllerAddressLine: _txtShippingAddressLine, + txtControllerCity: _txtShippingCity, + txtControllerPostalCode: _txtShippingPostalCode, + txtControllerEmailAddress: _txtShippingEmailAddress, + customerCountry: _shippingCountry, + onTapCountry: () => _navigateToSelectCountry(type: "shipping"), + ); - Widget tabBillingDetails() { - return Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _valDifferentShippingAddress - ? Divider( - height: 0, - ) - : null, - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "First Name"), - controller: _txtBillingFirstName, - shouldAutoFocus: true, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Last Name"), - controller: _txtBillingLastName, - ), - ), - ], - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - ), - ), - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Address Line"), - controller: _txtBillingAddressLine, - ), - ), - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "City"), - controller: _txtBillingCity, - ), - ), - ], - ), - ), - Flexible( - child: Row( - children: [ - Flexible( - child: wsTextEditingRow( - context, - heading: trans(context, "Postal code"), - controller: _txtBillingPostalCode, - ), - ), - Flexible( - child: wsTextEditingRow(context, - heading: trans(context, "Email address"), - keyboardType: TextInputType.emailAddress, - controller: _txtBillingEmailAddress), - ), - ], - ), - ), - Flexible( - child: Row( - children: [ - (_strBillingCountry == "United States" - ? Flexible( - child: Padding( - child: wsSecondaryButton( - context, - title: (_strBillingState != null && - _strBillingState.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strBillingState - : trans(context, "Select state")), - action: () => _showSelectStateModal("billing"), - ), - padding: EdgeInsets.all(8), - ), - ) - : null), - Flexible( - child: Padding( - child: wsSecondaryButton( - context, - title: (_strBillingCountry != null && - _strBillingCountry.isNotEmpty - ? trans(context, "Selected") + - "\n" + - _strBillingCountry - : trans(context, "Select country")), - action: () => _showSelectCountryModal("billing"), - ), - padding: EdgeInsets.all(8), - ), - ), - ].where((element) => element != null).toList(), - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - ), - ), - ].where((e) => e != null).toList(), - ), - ); - } + Widget tabBillingDetails() => CustomerAddressInput( + txtControllerFirstName: _txtBillingFirstName, + txtControllerLastName: _txtBillingLastName, + txtControllerAddressLine: _txtBillingAddressLine, + txtControllerCity: _txtBillingCity, + txtControllerPostalCode: _txtBillingPostalCode, + txtControllerEmailAddress: _txtBillingEmailAddress, + customerCountry: _billingCountry, + onTapCountry: () => _navigateToSelectCountry(type: "billing"), + ); @override void initState() { @@ -317,146 +102,70 @@ class _CheckoutDetailsPageState extends State { CheckoutSession.getInstance.billingDetails.billingAddress.initAddress(); } BillingDetails billingDetails = CheckoutSession.getInstance.billingDetails; - _txtBillingFirstName.text = billingDetails.billingAddress.firstName; - _txtBillingLastName.text = billingDetails.billingAddress.lastName; - _txtBillingAddressLine.text = billingDetails.billingAddress.addressLine; - _txtBillingCity.text = billingDetails.billingAddress.city; - _txtBillingPostalCode.text = billingDetails.billingAddress.postalCode; - _txtBillingEmailAddress.text = billingDetails.billingAddress.emailAddress; - _strBillingCountry = billingDetails.billingAddress.country; - _strBillingState = billingDetails.billingAddress.state; + _setFieldsFromCustomerAddress(billingDetails.billingAddress, + type: "billing"); + _setFieldsFromCustomerAddress(billingDetails.shippingAddress, + type: "shipping"); - _txtShippingFirstName.text = billingDetails.shippingAddress.firstName; - _txtShippingLastName.text = billingDetails.shippingAddress.lastName; - _txtShippingAddressLine.text = billingDetails.shippingAddress.addressLine; - _txtShippingCity.text = billingDetails.shippingAddress.city; - _txtShippingPostalCode.text = billingDetails.shippingAddress.postalCode; - _txtShippingEmailAddress.text = billingDetails.shippingAddress.emailAddress; - _strShippingCountry = billingDetails.shippingAddress.country; - _strShippingState = billingDetails.shippingAddress.state; - - _valDifferentShippingAddress = + _hasDifferentShippingAddress = CheckoutSession.getInstance.shipToDifferentAddress; valRememberDetails = billingDetails.rememberDetails ?? true; - _sfCustomerAddress(); + _setCustomersDetails(); } - _sfCustomerAddress() async { + _setCustomersDetails() async { CustomerAddress sfCustomerBillingAddress = await CheckoutSession.getInstance.getBillingAddress(); - if (sfCustomerBillingAddress != null) { - CustomerAddress customerAddress = sfCustomerBillingAddress; - _txtBillingFirstName.text = customerAddress.firstName; - _txtBillingLastName.text = customerAddress.lastName; - _txtBillingAddressLine.text = customerAddress.addressLine; - _txtBillingCity.text = customerAddress.city; - _txtBillingPostalCode.text = customerAddress.postalCode; - _txtBillingEmailAddress.text = customerAddress.emailAddress; - _strBillingState = customerAddress.state; - _strBillingCountry = customerAddress.country; - } + _setFieldsFromCustomerAddress(sfCustomerBillingAddress, type: "billing"); CustomerAddress sfCustomerShippingAddress = await CheckoutSession.getInstance.getShippingAddress(); - if (sfCustomerShippingAddress != null) { - CustomerAddress customerAddress = sfCustomerShippingAddress; - _txtShippingFirstName.text = customerAddress.firstName; - _txtShippingLastName.text = customerAddress.lastName; - _txtShippingAddressLine.text = customerAddress.addressLine; - _txtShippingCity.text = customerAddress.city; - _txtShippingPostalCode.text = customerAddress.postalCode; - _txtShippingEmailAddress.text = customerAddress.emailAddress; - _strShippingCountry = customerAddress.country; - _strShippingState = customerAddress.state; + _setFieldsFromCustomerAddress(sfCustomerShippingAddress, type: "shipping"); + } + + _setFieldsFromCustomerAddress(CustomerAddress customerAddress, + {@required String type}) { + assert(type != ""); + if (customerAddress == null) { + return; } + _setFields( + firstName: customerAddress.firstName, + lastName: customerAddress.lastName, + addressLine: customerAddress.addressLine, + city: customerAddress.city, + postalCode: customerAddress.postalCode, + emailAddress: customerAddress.emailAddress, + customerCountry: customerAddress.customerCountry, + type: type); } - _showSelectCountryModal(String type) { - wsModalBottom( - context, - title: trans(context, "Select a country"), - bodyWidget: ListView.separated( - itemCount: appCountryOptions.length, - itemBuilder: (BuildContext context, int index) { - Map strName = appCountryOptions[index]; - - return InkWell( - child: Container( - child: Text(strName["name"], - style: Theme.of(context).primaryTextTheme.bodyText1), - padding: EdgeInsets.only(top: 25, bottom: 25), - ), - splashColor: Colors.grey, - highlightColor: Colors.black12, - onTap: () => setState(() { - if (type == "shipping") { - _strShippingCountry = strName["name"]; - activeTab = tabShippingDetails(); - Navigator.of(context).pop(); - if (strName["code"] == "US") { - _showSelectStateModal(type); - } else { - _strShippingState = ""; - } - } else if (type == "billing") { - _strBillingCountry = strName["name"]; - Navigator.of(context).pop(); - activeTab = tabBillingDetails(); - if (strName["code"] == "US") { - _showSelectStateModal(type); - } else { - _strBillingState = ""; - } - } - }), - ); - }, - separatorBuilder: (cxt, i) => Divider( - height: 0, - color: Colors.black12, - ), - ), - ); - } - - _showSelectStateModal(String type) { - wsModalBottom( - context, - title: trans(context, "Select a state"), - bodyWidget: ListView.separated( - itemCount: appStateOptions.length, - itemBuilder: (BuildContext context, int index) { - Map strName = appStateOptions[index]; - - return InkWell( - child: Container( - child: Text( - strName["name"], - style: Theme.of(context).primaryTextTheme.bodyText1, - ), - padding: EdgeInsets.only(top: 25, bottom: 25), - ), - splashColor: Colors.grey, - highlightColor: Colors.black12, - onTap: () => setState(() { - if (type == "shipping") { - _strShippingState = strName["name"]; - Navigator.of(context).pop(); - activeTab = tabShippingDetails(); - } else if (type == "billing") { - _strBillingState = strName["name"]; - Navigator.of(context).pop(); - activeTab = tabBillingDetails(); - } - }), - ); - }, - separatorBuilder: (cxt, i) => Divider( - height: 0, - color: Colors.black12, - ), - ), - ); + _setFields( + {@required String firstName, + @required String lastName, + @required String addressLine, + @required String city, + @required String postalCode, + @required String emailAddress, + @required CustomerCountry customerCountry, + String type}) { + if (type == "billing") { + _txtBillingFirstName.text = firstName; + _txtBillingLastName.text = lastName; + _txtBillingAddressLine.text = addressLine; + _txtBillingCity.text = city; + _txtBillingPostalCode.text = postalCode; + _txtBillingEmailAddress.text = emailAddress; + _billingCountry = customerCountry; + } else if (type == "shipping") { + _txtShippingFirstName.text = firstName; + _txtShippingLastName.text = lastName; + _txtShippingAddressLine.text = addressLine; + _txtShippingCity.text = city; + _txtShippingPostalCode.text = postalCode; + _txtShippingEmailAddress.text = emailAddress; + _shippingCountry = customerCountry; + } } @override @@ -475,110 +184,75 @@ class _CheckoutDetailsPageState extends State { minimum: safeAreaDefault(), child: GestureDetector( onTap: () => FocusScope.of(context).requestFocus(new FocusNode()), - child: LayoutBuilder( - builder: (context, constraints) => Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - child: Container( - margin: EdgeInsets.only(top: 10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _valDifferentShippingAddress - ? Padding( - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - Flexible( - child: InkWell( - child: Container( - width: double.infinity, - child: Text( - trans(context, "Billing Details"), - style: Theme.of(context) - .textTheme - .subtitle1 - .copyWith( - color: activeTabIndex == 0 - ? Colors.white - : Colors.black), - textAlign: TextAlign.center, - ), - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(4), - color: activeTabIndex == 0 - ? Colors.black - : Colors.white, - ), - padding: EdgeInsets.symmetric( - horizontal: 4, vertical: 4), - ), - onTap: () { - setState(() { - activeTabIndex = 0; - activeTab = tabBillingDetails(); - }); - }, - ), - ), - Flexible( - child: InkWell( - child: Container( - width: double.infinity, - child: Text( - trans(context, "Shipping Address"), - style: Theme.of(context) - .textTheme - .subtitle1 - .copyWith( - color: activeTabIndex == 1 - ? Colors.white - : Colors.black), - textAlign: TextAlign.center, - ), - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(4), - color: activeTabIndex == 1 - ? Colors.black - : Colors.white, - ), - padding: EdgeInsets.symmetric( - horizontal: 4, vertical: 2), - ), - onTap: () { - setState(() { - activeTabIndex = 1; - activeTab = tabShippingDetails(); - }); - }, - ), - ) - ].where((e) => e != null).toList(), - ), - padding: EdgeInsets.symmetric(vertical: 8), - ) - : null, - activeTab ?? tabBillingDetails(), - ].where((e) => e != null).toList(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + fit: FlexFit.tight, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.symmetric(vertical: 6), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + (_hasDifferentShippingAddress + ? Padding( + child: Row( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + SwitchAddressTab( + title: + trans(context, "Billing Details"), + currentTabIndex: activeTabIndex, + type: "billing", + onTapAction: () => setState(() { + activeTabIndex = 0; + activeTab = tabBillingDetails(); + })), + SwitchAddressTab( + title: trans( + context, "Shipping Address"), + currentTabIndex: activeTabIndex, + type: "shipping", + onTapAction: () => setState(() { + activeTabIndex = 1; + activeTab = + tabShippingDetails(); + })), + ].where((e) => e != null).toList(), + ), + padding: EdgeInsets.symmetric(vertical: 8), + ) + : null), + ].where((e) => e != null).toList(), + ), + height: 60, ), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(10), - boxShadow: wsBoxShadow(), + Flexible( + fit: FlexFit.tight, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(10), + boxShadow: wsBoxShadow(), + ), + padding: EdgeInsets.all(8), + child: (activeTab ?? tabBillingDetails())), ), - padding: EdgeInsets.all(8), - ), - height: - (constraints.maxHeight - constraints.minHeight) * 0.62, + ], ), - Column( + ), + Container( + height: 160, + child: Column( children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -589,7 +263,7 @@ class _CheckoutDetailsPageState extends State { style: Theme.of(context).primaryTextTheme.bodyText2, ), Checkbox( - value: _valDifferentShippingAddress, + value: _hasDifferentShippingAddress, onChanged: _onChangeShipping, ) ], @@ -617,8 +291,8 @@ class _CheckoutDetailsPageState extends State { action: () => _useDetailsTapped()), ], ), - ], - ), + ), + ], ), ), ), @@ -626,96 +300,119 @@ class _CheckoutDetailsPageState extends State { } _useDetailsTapped() { - CustomerAddress customerBillingAddress = new CustomerAddress(); - customerBillingAddress.firstName = _txtBillingFirstName.text; - customerBillingAddress.lastName = _txtBillingLastName.text; - customerBillingAddress.addressLine = _txtBillingAddressLine.text; - customerBillingAddress.city = _txtBillingCity.text; - customerBillingAddress.postalCode = _txtBillingPostalCode.text; - customerBillingAddress.state = _strBillingState; - customerBillingAddress.country = _strBillingCountry; - customerBillingAddress.emailAddress = _txtBillingEmailAddress.text; + CustomerAddress customerBillingAddress = _setCustomerAddress( + firstName: _txtBillingFirstName.text, + lastName: _txtBillingLastName.text, + addressLine: _txtBillingAddressLine.text, + city: _txtBillingCity.text, + postalCode: _txtBillingPostalCode.text, + emailAddress: _txtBillingEmailAddress.text, + customerCountry: _billingCountry); - if (!_valDifferentShippingAddress) { - CheckoutSession.getInstance.billingDetails.shippingAddress = - customerBillingAddress; + CheckoutSession.getInstance.billingDetails.shippingAddress = + customerBillingAddress; + CheckoutSession.getInstance.billingDetails.billingAddress = + customerBillingAddress; - CheckoutSession.getInstance.billingDetails.billingAddress = - customerBillingAddress; - - if (valRememberDetails == true) { - CheckoutSession.getInstance.saveBillingAddress(); - } - } else { - CustomerAddress customerShippingAddress = new CustomerAddress(); - customerShippingAddress.firstName = _txtShippingFirstName.text; - customerShippingAddress.lastName = _txtShippingLastName.text; - customerShippingAddress.addressLine = _txtShippingAddressLine.text; - customerShippingAddress.city = _txtShippingCity.text; - customerShippingAddress.postalCode = _txtShippingPostalCode.text; - customerShippingAddress.state = _strShippingState; - customerShippingAddress.country = _strShippingCountry; - customerShippingAddress.emailAddress = _txtShippingEmailAddress.text; + if (_hasDifferentShippingAddress == true) { + CustomerAddress customerShippingAddress = _setCustomerAddress( + firstName: _txtShippingFirstName.text, + lastName: _txtShippingLastName.text, + addressLine: _txtShippingAddressLine.text, + city: _txtShippingCity.text, + postalCode: _txtShippingPostalCode.text, + emailAddress: _txtShippingEmailAddress.text, + customerCountry: _shippingCountry); if (customerShippingAddress.hasMissingFields()) { - showEdgeAlertWith(context, - title: trans(context, "Oops"), - desc: trans( - context, - trans(context, - "Invalid shipping address, please check your shipping details"), - ), - style: EdgeAlertStyle.WARNING); + showEdgeAlertWith( + context, + title: trans(context, "Oops"), + desc: trans( + context, + trans(context, + "Invalid shipping address, please check your shipping details"), + ), + style: EdgeAlertStyle.WARNING, + ); return; } - CheckoutSession.getInstance.billingDetails.billingAddress = - customerBillingAddress; - CheckoutSession.getInstance.billingDetails.shippingAddress = customerShippingAddress; - - if (valRememberDetails == true) { - CheckoutSession.getInstance.saveBillingAddress(); - CheckoutSession.getInstance.saveShippingAddress(); - } } - CheckoutSession.getInstance.billingDetails.rememberDetails = - valRememberDetails; - - if (valRememberDetails != true) { + if (valRememberDetails == true) { + CheckoutSession.getInstance.saveBillingAddress(); + CheckoutSession.getInstance.saveShippingAddress(); + } else { CheckoutSession.getInstance.clearBillingAddress(); CheckoutSession.getInstance.clearShippingAddress(); } + CheckoutSession.getInstance.billingDetails.rememberDetails = + valRememberDetails; CheckoutSession.getInstance.shipToDifferentAddress = - _valDifferentShippingAddress; + _hasDifferentShippingAddress; CheckoutSession.getInstance.shippingType = null; Navigator.pop(context); } _onChangeShipping(bool value) async { - _valDifferentShippingAddress = value; + _hasDifferentShippingAddress = value; activeTabIndex = 1; - if (value == true) { - activeTab = tabShippingDetails(); - } else { - activeTab = tabBillingDetails(); - } + activeTab = value == true ? tabShippingDetails() : tabBillingDetails(); + CustomerAddress sfCustomerShippingAddress = await CheckoutSession.getInstance.getShippingAddress(); if (sfCustomerShippingAddress == null) { - _txtShippingFirstName.text = ""; - _txtShippingLastName.text = ""; - _txtShippingAddressLine.text = ""; - _txtShippingCity.text = ""; - _txtShippingPostalCode.text = ""; - _txtShippingEmailAddress.text = ""; - _strShippingState = ""; - _strShippingCountry = ""; + _setFields( + firstName: "", + lastName: "", + addressLine: "", + city: "", + postalCode: "", + emailAddress: "", + customerCountry: new CustomerCountry()); } setState(() {}); } + + CustomerAddress _setCustomerAddress( + {@required String firstName, + @required String lastName, + @required String addressLine, + @required String city, + @required String postalCode, + @required String emailAddress, + @required CustomerCountry customerCountry}) { + CustomerAddress customerShippingAddress = new CustomerAddress(); + customerShippingAddress.firstName = firstName; + customerShippingAddress.lastName = lastName; + customerShippingAddress.addressLine = addressLine; + customerShippingAddress.city = city; + customerShippingAddress.postalCode = postalCode; + customerShippingAddress.customerCountry = customerCountry; + customerShippingAddress.emailAddress = emailAddress; + return customerShippingAddress; + } + + _navigateToSelectCountry({String type}) { + Navigator.pushNamed(context, "/customer-countries").then((value) { + if (value == null || type == null) { + return; + } + if (type == "billing") { + _billingCountry = + CustomerCountry.fromDefaultShipping(defaultShipping: value); + activeTab = tabBillingDetails(); + } else if (type == "shipping") { + _shippingCountry = + CustomerCountry.fromDefaultShipping(defaultShipping: value); + activeTab = tabShippingDetails(); + } + setState(() {}); + }); + } } diff --git a/LabelStoreMax/lib/pages/checkout_payment_type.dart b/LabelStoreMax/lib/pages/checkout_payment_type.dart index 95316c0..205b45b 100644 --- a/LabelStoreMax/lib/pages/checkout_payment_type.dart +++ b/LabelStoreMax/lib/pages/checkout_payment_type.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/checkout_shipping_type.dart b/LabelStoreMax/lib/pages/checkout_shipping_type.dart index d511cb7..d2eb70d 100644 --- a/LabelStoreMax/lib/pages/checkout_shipping_type.dart +++ b/LabelStoreMax/lib/pages/checkout_shipping_type.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -9,18 +9,17 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import 'package:flutter/material.dart'; -import 'package:label_storemax/app_state_options.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/models/cart.dart'; import 'package:label_storemax/models/cart_line_item.dart'; import 'package:label_storemax/models/checkout_session.dart'; import 'package:label_storemax/models/customer_address.dart'; +import 'package:label_storemax/models/customer_country.dart'; import 'package:label_storemax/models/shipping_type.dart'; import 'package:label_storemax/widgets/app_loader.dart'; import 'package:label_storemax/widgets/buttons.dart'; import 'package:label_storemax/widgets/woosignal_ui.dart'; import 'package:woosignal/models/response/shipping_method.dart'; -import 'package:label_storemax/app_country_options.dart'; class CheckoutShippingTypePage extends StatefulWidget { CheckoutShippingTypePage(); @@ -33,8 +32,7 @@ class CheckoutShippingTypePage extends StatefulWidget { class _CheckoutShippingTypePageState extends State { _CheckoutShippingTypePageState(); - bool _isShippingSupported; - bool _isLoading; + bool _isShippingSupported, _isLoading; List> _wsShippingOptions; WSShipping _shipping; @@ -52,29 +50,47 @@ class _CheckoutShippingTypePageState extends State { _getShippingMethods() async { List wsShipping = await appWooSignal((api) => api.getShippingMethods()); + CustomerAddress customerAddress = CheckoutSession.getInstance.billingDetails.shippingAddress; String postalCode = customerAddress.postalCode; - String country = customerAddress.country; - String state = customerAddress.state; + CustomerCountry customerCountry = customerAddress.customerCountry; - String countryCode = appCountryOptions - .firstWhere((c) => c['name'] == country, orElse: () => null)["code"]; - - Map stateMap = appStateOptions - .firstWhere((c) => c['name'] == state, orElse: () => null); + if (customerCountry == null) { + setState(() { + _isLoading = false; + }); + return; + } for (final shipping in wsShipping) { if (shipping.locations == null) { continue; } + Locations location = shipping.locations.firstWhere( - (ws) => (ws.type == "state" && - stateMap != null && - stateMap["code"] != null && - ws.code == "$countryCode:" + stateMap["code"] || - ws.code == postalCode || - ws.code == countryCode), + (ws) { + if (customerCountry.countryCode == null || ws.code == null) { + return false; + } + + if (ws.type == "state") { + if (customerCountry.state != null && + (customerCountry.state?.code ?? "") != "") { + return ws.code == customerCountry.state.code; + } + } + + if (ws.type == "postcode" && ws.code == postalCode) { + return true; + } + + if (ws.type == "country" && ws.code == customerCountry.countryCode) { + return true; + } + + return false; + }, orElse: () => null, ); diff --git a/LabelStoreMax/lib/pages/checkout_status.dart b/LabelStoreMax/lib/pages/checkout_status.dart index 0d16162..0fe4870 100644 --- a/LabelStoreMax/lib/pages/checkout_status.dart +++ b/LabelStoreMax/lib/pages/checkout_status.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/customer_countries.dart b/LabelStoreMax/lib/pages/customer_countries.dart new file mode 100644 index 0000000..67f8044 --- /dev/null +++ b/LabelStoreMax/lib/pages/customer_countries.dart @@ -0,0 +1,179 @@ +// Label StoreMAX +// +// Created by Anthony Gordon. +// 2021, WooSignal Ltd. All rights reserved. +// + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +import 'package:flutter/material.dart'; +import 'package:label_storemax/helpers/tools.dart'; +import 'package:label_storemax/models/default_shipping.dart'; +import 'package:label_storemax/widgets/woosignal_ui.dart'; + +class CustomerCountriesPage extends StatefulWidget { + CustomerCountriesPage(); + + @override + _CustomerCountriesPageState createState() => _CustomerCountriesPageState(); +} + +class _CustomerCountriesPageState extends State { + _CustomerCountriesPageState(); + + List _defaultShipping = [], _activeShippingResults = []; + TextEditingController _tfSearchCountry; + + @override + void initState() { + super.initState(); + _tfSearchCountry = TextEditingController(); + _getDefaultShipping(); + } + + _getDefaultShipping() async { + _defaultShipping = await getDefaultShipping(context); + _activeShippingResults = _defaultShipping; + setState(() {}); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomPadding: false, + appBar: AppBar( + backgroundColor: Colors.transparent, + title: Text( + trans(context, "Select a country"), + style: Theme.of(context).primaryTextTheme.headline6, + ), + centerTitle: true, + ), + body: SafeArea( + minimum: safeAreaDefault(), + child: Column( + children: [ + Container( + padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), + margin: EdgeInsets.only(bottom: 10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(18), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 2, + blurRadius: 3, + offset: Offset(0, 2), // changes position of shadow + ), + ], + ), + height: 60, + child: Row( + children: [ + Container( + height: 50, + margin: EdgeInsets.symmetric(horizontal: 4), + padding: EdgeInsets.only(right: 8), + child: Icon(Icons.search), + ), + Expanded( + child: TextField( + controller: _tfSearchCountry, + autofocus: true, + onChanged: _handleOnChanged, + decoration: InputDecoration( + border: InputBorder.none, + ), + ), + ), + ], + ), + ), + Expanded( + child: ListView.builder( + itemBuilder: (cxt, i) { + DefaultShipping defaultShipping = _activeShippingResults[i]; + return InkWell( + onTap: () => _handleCountryTapped(defaultShipping), + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey[200])), + margin: EdgeInsets.symmetric(vertical: 4), + padding: + EdgeInsets.symmetric(vertical: 16, horizontal: 8), + child: Text(defaultShipping.country), + ), + ); + }, + itemCount: _activeShippingResults.length), + ), + ], + ), + ), + ); + } + + _handleOnChanged(String value) { + _activeShippingResults = _defaultShipping + .where((element) => + element.country.toLowerCase().contains(value.toLowerCase())) + .toList(); + setState(() {}); + } + + _handleCountryTapped(DefaultShipping defaultShipping) { + if (defaultShipping.states.length > 0) { + _handleStates(defaultShipping); + return; + } + _popWithShippingResult(defaultShipping); + } + + _handleStates(DefaultShipping defaultShipping) { + FocusScope.of(context).unfocus(); + wsModalBottom( + context, + title: trans(context, "Select a state"), + bodyWidget: ListView.separated( + itemCount: defaultShipping.states.length, + itemBuilder: (BuildContext context, int index) { + DefaultShippingState state = defaultShipping.states[index]; + + return InkWell( + child: Container( + child: Text( + state.name, + style: Theme.of(context).primaryTextTheme.bodyText1, + ), + padding: EdgeInsets.only(top: 25, bottom: 25), + ), + splashColor: Colors.grey, + highlightColor: Colors.black12, + onTap: () { + Navigator.pop(context); + _popWithShippingResult(defaultShipping, state: state); + }, + ); + }, + separatorBuilder: (cxt, i) => Divider( + height: 0, + color: Colors.black12, + ), + ), + ); + } + + _popWithShippingResult(DefaultShipping defaultShipping, + {DefaultShippingState state}) { + if (state != null) { + defaultShipping.states = []; + defaultShipping.states.add(state); + } + Navigator.pop(context, defaultShipping); + } +} diff --git a/LabelStoreMax/lib/pages/error_page.dart b/LabelStoreMax/lib/pages/error_page.dart index 510f752..29ce555 100644 --- a/LabelStoreMax/lib/pages/error_page.dart +++ b/LabelStoreMax/lib/pages/error_page.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/home.dart b/LabelStoreMax/lib/pages/home.dart index 9ef8a45..0c7231d 100644 --- a/LabelStoreMax/lib/pages/home.dart +++ b/LabelStoreMax/lib/pages/home.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -35,9 +35,7 @@ class _HomePageState extends State { final GlobalKey _key = GlobalKey(); int _page; - bool _shouldStopRequests; - bool waitForNextRequest; - bool _isLoading; + bool _shouldStopRequests, waitForNextRequest, _isLoading; @override void initState() { diff --git a/LabelStoreMax/lib/pages/home_menu.dart b/LabelStoreMax/lib/pages/home_menu.dart index 442a65b..2614e91 100644 --- a/LabelStoreMax/lib/pages/home_menu.dart +++ b/LabelStoreMax/lib/pages/home_menu.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/home_search.dart b/LabelStoreMax/lib/pages/home_search.dart index 13cf4a7..c738e9c 100644 --- a/LabelStoreMax/lib/pages/home_search.dart +++ b/LabelStoreMax/lib/pages/home_search.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/pages/product_detail.dart b/LabelStoreMax/lib/pages/product_detail.dart index b208e43..a70fed0 100644 --- a/LabelStoreMax/lib/pages/product_detail.dart +++ b/LabelStoreMax/lib/pages/product_detail.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -17,6 +17,7 @@ import 'package:label_storemax/models/cart_line_item.dart'; import 'package:label_storemax/widgets/app_loader.dart'; import 'package:label_storemax/widgets/buttons.dart'; import 'package:label_storemax/widgets/cart_icon.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:woosignal/models/response/product_variation.dart' as WS; import 'package:woosignal/models/response/products.dart' as WSProduct; import 'package:flutter_swiper/flutter_swiper.dart'; @@ -462,41 +463,45 @@ class _ProductDetailState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - trans(context, "Quantity"), - style: - Theme.of(context).primaryTextTheme.bodyText1, - ), - Row( - children: [ - IconButton( - icon: Icon( - Icons.remove_circle_outline, - size: 28, + (_product.type != "external" + ? Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text( + trans(context, "Quantity"), + style: Theme.of(context) + .primaryTextTheme + .bodyText1, ), - onPressed: _removeQuantityTapped, - ), - Text( - _quantityIndicator.toString(), - style: Theme.of(context) - .primaryTextTheme - .bodyText1, - ), - IconButton( - icon: Icon( - Icons.add_circle_outline, - size: 28, - ), - onPressed: _addQuantityTapped, - ), - ], - ) - ], - ), + Row( + children: [ + IconButton( + icon: Icon( + Icons.remove_circle_outline, + size: 28, + ), + onPressed: _removeQuantityTapped, + ), + Text( + _quantityIndicator.toString(), + style: Theme.of(context) + .primaryTextTheme + .bodyText1, + ), + IconButton( + icon: Icon( + Icons.add_circle_outline, + size: 28, + ), + onPressed: _addQuantityTapped, + ), + ], + ) + ], + ) + : null), Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -515,16 +520,24 @@ class _ProductDetailState extends State { ), alignment: Alignment.centerLeft, )), - Flexible( - child: wsPrimaryButton( - context, - title: trans(context, "Add to cart"), - action: () => _addItemToCart(), - ), - ), + _product.type == "external" + ? Flexible( + child: wsPrimaryButton( + context, + title: trans(context, "Buy Product"), + action: () => _viewExternalProduct(), + ), + ) + : Flexible( + child: wsPrimaryButton( + context, + title: trans(context, "Add to cart"), + action: () => _addItemToCart(), + ), + ), ], ), - ], + ].where((e) => e != null).toList(), ), height: 140, ), @@ -600,4 +613,11 @@ class _ProductDetailState extends State { }); } } + + _viewExternalProduct() { + if (_product.externalUrl != null && _product.externalUrl.isNotEmpty) { + // launch(_product.externalUrl); + openBrowserTab(url: _product.externalUrl); + } + } } diff --git a/LabelStoreMax/lib/pages/product_image_viewer_page.dart b/LabelStoreMax/lib/pages/product_image_viewer_page.dart index de2f648..ad90461 100644 --- a/LabelStoreMax/lib/pages/product_image_viewer_page.dart +++ b/LabelStoreMax/lib/pages/product_image_viewer_page.dart @@ -2,7 +2,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/providers/cash_on_delivery.dart b/LabelStoreMax/lib/providers/cash_on_delivery.dart index 6dedaad..26c0d95 100644 --- a/LabelStoreMax/lib/providers/cash_on_delivery.dart +++ b/LabelStoreMax/lib/providers/cash_on_delivery.dart @@ -3,7 +3,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -14,8 +14,6 @@ import 'package:flutter/widgets.dart'; import 'package:label_storemax/helpers/data/order_wc.dart'; import 'package:label_storemax/helpers/tools.dart'; -import 'package:label_storemax/models/cart.dart'; -import 'package:label_storemax/models/checkout_session.dart'; import 'package:label_storemax/pages/checkout_confirmation.dart'; import 'package:woosignal/models/payload/order_wc.dart'; import 'package:woosignal/models/response/order.dart'; diff --git a/LabelStoreMax/lib/providers/example_pay.dart b/LabelStoreMax/lib/providers/example_pay.dart index 8cb03b4..5914651 100644 --- a/LabelStoreMax/lib/providers/example_pay.dart +++ b/LabelStoreMax/lib/providers/example_pay.dart @@ -3,7 +3,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/providers/razor_pay.dart b/LabelStoreMax/lib/providers/razor_pay.dart index 5bfb4d2..9b184ea 100644 --- a/LabelStoreMax/lib/providers/razor_pay.dart +++ b/LabelStoreMax/lib/providers/razor_pay.dart @@ -3,7 +3,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/providers/stripe_pay.dart b/LabelStoreMax/lib/providers/stripe_pay.dart index cb7ecee..87b3bc8 100644 --- a/LabelStoreMax/lib/providers/stripe_pay.dart +++ b/LabelStoreMax/lib/providers/stripe_pay.dart @@ -3,7 +3,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -16,8 +16,6 @@ import 'package:flutter/material.dart'; import 'package:label_storemax/helpers/data/order_wc.dart'; import 'package:label_storemax/helpers/tools.dart'; import 'package:label_storemax/labelconfig.dart'; -import 'package:label_storemax/models/cart.dart'; -import 'package:label_storemax/models/checkout_session.dart'; import 'package:label_storemax/pages/checkout_confirmation.dart'; import 'package:woosignal/models/payload/order_wc.dart'; import 'package:woosignal/models/response/order.dart'; @@ -44,7 +42,8 @@ stripePay(context, "line1": billingDetails.shippingAddress.addressLine, "city": billingDetails.shippingAddress.city, "postal_code": billingDetails.shippingAddress.postalCode, - "country": billingDetails.shippingAddress.country + "country": + (billingDetails.shippingAddress?.customerCountry?.name ?? "") }; String cartShortDesc = await cart.cartShortDesc(); @@ -108,11 +107,13 @@ stripePay(context, state.reloadState(showLoader: false); } } catch (ex) { - showEdgeAlertWith(context, - title: trans(context, "Oops!"), - desc: trans(context, "Something went wrong, please try again."), - icon: Icons.payment, - style: EdgeAlertStyle.WARNING); + showEdgeAlertWith( + context, + title: trans(context, "Oops!"), + desc: trans(context, "Something went wrong, please try again."), + icon: Icons.payment, + style: EdgeAlertStyle.WARNING, + ); state.reloadState(showLoader: false); } } diff --git a/LabelStoreMax/lib/widgets/app_loader.dart b/LabelStoreMax/lib/widgets/app_loader.dart index 0bedd41..d9ccc2d 100644 --- a/LabelStoreMax/lib/widgets/app_loader.dart +++ b/LabelStoreMax/lib/widgets/app_loader.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/widgets/buttons.dart b/LabelStoreMax/lib/widgets/buttons.dart index 495118f..b7e0408 100644 --- a/LabelStoreMax/lib/widgets/buttons.dart +++ b/LabelStoreMax/lib/widgets/buttons.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -22,6 +22,8 @@ Widget wsPrimaryButton(BuildContext context, child: Text( title, style: Theme.of(context).primaryTextTheme.button.copyWith(fontSize: 16), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), onPressed: action ?? null, elevation: 0, @@ -41,6 +43,8 @@ Widget wsSecondaryButton(BuildContext context, color: Colors.black87, ), textAlign: TextAlign.center, + maxLines: 2, + overflow: TextOverflow.ellipsis, ), onPressed: action, color: HexColor("#f6f6f9"), @@ -60,6 +64,8 @@ Widget wsLinkButton(BuildContext context, title, style: Theme.of(context).primaryTextTheme.bodyText1, textAlign: TextAlign.left, + maxLines: 2, + overflow: TextOverflow.ellipsis, ), onPressed: action, elevation: 0, diff --git a/LabelStoreMax/lib/widgets/cart_icon.dart b/LabelStoreMax/lib/widgets/cart_icon.dart index fe49c8e..ce475ac 100644 --- a/LabelStoreMax/lib/widgets/cart_icon.dart +++ b/LabelStoreMax/lib/widgets/cart_icon.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software @@ -26,29 +26,30 @@ Widget wsCartIcon(BuildContext context, {Key key}) { ), bottom: 0), Positioned.fill( - child: Align( - child: FutureBuilder>( - future: Cart.getInstance.getCart(), - builder: (BuildContext context, - AsyncSnapshot> snapshot) { - switch (snapshot.connectionState) { - case ConnectionState.waiting: + child: Align( + child: FutureBuilder>( + future: Cart.getInstance.getCart(), + builder: (BuildContext context, + AsyncSnapshot> snapshot) { + switch (snapshot.connectionState) { + case ConnectionState.waiting: + return Text(""); + default: + if (snapshot.hasError) return Text(""); - default: - if (snapshot.hasError) - return Text(""); - else - return new Text( - snapshot.data.length.toString(), - style: Theme.of(context).primaryTextTheme.bodyText1, - textAlign: TextAlign.center, - ); - } - }, - ), - alignment: Alignment.topCenter, + else + return new Text( + snapshot.data.length.toString(), + style: Theme.of(context).primaryTextTheme.bodyText1, + textAlign: TextAlign.center, + ); + } + }, ), - top: 0) + alignment: Alignment.topCenter, + ), + top: 0, + ) ], ), onPressed: () => Navigator.pushNamed(context, "/cart") diff --git a/LabelStoreMax/lib/widgets/customer_address_input.dart b/LabelStoreMax/lib/widgets/customer_address_input.dart new file mode 100644 index 0000000..2dc093c --- /dev/null +++ b/LabelStoreMax/lib/widgets/customer_address_input.dart @@ -0,0 +1,136 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:label_storemax/helpers/tools.dart'; +import 'package:label_storemax/models/customer_country.dart'; +import 'package:label_storemax/widgets/buttons.dart'; +import 'package:label_storemax/widgets/woosignal_ui.dart'; + +class CustomerAddressInput extends StatelessWidget { + const CustomerAddressInput( + {Key key, + @required this.txtControllerFirstName, + @required this.txtControllerLastName, + @required this.txtControllerAddressLine, + @required this.txtControllerCity, + @required this.txtControllerPostalCode, + @required this.txtControllerEmailAddress, + @required this.customerCountry, + @required this.onTapCountry}) + : super(key: key); + + final TextEditingController txtControllerFirstName; + final TextEditingController txtControllerLastName; + final TextEditingController txtControllerAddressLine; + final TextEditingController txtControllerCity; + final TextEditingController txtControllerPostalCode; + final TextEditingController txtControllerEmailAddress; + final CustomerCountry customerCountry; + final Function() onTapCountry; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "First Name"), + controller: txtControllerFirstName, + shouldAutoFocus: true, + ), + ), + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Last Name"), + controller: txtControllerLastName, + ), + ), + ], + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + ), + ), + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Address Line"), + controller: txtControllerAddressLine, + ), + ), + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "City"), + controller: txtControllerCity, + ), + ), + ], + ), + ), + Flexible( + child: Row( + children: [ + Flexible( + child: wsTextEditingRow( + context, + heading: trans(context, "Postal code"), + controller: txtControllerPostalCode, + ), + ), + Flexible( + child: wsTextEditingRow(context, + heading: trans(context, "Email address"), + keyboardType: TextInputType.emailAddress, + controller: txtControllerEmailAddress), + ), + ], + ), + ), + Flexible( + child: Row( + children: [ + (customerCountry.hasState() + ? Flexible( + child: Padding( + child: wsSecondaryButton( + context, + title: (customerCountry.state != null + ? "${trans(context, "Selected")}\n${customerCountry?.state?.name ?? ""}" + : trans(context, "Select state")), + action: onTapCountry, + ), + padding: EdgeInsets.all(8), + ), + ) + : null), + Flexible( + child: Padding( + child: wsSecondaryButton( + context, + title: (customerCountry != null && + (customerCountry?.name ?? "").isNotEmpty + ? "${trans(context, "Selected")}\n${customerCountry.name}" + : trans(context, "Select country")), + action: onTapCountry, + ), + padding: EdgeInsets.all(8), + ), + ), + ].where((element) => element != null).toList(), + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + ), + ), + ].where((e) => e != null).toList(), + ); + } +} diff --git a/LabelStoreMax/lib/widgets/menu_item.dart b/LabelStoreMax/lib/widgets/menu_item.dart index b52d8ec..65283f7 100644 --- a/LabelStoreMax/lib/widgets/menu_item.dart +++ b/LabelStoreMax/lib/widgets/menu_item.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/lib/widgets/switch_address_tab.dart b/LabelStoreMax/lib/widgets/switch_address_tab.dart new file mode 100644 index 0000000..bd09dbb --- /dev/null +++ b/LabelStoreMax/lib/widgets/switch_address_tab.dart @@ -0,0 +1,50 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SwitchAddressTab extends StatelessWidget { + const SwitchAddressTab({ + Key key, + @required this.type, + @required this.title, + @required this.currentTabIndex, + @required this.onTapAction, + }) : super(key: key); + + final String type; + final String title; + final int currentTabIndex; + final Function() onTapAction; + + @override + Widget build(BuildContext context) { + bool isActive = false; + if (type == "shipping" && currentTabIndex == 1) { + isActive = true; + } + + if (type == "billing" && currentTabIndex == 0) { + isActive = true; + } + + return Flexible( + child: InkWell( + child: Container( + width: double.infinity, + child: Text( + this.title, + style: Theme.of(context).textTheme.subtitle1.copyWith( + color: isActive ? Colors.white : Colors.black, + ), + textAlign: TextAlign.center, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(4), + color: isActive ? Colors.black : Colors.white, + ), + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), + ), + onTap: onTapAction, + ), + ); + } +} diff --git a/LabelStoreMax/lib/widgets/woosignal_ui.dart b/LabelStoreMax/lib/widgets/woosignal_ui.dart index 1f06805..e849a8b 100644 --- a/LabelStoreMax/lib/widgets/woosignal_ui.dart +++ b/LabelStoreMax/lib/widgets/woosignal_ui.dart @@ -1,7 +1,7 @@ // Label StoreMAX // // Created by Anthony Gordon. -// 2020, WooSignal Ltd. All rights reserved. +// 2021, WooSignal Ltd. All rights reserved. // // Unless required by applicable law or agreed to in writing, software diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 1f62749..3fde0a2 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version 2.5.1 +# Version 2.6.0 # Homepage: https://woosignal.com # Author: Anthony Gordon # Documentation: https://woosignal.com/docs/app/ios/label-storemax @@ -81,6 +81,7 @@ flutter: - assets/images/dark_powered_by_stripe.png - assets/images/cash_on_delivery.jpeg - assets/images/razorpay.png + - assets/default_shipping.json - lang/en.json - lang/es.json - lang/fr.json diff --git a/README.md b/README.md index 18959ba..176f405 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # WooCommerce App: Label StoreMax -### Label StoreMax - v2.5.1 +### Label StoreMax - v2.6.0 [Official WooSignal WooCommerce App](https://woosignal.com)