{"action":"created","issue":{"url":"https://api.github.com/repos/olimart/bento/issues/90","labels_url":"https://api.github.com/repos/olimart/bento/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/olimart/bento/issues/90/comments","events_url":"https://api.github.com/repos/olimart/bento/issues/90/events","html_url":"https://github.com/olimart/bento/issues/90","id":74403716,"number":90,"title":"JS Currency refresh and price money number formatting","user":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/olimart/bento/labels/P1","name":"P1","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"croko","id":333912,"avatar_url":"https://avatars.githubusercontent.com/u/333912?v=3","gravatar_id":"","url":"https://api.github.com/users/croko","html_url":"https://github.com/croko","followers_url":"https://api.github.com/users/croko/followers","following_url":"https://api.github.com/users/croko/following{/other_user}","gists_url":"https://api.github.com/users/croko/gists{/gist_id}","starred_url":"https://api.github.com/users/croko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croko/subscriptions","organizations_url":"https://api.github.com/users/croko/orgs","repos_url":"https://api.github.com/users/croko/repos","events_url":"https://api.github.com/users/croko/events{/privacy}","received_events_url":"https://api.github.com/users/croko/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-05-08T15:37:14Z","updated_at":"2015-05-09T22:47:45Z","closed_at":null,"body":"Following recent changes in the app about currency\r\n\r\n- on products#show\r\n  - when selecting variant, we fetch variant price however it is not formatted with currency\r\n\r\nCheck 6303b3bbd7817523abe8a85822cae926a6cfda3b I've added `CURRENT_CURRENCY` and in `orders.js.coffee` we're using `accounting.formatMoney(total, currency_symbol)`. I think we can reuse that\r\n\r\n- orders#new\r\n  - when changing shipping option, same it defaults to `$` currency where we should keep current_currency\r\n  - 500 error raised `NoMethodError - undefined method `iso_code' for nil:NilClass`\r\n"},"comment":{"url":"https://api.github.com/repos/olimart/bento/issues/comments/100558188","html_url":"https://github.com/olimart/bento/issues/90#issuecomment-100558188","issue_url":"https://api.github.com/repos/olimart/bento/issues/90","id":100558188,"user":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T22:47:45Z","updated_at":"2015-05-09T22:47:45Z","body":"Looks like it's more complex than that. Indeed when you visit product page you see converted price. When you change variant we only change currency symbol, and no price conversion therefore user sees 2 different price for the same variant.\r\n\r\nPlease add price conversion when variant changes as well. Let's do trigger conversion only if current session currency different than BASE_CURRENCY\r\n\r\nAlso apply conversion and currency to orders#new when shipping option changes."}}