PrestaShop + Docker

テーブル ps_state_lang

以下SQLコマンドで新規に作成したテーブルにデータ挿入。PREFIXは任意。

INSERT INTO `PREFIX_state_lang` (`id_state`, `id_lang`, `name`) VALUES
('1', '1', 'AA'),
('1', '2', 'AA'),
('2', '1', 'AE'),
('2', '2', 'AE'),
('3', '1', 'AP'),
('3', '2', 'AP'),
('4', '1', 'Alabama'),
('4', '2', 'Alabama'),
('5', '1', 'Alaska'),
('5', '2', 'Alaska'),
('6', '1', 'Arizona'),
('6', '2', 'Arizona'),
('7', '1', 'Arkansas'),
('7', '2', 'Arkansas'),
('8', '1', 'California'),
('8', '2', 'California'),
('9', '1', 'Colorado'),
('9', '2', 'Colorado'),
('10', '1', 'Connecticut'),
('10', '2', 'Connecticut'),
('11', '1', 'Delaware'),
('11', '2', 'Delaware'),
('12', '1', 'Florida'),
('12', '2', 'Florida'),
('13', '1', 'Georgia'),
('13', '2', 'Georgia'),
('14', '1', 'Hawaii'),
('14', '2', 'Hawaii'),
('15', '1', 'Idaho'),
('15', '2', 'Idaho'),
('16', '1', 'Illinois'),
('16', '2', 'Illinois'),
('17', '1', 'Indiana'),
('17', '2', 'Indiana'),
('18', '1', 'Iowa'),
('18', '2', 'Iowa'),
('19', '1', 'Kansas'),
('19', '2', 'Kansas'),
('20', '1', 'Kentucky'),
('20', '2', 'Kentucky'),
('21', '1', 'Louisiana'),
('21', '2', 'Louisiana'),
('22', '1', 'Maine'),
('22', '2', 'Maine'),
('23', '1', 'Maryland'),
('23', '2', 'Maryland'),
('24', '1', 'Massachusetts'),
('24', '2', 'Massachusetts'),
('25', '1', 'Michigan'),
('25', '2', 'Michigan'),
('26', '1', 'Minnesota'),
('26', '2', 'Minnesota'),
('27', '1', 'Mississippi'),
('27', '2', 'Mississippi'),
('28', '1', 'Missouri'),
('28', '2', 'Missouri'),
('29', '1', 'Montana'),
('29', '2', 'Montana'),
('30', '1', 'Nebraska'),
('30', '2', 'Nebraska'),
('31', '1', 'Nevada'),
('31', '2', 'Nevada'),
('32', '1', 'New Hampshire'),
('32', '2', 'New Hampshire'),
('33', '1', 'New Jersey'),
('33', '2', 'New Jersey'),
('34', '1', 'New Mexico'),
('34', '2', 'New Mexico'),
('35', '1', 'New York'),
('35', '2', 'New York'),
('36', '1', 'North Carolina'),
('36', '2', 'North Carolina'),
('37', '1', 'North Dakota'),
('37', '2', 'North Dakota'),
('38', '1', 'Ohio'),
('38', '2', 'Ohio'),
('39', '1', 'Oklahoma'),
('39', '2', 'Oklahoma'),
('40', '1', 'Oregon'),
('40', '2', 'Oregon'),
('41', '1', 'Pennsylvania'),
('41', '2', 'Pennsylvania'),
('42', '1', 'Rhode Island'),
('42', '2', 'Rhode Island'),
('43', '1', 'South Carolina'),
('43', '2', 'South Carolina'),
('44', '1', 'South Dakota'),
('44', '2', 'South Dakota'),
('45', '1', 'Tennessee'),
('45', '2', 'Tennessee'),
('46', '1', 'Texas'),
('46', '2', 'Texas'),
('47', '1', 'Utah'),
('47', '2', 'Utah'),
('48', '1', 'Vermont'),
('48', '2', 'Vermont'),
('49', '1', 'Virginia'),
('49', '2', 'Virginia'),
('50', '1', 'Washington'),
('50', '2', 'Washington'),
('51', '1', 'West Virginia'),
('51', '2', 'West Virginia'),
('52', '1', 'Wisconsin'),
('52', '2', 'Wisconsin'),
('53', '1', 'Wyoming'),
('53', '2', 'Wyoming'),
('54', '1', 'Puerto Rico'),
('54', '2', 'Puerto Rico'),
('55', '1', 'US Virgin Islands'),
('55', '2', 'US Virgin Islands'),
('56', '1', 'District of Columbia'),
('56', '2', 'District of Columbia'),
('57', '1', 'Aguascalientes'),
('57', '2', 'Aguascalientes'),
('58', '1', 'Baja California'),
('58', '2', 'Baja California'),
('59', '1', 'Baja California Sur'),
('59', '2', 'Baja California Sur'),
('60', '1', 'Campeche'),
('60', '2', 'Campeche'),
('61', '1', 'Chiapas'),
('61', '2', 'Chiapas'),
('62', '1', 'Chihuahua'),
('62', '2', 'Chihuahua'),
('63', '1', 'Coahuila'),
('63', '2', 'Coahuila'),
('64', '1', 'Colima'),
('64', '2', 'Colima'),
('65', '1', 'Ciudad de México'),
('65', '2', 'Ciudad de México'),
('66', '1', 'Durango'),
('66', '2', 'Durango'),
('67', '1', 'Guanajuato'),
('67', '2', 'Guanajuato'),
('68', '1', 'Guerrero'),
('68', '2', 'Guerrero'),
('69', '1', 'Hidalgo'),
('69', '2', 'Hidalgo'),
('70', '1', 'Jalisco'),
('70', '2', 'Jalisco'),
('71', '1', 'Estado de México'),
('71', '2', 'Estado de México'),
('72', '1', 'Michoacán'),
('72', '2', 'Michoacán'),
('73', '1', 'Morelos'),
('73', '2', 'Morelos'),
('74', '1', 'Nayarit'),
('74', '2', 'Nayarit'),
('75', '1', 'Nuevo León'),
('75', '2', 'Nuevo León'),
('76', '1', 'Oaxaca'),
('76', '2', 'Oaxaca'),
('77', '1', 'Puebla'),
('77', '2', 'Puebla'),
('78', '1', 'Querétaro'),
('78', '2', 'Querétaro'),
('79', '1', 'Quintana Roo'),
('79', '2', 'Quintana Roo'),
('80', '1', 'San Luis Potosí'),
('80', '2', 'San Luis Potosí'),
('81', '1', 'Sinaloa'),
('81', '2', 'Sinaloa'),
('82', '1', 'Sonora'),
('82', '2', 'Sonora'),
('83', '1', 'Tabasco'),
('83', '2', 'Tabasco'),
('84', '1', 'Tamaulipas'),
('84', '2', 'Tamaulipas'),
('85', '1', 'Tlaxcala'),
('85', '2', 'Tlaxcala'),
('86', '1', 'Veracruz'),
('86', '2', 'Veracruz'),
('87', '1', 'Yucatán'),
('87', '2', 'Yucatán'),
('88', '1', 'Zacatecas'),
('88', '2', 'Zacatecas'),
('89', '1', 'Ontario'),
('89', '2', 'Ontario'),
('90', '1', 'Quebec'),
('90', '2', 'Quebec'),
('91', '1', 'British Columbia'),
('91', '2', 'British Columbia'),
('92', '1', 'Alberta'),
('92', '2', 'Alberta'),
('93', '1', 'Manitoba'),
('93', '2', 'Manitoba'),
('94', '1', 'Saskatchewan'),
('94', '2', 'Saskatchewan'),
('95', '1', 'Nova Scotia'),
('95', '2', 'Nova Scotia'),
('96', '1', 'New Brunswick'),
('96', '2', 'New Brunswick'),
('97', '1', 'Newfoundland and Labrador'),
('97', '2', 'Newfoundland and Labrador'),
('98', '1', 'Prince Edward Island'),
('98', '2', 'Prince Edward Island'),
('99', '1', 'Northwest Territories'),
('99', '2', 'Northwest Territories'),
('100', '1', 'Yukon'),
('100', '2', 'Yukon'),
('101', '1', 'Nunavut'),
('101', '2', 'Nunavut'),
('102', '1', 'Buenos Aires'),
('102', '2', 'Buenos Aires'),
('103', '1', 'Catamarca'),
('103', '2', 'Catamarca'),
('104', '1', 'Chaco'),
('104', '2', 'Chaco'),
('105', '1', 'Chubut'),
('105', '2', 'Chubut'),
('106', '1', 'Ciudad de Buenos Aires'),
('106', '2', 'Ciudad de Buenos Aires'),
('107', '1', 'Córdoba'),
('107', '2', 'Córdoba'),
('108', '1', 'Corrientes'),
('108', '2', 'Corrientes'),
('109', '1', 'Entre Ríos'),
('109', '2', 'Entre Ríos'),
('110', '1', 'Formosa'),
('110', '2', 'Formosa'),
('111', '1', 'Jujuy'),
('111', '2', 'Jujuy'),
('112', '1', 'La Pampa'),
('112', '2', 'La Pampa'),
('113', '1', 'La Rioja'),
('113', '2', 'La Rioja'),
('114', '1', 'Mendoza'),
('114', '2', 'Mendoza'),
('115', '1', 'Misiones'),
('115', '2', 'Misiones'),
('116', '1', 'Neuquén'),
('116', '2', 'Neuquén'),
('117', '1', 'Río Negro'),
('117', '2', 'Río Negro'),
('118', '1', 'Salta'),
('118', '2', 'Salta'),
('119', '1', 'San Juan'),
('119', '2', 'San Juan'),
('120', '1', 'San Luis'),
('120', '2', 'San Luis'),
('121', '1', 'Santa Cruz'),
('121', '2', 'Santa Cruz'),
('122', '1', 'Santa Fe'),
('122', '2', 'Santa Fe'),
('123', '1', 'Santiago del Estero'),
('123', '2', 'Santiago del Estero'),
('124', '1', 'Tierra del Fuego'),
('124', '2', 'Tierra del Fuego'),
('125', '1', 'Tucumán'),
('125', '2', 'Tucumán'),
('126', '1', 'Agrigento'),
('126', '2', 'Agrigento'),
('127', '1', 'Alessandria'),
('127', '2', 'Alessandria'),
('128', '1', 'Ancona'),
('128', '2', 'Ancona'),
('129', '1', 'Aosta'),
('129', '2', 'Aosta'),
('130', '1', 'Arezzo'),
('130', '2', 'Arezzo'),
('131', '1', 'Ascoli Piceno'),
('131', '2', 'Ascoli Piceno'),
('132', '1', 'Asti'),
('132', '2', 'Asti'),
('133', '1', 'Avellino'),
('133', '2', 'Avellino'),
('134', '1', 'Bari'),
('134', '2', 'Bari'),
('135', '1', 'Barletta-Andria-Trani'),
('135', '2', 'Barletta-Andria-Trani'),
('136', '1', 'Belluno'),
('136', '2', 'Belluno'),
('137', '1', 'Benevento'),
('137', '2', 'Benevento'),
('138', '1', 'Bergamo'),
('138', '2', 'Bergamo'),
('139', '1', 'Biella'),
('139', '2', 'Biella'),
('140', '1', 'Bologna'),
('140', '2', 'Bologna'),
('141', '1', 'Bolzano'),
('141', '2', 'Bolzano'),
('142', '1', 'Brescia'),
('142', '2', 'Brescia'),
('143', '1', 'Brindisi'),
('143', '2', 'Brindisi'),
('144', '1', 'Cagliari'),
('144', '2', 'Cagliari'),
('145', '1', 'Caltanissetta'),
('145', '2', 'Caltanissetta'),
('146', '1', 'Campobasso'),
('146', '2', 'Campobasso'),
('147', '1', 'Carbonia-Iglesias'),
('147', '2', 'Carbonia-Iglesias'),
('148', '1', 'Caserta'),
('148', '2', 'Caserta'),
('149', '1', 'Catania'),
('149', '2', 'Catania'),
('150', '1', 'Catanzaro'),
('150', '2', 'Catanzaro'),
('151', '1', 'Chieti'),
('151', '2', 'Chieti'),
('152', '1', 'Como'),
('152', '2', 'Como'),
('153', '1', 'Cosenza'),
('153', '2', 'Cosenza'),
('154', '1', 'Cremona'),
('154', '2', 'Cremona'),
('155', '1', 'Crotone'),
('155', '2', 'Crotone'),
('156', '1', 'Cuneo'),
('156', '2', 'Cuneo'),
('157', '1', 'Enna'),
('157', '2', 'Enna'),
('158', '1', 'Fermo'),
('158', '2', 'Fermo'),
('159', '1', 'Ferrara'),
('159', '2', 'Ferrara'),
('160', '1', 'Firenze'),
('160', '2', 'Firenze'),
('161', '1', 'Foggia'),
('161', '2', 'Foggia'),
('162', '1', 'Forlì-Cesena'),
('162', '2', 'Forlì-Cesena'),
('163', '1', 'Frosinone'),
('163', '2', 'Frosinone'),
('164', '1', 'Genova'),
('164', '2', 'Genova'),
('165', '1', 'Gorizia'),
('165', '2', 'Gorizia'),
('166', '1', 'Grosseto'),
('166', '2', 'Grosseto'),
('167', '1', 'Imperia'),
('167', '2', 'Imperia'),
('168', '1', 'Isernia'),
('168', '2', 'Isernia'),
('169', '1', 'L\'Aquila'),
('169', '2', 'L\'Aquila'),
('170', '1', 'La Spezia'),
('170', '2', 'La Spezia'),
('171', '1', 'Latina'),
('171', '2', 'Latina'),
('172', '1', 'Lecce'),
('172', '2', 'Lecce'),
('173', '1', 'Lecco'),
('173', '2', 'Lecco'),
('174', '1', 'Livorno'),
('174', '2', 'Livorno'),
('175', '1', 'Lodi'),
('175', '2', 'Lodi'),
('176', '1', 'Lucca'),
('176', '2', 'Lucca'),
('177', '1', 'Macerata'),
('177', '2', 'Macerata'),
('178', '1', 'Mantova'),
('178', '2', 'Mantova'),
('179', '1', 'Massa'),
('179', '2', 'Massa'),
('180', '1', 'Matera'),
('180', '2', 'Matera'),
('181', '1', 'Medio Campidano'),
('181', '2', 'Medio Campidano'),
('182', '1', 'Messina'),
('182', '2', 'Messina'),
('183', '1', 'Milano'),
('183', '2', 'Milano'),
('184', '1', 'Modena'),
('184', '2', 'Modena'),
('185', '1', 'Monza e della Brianza'),
('185', '2', 'Monza e della Brianza'),
('186', '1', 'Napoli'),
('186', '2', 'Napoli'),
('187', '1', 'Novara'),
('187', '2', 'Novara'),
('188', '1', 'Nuoro'),
('188', '2', 'Nuoro'),
('189', '1', 'Ogliastra'),
('189', '2', 'Ogliastra'),
('190', '1', 'Olbia-Tempio'),
('190', '2', 'Olbia-Tempio'),
('191', '1', 'Oristano'),
('191', '2', 'Oristano'),
('192', '1', 'Padova'),
('192', '2', 'Padova'),
('193', '1', 'Palermo'),
('193', '2', 'Palermo'),
('194', '1', 'Parma'),
('194', '2', 'Parma'),
('195', '1', 'Pavia'),
('195', '2', 'Pavia'),
('196', '1', 'Perugia'),
('196', '2', 'Perugia'),
('197', '1', 'Pesaro-Urbino'),
('197', '2', 'Pesaro-Urbino'),
('198', '1', 'Pescara'),
('198', '2', 'Pescara'),
('199', '1', 'Piacenza'),
('199', '2', 'Piacenza'),
('200', '1', 'Pisa'),
('200', '2', 'Pisa'),
('201', '1', 'Pistoia'),
('201', '2', 'Pistoia'),
('202', '1', 'Pordenone'),
('202', '2', 'Pordenone'),
('203', '1', 'Potenza'),
('203', '2', 'Potenza'),
('204', '1', 'Prato'),
('204', '2', 'Prato'),
('205', '1', 'Ragusa'),
('205', '2', 'Ragusa'),
('206', '1', 'Ravenna'),
('206', '2', 'Ravenna'),
('207', '1', 'Reggio Calabria'),
('207', '2', 'Reggio Calabria'),
('208', '1', 'Reggio Emilia'),
('208', '2', 'Reggio Emilia'),
('209', '1', 'Rieti'),
('209', '2', 'Rieti'),
('210', '1', 'Rimini'),
('210', '2', 'Rimini'),
('211', '1', 'Roma'),
('211', '2', 'Roma'),
('212', '1', 'Rovigo'),
('212', '2', 'Rovigo'),
('213', '1', 'Salerno'),
('213', '2', 'Salerno'),
('214', '1', 'Sassari'),
('214', '2', 'Sassari'),
('215', '1', 'Savona'),
('215', '2', 'Savona'),
('216', '1', 'Siena'),
('216', '2', 'Siena'),
('217', '1', 'Siracusa'),
('217', '2', 'Siracusa'),
('218', '1', 'Sondrio'),
('218', '2', 'Sondrio'),
('219', '1', 'Taranto'),
('219', '2', 'Taranto'),
('220', '1', 'Teramo'),
('220', '2', 'Teramo'),
('221', '1', 'Terni'),
('221', '2', 'Terni'),
('222', '1', 'Torino'),
('222', '2', 'Torino'),
('223', '1', 'Trapani'),
('223', '2', 'Trapani'),
('224', '1', 'Trento'),
('224', '2', 'Trento'),
('225', '1', 'Treviso'),
('225', '2', 'Treviso'),
('226', '1', 'Trieste'),
('226', '2', 'Trieste'),
('227', '1', 'Udine'),
('227', '2', 'Udine'),
('228', '1', 'Varese'),
('228', '2', 'Varese'),
('229', '1', 'Venezia'),
('229', '2', 'Venezia'),
('230', '1', 'Verbano-Cusio-Ossola'),
('230', '2', 'Verbano-Cusio-Ossola'),
('231', '1', 'Vercelli'),
('231', '2', 'Vercelli'),
('232', '1', 'Verona'),
('232', '2', 'Verona'),
('233', '1', 'Vibo Valentia'),
('233', '2', 'Vibo Valentia'),
('234', '1', 'Vicenza'),
('234', '2', 'Vicenza'),
('235', '1', 'Viterbo'),
('235', '2', 'Viterbo'),
('236', '1', 'Aceh'),
('236', '2', 'Aceh'),
('237', '1', 'Bali'),
('237', '2', 'Bali'),
('238', '1', 'Banten'),
('238', '2', 'Banten'),
('239', '1', 'Bengkulu'),
('239', '2', 'Bengkulu'),
('240', '1', 'Gorontalo'),
('240', '2', 'Gorontalo'),
('241', '1', 'Jakarta'),
('241', '2', 'Jakarta'),
('242', '1', 'Jambi'),
('242', '2', 'Jambi'),
('243', '1', 'Jawa Barat'),
('243', '2', 'Jawa Barat'),
('244', '1', 'Jawa Tengah'),
('244', '2', 'Jawa Tengah'),
('245', '1', 'Jawa Timur'),
('245', '2', 'Jawa Timur'),
('246', '1', 'Kalimantan Barat'),
('246', '2', 'Kalimantan Barat'),
('247', '1', 'Kalimantan Selatan'),
('247', '2', 'Kalimantan Selatan'),
('248', '1', 'Kalimantan Tengah'),
('248', '2', 'Kalimantan Tengah'),
('249', '1', 'Kalimantan Timur'),
('249', '2', 'Kalimantan Timur'),
('250', '1', 'Kalimantan Utara'),
('250', '2', 'Kalimantan Utara'),
('251', '1', 'Kepulauan Bangka Belitug'),
('251', '2', 'Kepulauan Bangka Belitug'),
('252', '1', 'Kepulauan Riau'),
('252', '2', 'Kepulauan Riau'),
('253', '1', 'Lampung'),
('253', '2', 'Lampung'),
('254', '1', 'Maluku'),
('254', '2', 'Maluku'),
('255', '1', 'Maluku Utara'),
('255', '2', 'Maluku Utara'),
('256', '1', 'Nusa Tengara Barat'),
('256', '2', 'Nusa Tengara Barat'),
('257', '1', 'Nusa Tenggara Timur'),
('257', '2', 'Nusa Tenggara Timur'),
('258', '1', 'Papua'),
('258', '2', 'Papua'),
('259', '1', 'Papua Barat'),
('259', '2', 'Papua Barat'),
('260', '1', 'Riau'),
('260', '2', 'Riau'),
('261', '1', 'Sulawesi Barat'),
('261', '2', 'Sulawesi Barat'),
('262', '1', 'Sulawesi Selatan'),
('262', '2', 'Sulawesi Selatan'),
('263', '1', 'Sulawesi Tengah'),
('263', '2', 'Sulawesi Tengah'),
('264', '1', 'Sulawesi Tenggara'),
('264', '2', 'Sulawesi Tenggara'),
('265', '1', 'Sulawesi Utara'),
('265', '2', 'Sulawesi Utara'),
('266', '1', 'Sumatera Barat'),
('266', '2', 'Sumatera Barat'),
('267', '1', 'Sumatera Selatan'),
('267', '2', 'Sumatera Selatan'),
('268', '1', 'Sumatera Utara'),
('268', '2', 'Sumatera Utara'),
('269', '1', 'Yogyakarta'),
('269', '2', 'Yogyakarta'),
('270', '1', '愛知'),
('270', '2', 'Aichi'),
('271', '1', '秋田'),
('271', '2', 'Akita'),
('272', '1', '青森'),
('272', '2', 'Aomori'),
('273', '1', '千葉'),
('273', '2', 'Chiba'),
('274', '1', '愛媛'),
('274', '2', 'Ehime'),
('275', '1', '福井'),
('275', '2', 'Fukui'),
('276', '1', '福岡'),
('276', '2', 'Fukuoka'),
('277', '1', '福島'),
('277', '2', 'Fukushima'),
('278', '1', '岐阜'),
('278', '2', 'Gifu'),
('279', '1', '群馬'),
('279', '2', 'Gunma'),
('280', '1', '広島'),
('280', '2', 'Hiroshima'),
('281', '1', '北海道'),
('281', '2', 'Hokkaido'),
('282', '1', '兵庫'),
('282', '2', 'Hyogo'),
('283', '1', '茨城'),
('283', '2', 'Ibaraki'),
('284', '1', '石川'),
('284', '2', 'Ishikawa'),
('285', '1', '岩手'),
('285', '2', 'Iwate'),
('286', '1', '香川'),
('286', '2', 'Kagawa'),
('287', '1', '鹿児島'),
('287', '2', 'Kagoshima'),
('288', '1', '神奈川'),
('288', '2', 'Kanagawa'),
('289', '1', '高知'),
('289', '2', 'Kochi'),
('290', '1', '熊本'),
('290', '2', 'Kumamoto'),
('291', '1', '京都'),
('291', '2', 'Kyoto'),
('292', '1', '三重'),
('292', '2', 'Mie'),
('293', '1', '宮城'),
('293', '2', 'Miyagi'),
('294', '1', '宮崎'),
('294', '2', 'Miyazaki'),
('295', '1', '長野'),
('295', '2', 'Nagano'),
('296', '1', '長崎'),
('296', '2', 'Nagasaki'),
('297', '1', '奈良'),
('297', '2', 'Nara'),
('298', '1', '新潟'),
('298', '2', 'Niigata'),
('299', '1', '大分'),
('299', '2', 'Oita'),
('300', '1', '岡山'),
('300', '2', 'Okayama'),
('301', '1', '沖縄'),
('301', '2', 'Okinawa'),
('302', '1', '大阪'),
('302', '2', 'Osaka'),
('303', '1', '佐賀'),
('303', '2', 'Saga'),
('304', '1', '埼玉'),
('304', '2', 'Saitama'),
('305', '1', '滋賀'),
('305', '2', 'Shiga'),
('306', '1', '島根'),
('306', '2', 'Shimane'),
('307', '1', '静岡'),
('307', '2', 'Shizuoka'),
('308', '1', '栃木'),
('308', '2', 'Tochigi'),
('309', '1', '徳島'),
('309', '2', 'Tokushima'),
('310', '1', '東京'),
('310', '2', 'Tokyo'),
('311', '1', '鳥取'),
('311', '2', 'Tottori'),
('312', '1', '富山'),
('312', '2', 'Toyama'),
('313', '1', '和歌山'),
('313', '2', 'Wakayama'),
('314', '1', '山形'),
('314', '2', 'Yamagata'),
('315', '1', '山口'),
('315', '2', 'Yamaguchi'),
('316', '1', '山梨'),
('316', '2', 'Yamanashi'),
('317', '1', 'Australian Capital Territory'),
('317', '2', 'Australian Capital Territory'),
('318', '1', 'New South Wales'),
('318', '2', 'New South Wales'),
('319', '1', 'Northern Territory'),
('319', '2', 'Northern Territory'),
('320', '1', 'Queensland'),
('320', '2', 'Queensland'),
('321', '1', 'South Australia'),
('321', '2', 'South Australia'),
('322', '1', 'Tasmania'),
('322', '2', 'Tasmania'),
('323', '1', 'Victoria'),
('323', '2', 'Victoria'),
('324', '1', 'Western Australia'),
('324', '2', 'Western Australia'),
('325', '1', 'Andhra Pradesh'),
('325', '2', 'Andhra Pradesh'),
('326', '1', 'Arunachal Pradesh'),
('326', '2', 'Arunachal Pradesh'),
('327', '1', 'Assam'),
('327', '2', 'Assam'),
('328', '1', 'Bihar'),
('328', '2', 'Bihar'),
('329', '1', 'Chhattisgarh'),
('329', '2', 'Chhattisgarh'),
('330', '1', 'Goa'),
('330', '2', 'Goa'),
('331', '1', 'Gujarat'),
('331', '2', 'Gujarat'),
('332', '1', 'Haryana'),
('332', '2', 'Haryana'),
('333', '1', 'Himachal Pradesh'),
('333', '2', 'Himachal Pradesh'),
('334', '1', 'Jharkhand'),
('334', '2', 'Jharkhand'),
('335', '1', 'Karnataka'),
('335', '2', 'Karnataka'),
('336', '1', 'Kerala'),
('336', '2', 'Kerala'),
('337', '1', 'Madhya Pradesh'),
('337', '2', 'Madhya Pradesh'),
('338', '1', 'Maharashtra'),
('338', '2', 'Maharashtra'),
('339', '1', 'Manipur'),
('339', '2', 'Manipur'),
('340', '1', 'Meghalaya'),
('340', '2', 'Meghalaya'),
('341', '1', 'Mizoram'),
('341', '2', 'Mizoram'),
('342', '1', 'Nagaland'),
('342', '2', 'Nagaland'),
('343', '1', 'Odisha'),
('343', '2', 'Odisha'),
('344', '1', 'Punjab'),
('344', '2', 'Punjab'),
('345', '1', 'Rajasthan'),
('345', '2', 'Rajasthan'),
('346', '1', 'Sikkim'),
('346', '2', 'Sikkim'),
('347', '1', 'Tamil Nadu'),
('347', '2', 'Tamil Nadu'),
('348', '1', 'Telangana'),
('348', '2', 'Telangana'),
('349', '1', 'Tripura'),
('349', '2', 'Tripura'),
('350', '1', 'Uttar Pradesh'),
('350', '2', 'Uttar Pradesh'),
('351', '1', 'Uttarakhand'),
('351', '2', 'Uttarakhand'),
('352', '1', 'West Bengal'),
('352', '2', 'West Bengal');

