{"action":"created","issue":{"url":"https://api.github.com/repos/opencart/opencart/issues/6688","repository_url":"https://api.github.com/repos/opencart/opencart","labels_url":"https://api.github.com/repos/opencart/opencart/issues/6688/labels{/name}","comments_url":"https://api.github.com/repos/opencart/opencart/issues/6688/comments","events_url":"https://api.github.com/repos/opencart/opencart/issues/6688/events","html_url":"https://github.com/opencart/opencart/issues/6688","id":334647059,"node_id":"MDU6SXNzdWUzMzQ2NDcwNTk=","number":6688,"title":"Important Issue - Can not get right unit price for different customer groups in \"Edit Order\" function at Admin Platform","user":{"login":"CodyZhou","id":24259084,"node_id":"MDQ6VXNlcjI0MjU5MDg0","avatar_url":"https://avatars1.githubusercontent.com/u/24259084?v=4","gravatar_id":"","url":"https://api.github.com/users/CodyZhou","html_url":"https://github.com/CodyZhou","followers_url":"https://api.github.com/users/CodyZhou/followers","following_url":"https://api.github.com/users/CodyZhou/following{/other_user}","gists_url":"https://api.github.com/users/CodyZhou/gists{/gist_id}","starred_url":"https://api.github.com/users/CodyZhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodyZhou/subscriptions","organizations_url":"https://api.github.com/users/CodyZhou/orgs","repos_url":"https://api.github.com/users/CodyZhou/repos","events_url":"https://api.github.com/users/CodyZhou/events{/privacy}","received_events_url":"https://api.github.com/users/CodyZhou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-21T20:34:00Z","updated_at":"2018-06-22T07:27:51Z","closed_at":null,"author_association":"NONE","body":"**Issue Description:**\r\n    When i edit the order information for my customer in \"Edit Order\" function of page \"Sales\"->\"Orders\" at Admin Platform, i always get the original unit price for each product in the \"products\" tab and the \"Totals\" tab, although i set up the different discount price for different customer groups. BUT, the unit price in \"View\" function is correct, it is the discount price for different customer groups. \r\n\r\n**Issue Path:**\r\n    In the page \"Sales\"->\"Orders\", click \"Edit\" button, then in the tab \"Products\" and tab \"Totals\".\r\n\r\n**Issue Analysis:**\r\n    In the file \"admin/view/template/sale/order_form.tpl\", it is use ajax to request the products data through the api - index.php?route=api/cart/products - which is in the catalog platform. BUT, this operation does not send the customer id  or something like this to identify the customer information or the order data. It gets the product data from the shopping cart , and gets the customer id by the way \"$this->customer->getId()\", and gets the default customer group id by the way \"$this->config->get('config_customer_group_id')\". So, if you have some different customer groups or you do not login by using the correct customer information, you can not get the correct unit price for each product.  You only can get the original unit price. If you do not need to edit the order, everything looks fine. BUT, if you have to edit any information of the order, the all prices will be changed to the original price in this order and you do not have any other way to change the price back. \r\n\r\n**Issue Version:**\r\n    I am using the opencart V2.3 right now, but i confirm that this issue existed in the opencart version 3.0 and 3.0+.\r\n"},"comment":{"url":"https://api.github.com/repos/opencart/opencart/issues/comments/399348633","html_url":"https://github.com/opencart/opencart/issues/6688#issuecomment-399348633","issue_url":"https://api.github.com/repos/opencart/opencart/issues/6688","id":399348633,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTM0ODYzMw==","user":{"login":"danielkerr","id":5079756,"node_id":"MDQ6VXNlcjUwNzk3NTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5079756?v=4","gravatar_id":"","url":"https://api.github.com/users/danielkerr","html_url":"https://github.com/danielkerr","followers_url":"https://api.github.com/users/danielkerr/followers","following_url":"https://api.github.com/users/danielkerr/following{/other_user}","gists_url":"https://api.github.com/users/danielkerr/gists{/gist_id}","starred_url":"https://api.github.com/users/danielkerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielkerr/subscriptions","organizations_url":"https://api.github.com/users/danielkerr/orgs","repos_url":"https://api.github.com/users/danielkerr/repos","events_url":"https://api.github.com/users/danielkerr/events{/privacy}","received_events_url":"https://api.github.com/users/danielkerr/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T07:27:51Z","updated_at":"2018-06-22T07:27:51Z","author_association":"CONTRIBUTOR","body":"it sends the customer group that you define on the customer order edit part.\r\n\r\ni will look into it."}}
{"actor":{"display_login":"danielkerr"}}