Insertar provincias de España en Prestashop

Si tienes una tienda online quizá te interese insertar provincias de España en Prestashop. Cuando configuramos nuestra tienda online, en Prestashop, por defecto no vienen ninguna provincia de España, para insertar provincias en Prestashop de forma rápida y sencilla lo podemos hacer mediante una consulta SQL con lo que conseguiremos tener todas las provincias de España disponibles para nuestra tienda online.

[fusion_builder_container hundred_percent=»yes» overflow=»visible»][fusion_builder_row][fusion_builder_column type=»1_1″ background_position=»left top» background_color=»» border_size=»» border_color=»» border_style=»solid» spacing=»yes» background_image=»» background_repeat=»no-repeat» padding=»» margin_top=»0px» margin_bottom=»0px» class=»» id=»» animation_type=»» animation_speed=»0.3″ animation_direction=»left» hide_on_mobile=»no» center_content=»no» min_height=»none»]

Insertar provincias de España en Prestashop
Insertar provincias de España en Prestashop

Insertar provincias de España en Prestashop

Accedemos al panel de control del distribuidor de hosting donde tenemos almacenada nuestra base de datos y buscamos el botón de phpmyadmin dentro de la Configiración de Bases de Datos SQL. Una vez  dentro de phpmyadmin  buscamos el icono de ejecutar SQL y pegamos el siguiente código:

Código SQL para insertar provincias

* Si se ha añadido alguna provincia desde el panel de prestashop, este código dará error.

INSERT INTO `ps_zone` (`id_zone`, `name`, `active`) VALUES
(9, 'Peninsula', 1),
(10, 'Canarias', 1),
(11, 'Baleares', 1),
(12, 'Ceuta y Melilla', 1);ALTER TABLE `ps_state` MODIFY `iso_code` char(5) NOT NULL;INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Álava", "ALA", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Albacete", "ALB", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Alicante", "ALC", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Almería", "ALM", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Asturias", "AST", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Ávila", "AVL", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Badajoz", "BDJ", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Islas Baleares", "BLS", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Barcelona", "BCN", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Burgos", "BUG", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Cáceres", "CCR", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Cádiz", "CAD", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Cantabria", "CNT", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Castellón", "CST", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Ceuta", "CET", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Ciudad Real", "CRE", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Córdoba", "COR", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Cuenca", "CUE", 0, 1);INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Gerona", "GIR", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Granada", "GRA", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Guadalajara", "GUA", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Guipúzcoa", "GIZ", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Huelva", "HUV", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Huesca", "HUS", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Jaén", "JAN", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "La Coruña", "COR", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "La Rioja", "LRJ", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Las Palmas", "LPS", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "León", "LEO", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Lérida", "LER", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Lugo", "LUG", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Madrid", "MAD", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Málaga", "MAG", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Melilla", "MEL", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Murcia", "MUR", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Navarra", "NAV", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Orense", "ORE", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Palencia", "ESP", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Pontevedra", "PNT", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Salamanca", "SAL", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Santa Cruz de Tenerife", "STF", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Segovia", "SGV", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Sevilla", "SEV", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Soria", "SOR", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Tarragona", "TAR", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Teruel", "TER", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Toledo", "TOL", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Valencia", "VLN", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Valladolid", "VAL", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Vizcaya", "VIZ", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Zamora", "ZAM", 0, 1);

INSERT INTO ps_state (id_country, id_zone, name, iso_code, tax_behavior, active)
VALUES (6, 1, "Zaragoza", "ZAG", 0, 1);

Una vez ejecutado el SQL, vamos al panel de prestashop y en la pestaña Transporte, seleccionamos Paises y editamos España:

editar paises

editar españa

Y dentro de esta pestaña marcamos que España tiene estados:

estados
Fuente[/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]


Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *