SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'

PerguntasCategoria: MagentoSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY'
marcelo perguntado 2 meses

olá ao adicionar um produto no carrinho está ocorrendo seguinte erro:
2017-10-05T13:21:40+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key ‘PRIMARY’, query was: INSERT INTO `sales_flat_quote_item` (`quote_id`, `created_at`, `updated_at`, `product_id`, `store_id`, `is_virtual`, `sku`, `name`, `applied_rule_ids`, `free_shipping`, `is_qty_decimal`, `weight`, `qty`, `price`, `base_price`, `discount_percent`, `discount_amount`, `base_discount_amount`, `tax_percent`, `tax_amount`, `base_tax_amount`, `row_total`, `base_row_total`, `row_weight`, `product_type`, `base_cost`, `price_incl_tax`, `base_price_incl_tax`, `row_total_incl_tax`, `base_row_total_incl_tax`, `hidden_tax_amount`, `base_hidden_tax_amount`, `weee_tax_disposition`, `weee_tax_row_disposition`, `base_weee_tax_disposition`, `base_weee_tax_row_disposition`, `weee_tax_applied`, `weee_tax_applied_amount`, `weee_tax_applied_row_amount`, `base_weee_tax_applied_amount`) VALUES (?, ‘2017-10-05 13:21:40’, ‘2017-10-05 13:21:40’, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
o que pode ser?

1 respostas
Roger Mauricio Takemiya Staff respondido 2 meses

Olá amigo,
Tabela “sales_flat_quote_item” está sem a coluna auto incremental / chave primaria definida.
Faça um backup da mesma e realize um truncate.
Restaure a estrutura da tabela se necessário
Abs!