{"action":"created","issue":{"url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22","labels_url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22/comments","events_url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22/events","html_url":"https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22","id":53395637,"number":22,"title":"Property on Discount Code for the price value","user":{"login":"bjarnef","id":2919859,"avatar_url":"https://avatars.githubusercontent.com/u/2919859?v=3","gravatar_id":"","url":"https://api.github.com/users/bjarnef","html_url":"https://github.com/bjarnef","followers_url":"https://api.github.com/users/bjarnef/followers","following_url":"https://api.github.com/users/bjarnef/following{/other_user}","gists_url":"https://api.github.com/users/bjarnef/gists{/gist_id}","starred_url":"https://api.github.com/users/bjarnef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjarnef/subscriptions","organizations_url":"https://api.github.com/users/bjarnef/orgs","repos_url":"https://api.github.com/users/bjarnef/repos","events_url":"https://api.github.com/users/bjarnef/events{/privacy}","received_events_url":"https://api.github.com/users/bjarnef/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-05T13:27:40Z","updated_at":"2015-01-21T14:27:18Z","closed_at":"2015-01-21T14:27:18Z","body":"When you loop through the gift cards it's easy to output the value of the giftcard with the \"Amount\" property.. however when looping the discount codes there are only they only have \"Code\" and \"IsFulfilled\" properties.\r\n\r\nIf you add multiple discount codes and gift cards, you might want to see how much each represents in the discount. There don't seem to be an easy way to access to value.\r\n\r\nI can find the value like this:\r\n```\r\nforeach (var discountCode in discountCodes)\r\n{\r\n    var di = order.TotalPrice.Discounts.ElementAt(0);\r\n    <span class=\"discountCode\">@discountCode.Code @di.WithVatFormatted</span>\r\n}\r\n```\r\n\r\nthe index \"0\" should match the loop, so first time 0, then 1, 2.. etc... but you could have three discount codes, where the no. 1 and 3 is on total price og no. 2 on subtotal. Then if I want the discount price for no. 3 it would be order.TotalPrice.Discounts.ElementAt(1); (the second element).. so I can't ensure that the loop match the same same elements in the TotalPrice.Discounts or Subtotal.Discounts arrays.\r\n\r\nbut I have another code, where the discount is related to Subtotal, so I would have to use order.SubtotalPrice.Discounts ... and the award could have been added to shipment price and payment price aswell.\r\n\r\nbut I think it only is relevant, when you have a discount code rule for the campaign. Is there another to get the discount price for the matching discount code?\r\n"},"comment":{"url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/comments/70845772","html_url":"https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22#issuecomment-70845772","issue_url":"https://api.github.com/repos/TeaCommerce/Tea-Commerce-for-Umbraco/issues/22","id":70845772,"user":{"login":"andersburla","id":1910869,"avatar_url":"https://avatars.githubusercontent.com/u/1910869?v=3","gravatar_id":"","url":"https://api.github.com/users/andersburla","html_url":"https://github.com/andersburla","followers_url":"https://api.github.com/users/andersburla/followers","following_url":"https://api.github.com/users/andersburla/following{/other_user}","gists_url":"https://api.github.com/users/andersburla/gists{/gist_id}","starred_url":"https://api.github.com/users/andersburla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersburla/subscriptions","organizations_url":"https://api.github.com/users/andersburla/orgs","repos_url":"https://api.github.com/users/andersburla/repos","events_url":"https://api.github.com/users/andersburla/events{/privacy}","received_events_url":"https://api.github.com/users/andersburla/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T14:27:18Z","updated_at":"2015-01-21T14:27:18Z","body":"As talked on email - it wont be possible at the moment to show prices for a discount code as it is decoupled from this information."}}