{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3165","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3165/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3165/comments","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3165/events","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3165","id":86796064,"number":3165,"title":"[-] Installer : Fixed bug that prevents several customizations on sam…","user":{"login":"Alfakom-MK","id":8945850,"avatar_url":"https://avatars.githubusercontent.com/u/8945850?v=3","gravatar_id":"","url":"https://api.github.com/users/Alfakom-MK","html_url":"https://github.com/Alfakom-MK","followers_url":"https://api.github.com/users/Alfakom-MK/followers","following_url":"https://api.github.com/users/Alfakom-MK/following{/other_user}","gists_url":"https://api.github.com/users/Alfakom-MK/gists{/gist_id}","starred_url":"https://api.github.com/users/Alfakom-MK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alfakom-MK/subscriptions","organizations_url":"https://api.github.com/users/Alfakom-MK/orgs","repos_url":"https://api.github.com/users/Alfakom-MK/repos","events_url":"https://api.github.com/users/Alfakom-MK/events{/privacy}","received_events_url":"https://api.github.com/users/Alfakom-MK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-10T01:36:28Z","updated_at":"2015-06-17T07:38:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3165","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3165","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/3165.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/3165.patch"},"body":"…e product\r\n\r\nIn DB table _customization this line:\r\n+  UNIQUE `id_cart_product` (`id_cart`, `id_product`, `id_product_attribute`)\r\n\r\nprevents adding several different customizations to the same product. (tested on an additional custom text field) \r\n\r\nie: Company sells T-Shirts with custom printed text.\r\nCustomer orders one t-shirt with his name and another one with his brothers name.\r\nbecause 'id_cart_product' is Unique, while saving the customization of the second name he gets:\r\n\r\n[PrestaShopDatabaseException]\r\nDuplicate entry '1-1-0' for key 'id_cart_product'\r\nINSERT INTO `ps_customization` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`)\r\n\t\t\t\tVALUES (1, 1, 0, 0)\r\n\r\nclasses/cart.php:\r\n\r\n1109. \t\t\tDb::getInstance()->execute(\r\n1110. \t\t\t\t'INSERT INTO `'._DB_PREFIX_.'customization` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`)\r\n1111. \t\t\t\tVALUES ('.(int)$this->id.', '.(int)$id_product.', '.(int)$id_product_attribute.', '.(int)$quantity.')'\r\n1112. \t\t\t);\r\n1113. \t\t\t$id_customization = Db::getInstance()->Insert_ID();"},"comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments/112694696","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3165#issuecomment-112694696","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3165","id":112694696,"user":{"login":"jeromenadaud","id":4747745,"avatar_url":"https://avatars.githubusercontent.com/u/4747745?v=3","gravatar_id":"","url":"https://api.github.com/users/jeromenadaud","html_url":"https://github.com/jeromenadaud","followers_url":"https://api.github.com/users/jeromenadaud/followers","following_url":"https://api.github.com/users/jeromenadaud/following{/other_user}","gists_url":"https://api.github.com/users/jeromenadaud/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromenadaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromenadaud/subscriptions","organizations_url":"https://api.github.com/users/jeromenadaud/orgs","repos_url":"https://api.github.com/users/jeromenadaud/repos","events_url":"https://api.github.com/users/jeromenadaud/events{/privacy}","received_events_url":"https://api.github.com/users/jeromenadaud/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T07:38:04Z","updated_at":"2015-06-17T07:38:04Z","body":"Hi, this PR #3077 may solve your issue.\r\n\r\nBest regards"}}