{"action":"created","comment":{"url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/comments/77913480","id":77913480,"diff_hunk":"@@ -282,6 +299,15 @@ def checkout_steps(request, form_class=OrderForm, extra_context=None):\n                 # and send the order receipt email.\n                 order = form.save(commit=False)\n                 order.setup(request)\n+\n+                if (not settings.SHOP_PAYMENT_STEP_ENABLED or\n+                        order.total == 0):","path":"cartridge/shop/views.py","position":51,"original_position":51,"commit_id":"dd0bb6d60dff11ad9a77ab75ea42c48e6752c0d2","original_commit_id":"d73d9a552845001b26e894a2dab04ed31d7104c9","user":{"login":"Remiz","id":468290,"avatar_url":"https://avatars.githubusercontent.com/u/468290?v=3","gravatar_id":"","url":"https://api.github.com/users/Remiz","html_url":"https://github.com/Remiz","followers_url":"https://api.github.com/users/Remiz/followers","following_url":"https://api.github.com/users/Remiz/following{/other_user}","gists_url":"https://api.github.com/users/Remiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Remiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remiz/subscriptions","organizations_url":"https://api.github.com/users/Remiz/orgs","repos_url":"https://api.github.com/users/Remiz/repos","events_url":"https://api.github.com/users/Remiz/events{/privacy}","received_events_url":"https://api.github.com/users/Remiz/received_events","type":"User","site_admin":false},"body":"The first condition `not settings.SHOP_PAYMENT_STEP_ENABLE` is to handle the issue I mentioned, and the second `order.total == 0` is to handle the original problem.\r\n\r\nThese conditions will be evaluated during the very last step of the checkout, so these are possible. step += 1 just skip the payment form page.\r\n\r\nSorry if it isn't clear, this problem isn't as easy to fix as I initially though it would be.","created_at":"2016-09-07T22:07:46Z","updated_at":"2016-09-07T22:07:46Z","html_url":"https://github.com/stephenmcd/cartridge/pull/307#discussion_r77913480","pull_request_url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307","_links":{"self":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/comments/77913480"},"html":{"href":"https://github.com/stephenmcd/cartridge/pull/307#discussion_r77913480"},"pull_request":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307","id":84374008,"html_url":"https://github.com/stephenmcd/cartridge/pull/307","diff_url":"https://github.com/stephenmcd/cartridge/pull/307.diff","patch_url":"https://github.com/stephenmcd/cartridge/pull/307.patch","issue_url":"https://api.github.com/repos/stephenmcd/cartridge/issues/307","number":307,"state":"open","locked":false,"title":"Ignore payment step during checkout if the order total is equal to zero","user":{"login":"Remiz","id":468290,"avatar_url":"https://avatars.githubusercontent.com/u/468290?v=3","gravatar_id":"","url":"https://api.github.com/users/Remiz","html_url":"https://github.com/Remiz","followers_url":"https://api.github.com/users/Remiz/followers","following_url":"https://api.github.com/users/Remiz/following{/other_user}","gists_url":"https://api.github.com/users/Remiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Remiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remiz/subscriptions","organizations_url":"https://api.github.com/users/Remiz/orgs","repos_url":"https://api.github.com/users/Remiz/repos","events_url":"https://api.github.com/users/Remiz/events{/privacy}","received_events_url":"https://api.github.com/users/Remiz/received_events","type":"User","site_admin":false},"body":"It seems to be working for me... I ran the tests and didn't get any issue either, but I would appreciate if anyone else gave their opinion.\r\n\r\nThanks.","created_at":"2016-09-07T21:08:35Z","updated_at":"2016-09-07T22:07:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1078343d388e121880db74312bda21ab86f12fd8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307/commits","review_comments_url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307/comments","review_comment_url":"https://api.github.com/repos/stephenmcd/cartridge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stephenmcd/cartridge/issues/307/comments","statuses_url":"https://api.github.com/repos/stephenmcd/cartridge/statuses/dd0bb6d60dff11ad9a77ab75ea42c48e6752c0d2","head":{"label":"Remiz:free_order_skip_payment","ref":"free_order_skip_payment","sha":"dd0bb6d60dff11ad9a77ab75ea42c48e6752c0d2","user":{"login":"Remiz","id":468290,"avatar_url":"https://avatars.githubusercontent.com/u/468290?v=3","gravatar_id":"","url":"https://api.github.com/users/Remiz","html_url":"https://github.com/Remiz","followers_url":"https://api.github.com/users/Remiz/followers","following_url":"https://api.github.com/users/Remiz/following{/other_user}","gists_url":"https://api.github.com/users/Remiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Remiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remiz/subscriptions","organizations_url":"https://api.github.com/users/Remiz/orgs","repos_url":"https://api.github.com/users/Remiz/repos","events_url":"https://api.github.com/users/Remiz/events{/privacy}","received_events_url":"https://api.github.com/users/Remiz/received_events","type":"User","site_admin":false},"repo":{"id":67239820,"name":"cartridge","full_name":"Remiz/cartridge","owner":{"login":"Remiz","id":468290,"avatar_url":"https://avatars.githubusercontent.com/u/468290?v=3","gravatar_id":"","url":"https://api.github.com/users/Remiz","html_url":"https://github.com/Remiz","followers_url":"https://api.github.com/users/Remiz/followers","following_url":"https://api.github.com/users/Remiz/following{/other_user}","gists_url":"https://api.github.com/users/Remiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Remiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Remiz/subscriptions","organizations_url":"https://api.github.com/users/Remiz/orgs","repos_url":"https://api.github.com/users/Remiz/repos","events_url":"https://api.github.com/users/Remiz/events{/privacy}","received_events_url":"https://api.github.com/users/Remiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Remiz/cartridge","description":"Ecommerce for Mezzanine","fork":true,"url":"https://api.github.com/repos/Remiz/cartridge","forks_url":"https://api.github.com/repos/Remiz/cartridge/forks","keys_url":"https://api.github.com/repos/Remiz/cartridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Remiz/cartridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Remiz/cartridge/teams","hooks_url":"https://api.github.com/repos/Remiz/cartridge/hooks","issue_events_url":"https://api.github.com/repos/Remiz/cartridge/issues/events{/number}","events_url":"https://api.github.com/repos/Remiz/cartridge/events","assignees_url":"https://api.github.com/repos/Remiz/cartridge/assignees{/user}","branches_url":"https://api.github.com/repos/Remiz/cartridge/branches{/branch}","tags_url":"https://api.github.com/repos/Remiz/cartridge/tags","blobs_url":"https://api.github.com/repos/Remiz/cartridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Remiz/cartridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Remiz/cartridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/Remiz/cartridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Remiz/cartridge/statuses/{sha}","languages_url":"https://api.github.com/repos/Remiz/cartridge/languages","stargazers_url":"https://api.github.com/repos/Remiz/cartridge/stargazers","contributors_url":"https://api.github.com/repos/Remiz/cartridge/contributors","subscribers_url":"https://api.github.com/repos/Remiz/cartridge/subscribers","subscription_url":"https://api.github.com/repos/Remiz/cartridge/subscription","commits_url":"https://api.github.com/repos/Remiz/cartridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/Remiz/cartridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/Remiz/cartridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/Remiz/cartridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/Remiz/cartridge/contents/{+path}","compare_url":"https://api.github.com/repos/Remiz/cartridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Remiz/cartridge/merges","archive_url":"https://api.github.com/repos/Remiz/cartridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Remiz/cartridge/downloads","issues_url":"https://api.github.com/repos/Remiz/cartridge/issues{/number}","pulls_url":"https://api.github.com/repos/Remiz/cartridge/pulls{/number}","milestones_url":"https://api.github.com/repos/Remiz/cartridge/milestones{/number}","notifications_url":"https://api.github.com/repos/Remiz/cartridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Remiz/cartridge/labels{/name}","releases_url":"https://api.github.com/repos/Remiz/cartridge/releases{/id}","deployments_url":"https://api.github.com/repos/Remiz/cartridge/deployments","created_at":"2016-09-02T16:52:45Z","updated_at":"2016-09-02T16:52:47Z","pushed_at":"2016-09-07T22:01:23Z","git_url":"git://github.com/Remiz/cartridge.git","ssh_url":"git@github.com:Remiz/cartridge.git","clone_url":"https://github.com/Remiz/cartridge.git","svn_url":"https://github.com/Remiz/cartridge","homepage":"http://cartridge.jupo.org","size":46373,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stephenmcd:master","ref":"master","sha":"51a2d7fa0f4598562073f82d7701f291716bb1f5","user":{"login":"stephenmcd","id":116385,"avatar_url":"https://avatars.githubusercontent.com/u/116385?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenmcd","html_url":"https://github.com/stephenmcd","followers_url":"https://api.github.com/users/stephenmcd/followers","following_url":"https://api.github.com/users/stephenmcd/following{/other_user}","gists_url":"https://api.github.com/users/stephenmcd/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenmcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenmcd/subscriptions","organizations_url":"https://api.github.com/users/stephenmcd/orgs","repos_url":"https://api.github.com/users/stephenmcd/repos","events_url":"https://api.github.com/users/stephenmcd/events{/privacy}","received_events_url":"https://api.github.com/users/stephenmcd/received_events","type":"User","site_admin":false},"repo":{"id":854078,"name":"cartridge","full_name":"stephenmcd/cartridge","owner":{"login":"stephenmcd","id":116385,"avatar_url":"https://avatars.githubusercontent.com/u/116385?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenmcd","html_url":"https://github.com/stephenmcd","followers_url":"https://api.github.com/users/stephenmcd/followers","following_url":"https://api.github.com/users/stephenmcd/following{/other_user}","gists_url":"https://api.github.com/users/stephenmcd/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenmcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenmcd/subscriptions","organizations_url":"https://api.github.com/users/stephenmcd/orgs","repos_url":"https://api.github.com/users/stephenmcd/repos","events_url":"https://api.github.com/users/stephenmcd/events{/privacy}","received_events_url":"https://api.github.com/users/stephenmcd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephenmcd/cartridge","description":"Ecommerce for Mezzanine","fork":false,"url":"https://api.github.com/repos/stephenmcd/cartridge","forks_url":"https://api.github.com/repos/stephenmcd/cartridge/forks","keys_url":"https://api.github.com/repos/stephenmcd/cartridge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephenmcd/cartridge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephenmcd/cartridge/teams","hooks_url":"https://api.github.com/repos/stephenmcd/cartridge/hooks","issue_events_url":"https://api.github.com/repos/stephenmcd/cartridge/issues/events{/number}","events_url":"https://api.github.com/repos/stephenmcd/cartridge/events","assignees_url":"https://api.github.com/repos/stephenmcd/cartridge/assignees{/user}","branches_url":"https://api.github.com/repos/stephenmcd/cartridge/branches{/branch}","tags_url":"https://api.github.com/repos/stephenmcd/cartridge/tags","blobs_url":"https://api.github.com/repos/stephenmcd/cartridge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephenmcd/cartridge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephenmcd/cartridge/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephenmcd/cartridge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephenmcd/cartridge/statuses/{sha}","languages_url":"https://api.github.com/repos/stephenmcd/cartridge/languages","stargazers_url":"https://api.github.com/repos/stephenmcd/cartridge/stargazers","contributors_url":"https://api.github.com/repos/stephenmcd/cartridge/contributors","subscribers_url":"https://api.github.com/repos/stephenmcd/cartridge/subscribers","subscription_url":"https://api.github.com/repos/stephenmcd/cartridge/subscription","commits_url":"https://api.github.com/repos/stephenmcd/cartridge/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephenmcd/cartridge/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephenmcd/cartridge/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephenmcd/cartridge/issues/comments{/number}","contents_url":"https://api.github.com/repos/stephenmcd/cartridge/contents/{+path}","compare_url":"https://api.github.com/repos/stephenmcd/cartridge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephenmcd/cartridge/merges","archive_url":"https://api.github.com/repos/stephenmcd/cartridge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephenmcd/cartridge/downloads","issues_url":"https://api.github.com/repos/stephenmcd/cartridge/issues{/number}","pulls_url":"https://api.github.com/repos/stephenmcd/cartridge/pulls{/number}","milestones_url":"https://api.github.com/repos/stephenmcd/cartridge/milestones{/number}","notifications_url":"https://api.github.com/repos/stephenmcd/cartridge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephenmcd/cartridge/labels{/name}","releases_url":"https://api.github.com/repos/stephenmcd/cartridge/releases{/id}","deployments_url":"https://api.github.com/repos/stephenmcd/cartridge/deployments","created_at":"2010-08-22T00:36:43Z","updated_at":"2016-09-03T13:09:13Z","pushed_at":"2016-09-07T22:01:23Z","git_url":"git://github.com/stephenmcd/cartridge.git","ssh_url":"git@github.com:stephenmcd/cartridge.git","clone_url":"https://github.com/stephenmcd/cartridge.git","svn_url":"https://github.com/stephenmcd/cartridge","homepage":"http://cartridge.jupo.org","size":47613,"stargazers_count":477,"watchers_count":477,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":230,"mirror_url":null,"open_issues_count":21,"forks":230,"open_issues":21,"watchers":477,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307"},"html":{"href":"https://github.com/stephenmcd/cartridge/pull/307"},"issue":{"href":"https://api.github.com/repos/stephenmcd/cartridge/issues/307"},"comments":{"href":"https://api.github.com/repos/stephenmcd/cartridge/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stephenmcd/cartridge/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/stephenmcd/cartridge/statuses/dd0bb6d60dff11ad9a77ab75ea42c48e6752c0d2"}}}}
{"actor":{"display_login":"Remiz"}}