jorge Posted November 3, 2014 Share Posted November 3, 2014 Hola buenas. Tengo la versión 1.5.4.1 y cuando duplico un producto me salta el siguiente error: Duplicate entry '402-5' for key 'PRIMARY' INSERT INTO `ps_product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES (402, 5, 0.1) Dejo una captura de pantalla. ok Si me pueden ayuda ok, saludos y gracias. 1 Link to comment Share on other sites More sharing options...
rafaelamargo Posted November 3, 2014 Share Posted November 3, 2014 (edited) 1º Resultado en google sobre tu error me da este enlace: http://forge.prestashop.com/browse/PSCFV-9138 Ese enlace me lleva a esta especie de parche: https://github.com/PrestaShop/PrestaShop/commit/ca9f2c945935ebb4b4ec9a492aecb940a5d834e2 El enlace dice editar: /classes/GroupReduction.php Cambiar: $query = 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; $query .= '('.(int)$id_product.', '.(int)$row['id_group'].', '.(float)$row['reduction'].')'; po $query .= 'INSERT INTO `'._DB_PREFIX_.'product_group_reduction_cache` (`id_product`, `id_group`, `reduction`) VALUES '; $query .= '('.(int)$id_product.', '.(int)$row['id_group'].', '.(float)$row['reduction'].') ON DUPLICATE KEY UPDATE `reduction` = '.(float)$row['reduction'].';'; Suerte.... Espero que funcione.... Edited November 3, 2014 by rafaelamargo (see edit history) 1 Link to comment Share on other sites More sharing options...
jorge Posted November 3, 2014 Author Share Posted November 3, 2014 Ok, ya me funciona jeje, muchas gracias Link to comment Share on other sites More sharing options...
rafaelamargo Posted November 4, 2014 Share Posted November 4, 2014 Ok, ya me funciona jeje, muchas gracias Creo que ahora tienes que agregar la palabra "Solucionado": http://www.prestashop.com/forums/topic/269515-solucionado-%C2%BFcomo-poner-la-palabra-solucionado-en-el-titulo-del-tema/ al título del tema. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now