These objects are always accessible through the context:

  • Language. Set with the customer or employee language.
  • Country. Default country.
  • Currency. Set with the customer currency or the shop’s default currency.
  • Shop. Current shop.
  • Cookie. Cookie instance.
  • Link. Link instance.
  • Smarty. Smarty instance.

These objects are only accessible for the customer Context:

  • Customer. Existing customer retrieved from the cookie or default customer.
  • Cart. Current cart.
  • Controller. Current controller instance.

These objects are only accessible for the administrator Context:

  • Employee. Current employee.

From inside a Controller subclass or a Module subclass, the Context should be called with this shortcut:

ex)

$this->context->language->id

From anywhere else, you can get the Context instance by calling
ex)

$context = Context::getContext();
$id_lang = $context->language->id;

コンタクトモジュール:ステート(都道府県)が設定されていない場合の処理追加(null)

modules/ps_contactinfo/ps_contactinfo.php

'state' => (!empty($address->id_state) ? (new State($address->id_state))->name[$this->context->language->id] : null),

ステート(都道府県)多言語対応

修正ファイル一覧

クラス
classes/Country.php
classes/State.php
classes/Customer.php
classes/Manufacturer.php
classes/PaymentModule.php
classes/Cart.php
classes/tax/TaxRule.php
classes/form/CustomerAddressFormatter.php

