Jump to content

No se pueden crear artículos


Terracom_Progr

Recommended Posts

He instalado una tienda nueva en la que no puedo crear un artículo desde cero. Sólo copiando/duplicando uno existente me deja crear.

El error que sale es

Unknown column 'id_country' in 'field list'<br /><br /><pre>INSERT INTO `prstshp_layered_price_index` (id_product, id_currency, id_shop, price_min, price_max, id_country) VALUES (66, 1, 1, 0, 0, 6) ON DUPLICATE KEY UPDATE id_product = id_product</pre> at classes/db/Db.php:769

 

Uncaught Exception: Unknown column 'id_country' in 'field list'<br /><br /><pre>INSERT INTO `prstshp_layered_price_index` (id_product, id_currency, id_shop, price_min, price_max, id_country) VALUES (66, 1, 1, 0, 0, 6) ON DUPLICATE KEY UPDATE id_product = id_product</pre>

¿es un problema con la versión 1.7.5.2?

Edited by gruptis (see edit history)
Link to comment
Share on other sites

Ok gracias, alguien me borró los idiomas.

Ahora el tema está en cómo reinstalar el gallego, catalán y euskera

He puesto el inglés y borrado el español para ver si al importar me restauraba estos pero no ...

Ok ya di con los ISO y los he creado

CA, ca-es

GA, ga-es

EU, eu-es

pero sigo sin poder crear los artículos

Edited by gruptis
correction (see edit history)
Link to comment
Share on other sites

Hay algo que no entiendo cuando creo nuevo

Unknown column 'id_country' in 'field list'<br /><br /><pre>INSERT INTO `prstshp_layered_price_index` (id_product, id_currency, id_shop, price_min, price_max, id_country)
VALUES (72,1,1,0,0,6),(72,3,1,0,0,6),(72,1,1,0,0,17),(72,3,1,0,0,17)
ON DUPLICATE KEY UPDATE id_product = id_product</pre>

¿Seguro que no hay un error ahí?

He mirado la tabla y no existe id_country

DbCore->displayError('INSERT INTO `prstshp_layered_price_index` (id_product, id_currency, id_shop, price_min, price_max, id_country) VALUES (72, 1, 1, 0, 0, 6),(72, 3, 1, 0, 0, 6),(72, 1, 1, 0, 0, 17),(72, 3, 1, 0, 0, 17) ON DUPLICATE KEY UPDATE id_product = id_product')in classes/db/Db.php (line 385)

 

 

Link to comment
Share on other sites

Muy buenas.

Intenta crear el campo id_country en la tabla prstshp_layered_price_index, el error que te está saliendo es que no existe. Puedes hacerlo manualmente o mediante sentencias. Realiza primero copia de seguridad de la tabla por si acaso.

`id_country` int(11) NOT NULL, y transformarla en PRIMARY KEY

Mediante sentencias. Pero primero asegúrate de que `id_product`,`id_currency`,`id_shop` son primary keys.

alter table prstshp_layered_price_index add `id_country` int(11) NOT NULL;

alter table prstshp_layered_price_index drop PRIMARY KEY, add PRIMARY KEY (`id_product`,`id_currency`,`id_shop`,`id_country`);

Un Saludo.

Link to comment
Share on other sites

No, que va. Instalación nueva y plantilla nueva. Lo que sí es verdad es que una vez tenía casi todo montado me borraron los idiomas, cosa que ya he vuelto a poner.

Queriendo ver qué pasa ahora lo único que puedo rascar es:

Entities Mapping

...

PrestaShopBundle\Entity\Tab

The association PrestaShopBundle\Entity\Tab#tabLangs refers to the owning side field PrestaShopBundle\Entity\TabLang#tab which does not exist.

...

PrestaShopBundle\Entity\TabLang

The mappings PrestaShopBundle\Entity\TabLang#id and PrestaShopBundle\Entity\Tab#tabLangs are inconsistent with each other.

 

He probado a corregir todas las tablas_lang y especialmente la tabla_tab_lang pero nada, se sigue sin poder crear desde cero productos.

Creo que si nadie sabe qué hacer borraré todo y empezaré de nuevo.

 

Edited by gruptis (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...