コントローラ
controllers/admin/AdminStatesController.php
controllers/admin/AdminImportController.php
controllers/admin/AdminStoresController.php
controllers/admin/AdminTaxRulesGroupController.php

その他
src/Adapter/Form/ChoiceProvider/CountryStateByIdChoiceProvider.php
src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php
src/Adapter/Order/QueryHandler/GetOrderPreviewHandler.php
tools/foreignkeyGenerator/relations.php

上記ファイルに加え、以下コンタクトモジュールの変更(前投稿記事)が必要です。
modules/ps_contactinfo/ps_contactinfo.php

Github:ステート多言語対応変更ファイル

Multilingual for “State” on Prestashop

v1.7.8.4

Good practices for developing modules

Extension concepts

Hooks

1.7.8 An unexpected error occurred.

PrestaShop\PrestaShop\Core\Domain\Category\Exception\CategoryException code 0: Invalid data for updating category root

ホームカテゴリ保存時のエラー。ホームカテゴリ名称を一度変えて保存。その後名称を元に戻して解決。原因はインストール時のホームカテゴリデータエラー。

Changed category name “Home” to “Home Page” (or somthing else) and saved without error. Then return that name to “Home”.

“Home” category has ID 2 and is_root_category = 1, id_parent = 1 in ps_category table.

サイトマップの作成

モジュール ---> gsitemap にて自動作成するphpファイルを読み込むか、サーバのクローンジョブに追加することで自動作成・上書き更新可能

インデックスサイトマップと言語毎のサイトマップが作成されるが、インデックスのサイトマップが言語毎のサイトマップとリンクしているため、Googleサイトマップにはインデックスのサイトマップのみ登録。

Github:ステート多言語対応変更ファイル

Multilingual for “State” on Prestashop

v1.7.8.7

設定 ---> 拡張パラメータ ---> インフォメーション で上書きファイル、変更ファイルを確認

:bangbang: 重大な訂正

編集した controllers, classes 内のファイルを override フォルダに格納しても上書きされません。


List of overrides

  • controllers/admin/AdminStoresController.php
  • controllers/admin/AdminTaxRulesGroupController.php
  • controllers/admin/AdminImportController.php
  • controllers/admin/AdminStatesController.php
  • classes/Cart.php
  • classes/Customer.php
  • classes/tax/TaxRule.php
  • classes/State.php
  • classes/Manufacturer.php
  • classes/form/CustomerAddressFormatter.php
  • classes/PaymentModule.php
  • classes/Country.php

List of changed files

Changed/missing files have been detected.

Updated files (15)

  • classes/Cart.php
  • classes/Country.php
  • classes/Customer.php
  • classes/State.php
  • classes/Manufacturer.php
  • classes/PaymentModule.php
  • classes/form/CustomerAddressFormatter.php
  • classes/tax/TaxRule.php
  • controllers/admin/AdminTaxRulesGroupController.php
  • controllers/admin/AdminImportController.php
  • controllers/admin/AdminStoresController.php
  • controllers/admin/AdminStatesController.php
  • src/Adapter/Form/ChoiceProvider/CountryStateByIdChoiceProvider.php
  • src/Adapter/Order/QueryHandler/GetOrderPreviewHandler.php
  • src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php

Type error: Argument 7 passed to PrestaShop\PrestaShop\Core\Domain\Order\QueryResult\OrderInvoiceAddressForViewing::__construct() must be of the type string, array given, called in /var/www/html/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php on line 330

[Symfony\Component\Debug\Exception\FatalThrowableError 0]

7番目の引数 $stateName の型エラー

以下2箇所を一時的にコメントアウト

store/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php

        return new OrderShippingAddressForViewing(
            $address->id,
            $address->firstname,
            $address->lastname,
            $address->company,
            $address->address1,
            $address->address2,
/*            $stateName,*/
            $address->city,
            $country->name[(int) $order->getAssociatedLanguage()->getId()],
            $address->postcode,
            $address->phone,
            $address->phone_mobile,
            $address->vat_number,
            $dni
        );

        return new OrderInvoiceAddressForViewing(
            $address->id,
            $address->firstname,
            $address->lastname,
            $address->company,
            $address->address1,
            $address->address2,
/*            $stateName,*/
            $address->city,
            $country->name[(int) $order->getAssociatedLanguage()->getId()],
            $address->postcode,
            $address->phone,
            $address->phone_mobile,
            $address->vat_number,
            $dni
        );

原因

PrestaShop では、多言語対応のために State クラスの name プロパティが配列として返されることがあるようです。
この場合、特定の言語の name を取得する必要があります。

修正

$state->name が配列の場合、現在の注文の言語 ID を使用して適切な name を取得するように修正。

store/src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php

/*
        if ($address->id_state) {
            $state = new State($address->id_state);

            $stateName = $state->name;
        }
*/

        if ($address->id_state) {
            $state = new State($address->id_state);
            $langId = (int) $order->getAssociatedLanguage()->getId();

            // `name` が配列の場合、現在の言語 ID に対応する値を取得
            if (is_array($state->name)) {
                $stateName = $state->name[$langId] ?? reset($state->name);
            } else {
                $stateName = $state->name;
            }
        }

データベースの肥大化解消のため、以下のテーブル内容をクリア。

  • ps_connections, ps_connections_source and ps_connections_page: This table lists all your customers’ connections to their personal areas.
  • ps_guest: This table lists all visits to your site.
  • ps_layered_filter_block: The more article categories and articles you have, the more this table will fill up.
  • ps_pagenotfound