{"action":"created","comment":{"url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/comments/187898323","pull_request_review_id":119764689,"id":187898323,"diff_hunk":"@@ -941,57 +941,36 @@ private function getCartRules(&$magentoQuoteBuilder, &$oneClickOrderCartEstimate\n \n                 continue;\n             }\n+        }\n \n-            // Manage classic rules\n-            if (is_null($quoteAppliedRuleIds = $quoteItemData['applied_rule_ids'])) {\n+        // Handle Classic discount rules\n+        foreach($magentoQuoteBuilder->getQuote()->getTotals() as $total) {\n+            if($total->getCode() != 'discount') {\n                 continue;\n             }\n \n             /** @var Mage_SalesRule_Model_Resource_Rule_Collection $salesRuleCollection */\n             $salesRuleCollection = Mage::getModel('salesrule/rule')->getCollection();\n             $salesRules = $salesRuleCollection\n-                ->addFieldToFilter('rule_id', array('in' => explode(',', $quoteAppliedRuleIds)))\n+                ->addFieldToFilter('rule_id', array('in' => array_keys($total->getFullInfo())))\n                 ->addFieldToFilter('simple_action', array('neq' => self::C4B_FREEPRODUCT_ADD_GIFT_ACTION))\n                 ->setOrder('sort_order', $salesRuleCollection::SORT_ORDER_ASC);\n             ;\n \n-            /** @var Mage_SalesRule_Model_Rule $salesRuleData */\n-            foreach ($salesRules->getData() as $salesRuleData) {\n-                Mage::helper('oyst_oneclick')->log('RuleId: ' . $salesRuleData['rule_id'] . ' - Type: ' . $salesRuleData['simple_action']);\n-\n-                if ($salesRuleData['simple_free_shipping'] || $salesRuleData['apply_to_shipping']) {\n-                    Mage::helper('oyst_oneclick')->log('RuleId: '. $salesRuleData['rule_id'] . ' change only shipping fees.');\n-\n-                    continue;\n-                }\n+            foreach($total->getFullInfo() as $salesRuleId => $discountInfo) {","path":"app/code/community/Oyst/OneClick/Model/Catalog.php","position":32,"original_position":32,"commit_id":"9e8e64b2328ea9fefa95cd215041c0b0af850ec1","original_commit_id":"9e8e64b2328ea9fefa95cd215041c0b0af850ec1","user":{"login":"mehdichaouch","id":861701,"avatar_url":"https://avatars1.githubusercontent.com/u/861701?v=4","gravatar_id":"","url":"https://api.github.com/users/mehdichaouch","html_url":"https://github.com/mehdichaouch","followers_url":"https://api.github.com/users/mehdichaouch/followers","following_url":"https://api.github.com/users/mehdichaouch/following{/other_user}","gists_url":"https://api.github.com/users/mehdichaouch/gists{/gist_id}","starred_url":"https://api.github.com/users/mehdichaouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehdichaouch/subscriptions","organizations_url":"https://api.github.com/users/mehdichaouch/orgs","repos_url":"https://api.github.com/users/mehdichaouch/repos","events_url":"https://api.github.com/users/mehdichaouch/events{/privacy}","received_events_url":"https://api.github.com/users/mehdichaouch/received_events","type":"User","site_admin":false},"body":"Add space after `foreach`.","created_at":"2018-05-14T10:04:32Z","updated_at":"2018-05-14T10:07:00Z","html_url":"https://github.com/oystparis/oyst-1click-magento/pull/359#discussion_r187898323","pull_request_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/comments/187898323"},"html":{"href":"https://github.com/oystparis/oyst-1click-magento/pull/359#discussion_r187898323"},"pull_request":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359"}}},"pull_request":{"url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359","id":187759547,"html_url":"https://github.com/oystparis/oyst-1click-magento/pull/359","diff_url":"https://github.com/oystparis/oyst-1click-magento/pull/359.diff","patch_url":"https://github.com/oystparis/oyst-1click-magento/pull/359.patch","issue_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/359","number":359,"state":"open","locked":false,"title":"Refactoring checkout discount display on specifically for multiple discounts (#358)","user":{"login":"mbouchotoyst","id":38906135,"avatar_url":"https://avatars2.githubusercontent.com/u/38906135?v=4","gravatar_id":"","url":"https://api.github.com/users/mbouchotoyst","html_url":"https://github.com/mbouchotoyst","followers_url":"https://api.github.com/users/mbouchotoyst/followers","following_url":"https://api.github.com/users/mbouchotoyst/following{/other_user}","gists_url":"https://api.github.com/users/mbouchotoyst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbouchotoyst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbouchotoyst/subscriptions","organizations_url":"https://api.github.com/users/mbouchotoyst/orgs","repos_url":"https://api.github.com/users/mbouchotoyst/repos","events_url":"https://api.github.com/users/mbouchotoyst/events{/privacy}","received_events_url":"https://api.github.com/users/mbouchotoyst/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-14T08:57:23Z","updated_at":"2018-05-14T10:07:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49662ca358a22814507ed0eb0938a611db1b6af6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"StefBrito","id":33653542,"avatar_url":"https://avatars3.githubusercontent.com/u/33653542?v=4","gravatar_id":"","url":"https://api.github.com/users/StefBrito","html_url":"https://github.com/StefBrito","followers_url":"https://api.github.com/users/StefBrito/followers","following_url":"https://api.github.com/users/StefBrito/following{/other_user}","gists_url":"https://api.github.com/users/StefBrito/gists{/gist_id}","starred_url":"https://api.github.com/users/StefBrito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefBrito/subscriptions","organizations_url":"https://api.github.com/users/StefBrito/orgs","repos_url":"https://api.github.com/users/StefBrito/repos","events_url":"https://api.github.com/users/StefBrito/events{/privacy}","received_events_url":"https://api.github.com/users/StefBrito/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/oystparis/oyst-1click-magento/milestones/7","html_url":"https://github.com/oystparis/oyst-1click-magento/milestone/7","labels_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/milestones/7/labels","id":3324763,"number":7,"title":"1.9.1","description":"","creator":{"login":"mehdichaouch","id":861701,"avatar_url":"https://avatars1.githubusercontent.com/u/861701?v=4","gravatar_id":"","url":"https://api.github.com/users/mehdichaouch","html_url":"https://github.com/mehdichaouch","followers_url":"https://api.github.com/users/mehdichaouch/followers","following_url":"https://api.github.com/users/mehdichaouch/following{/other_user}","gists_url":"https://api.github.com/users/mehdichaouch/gists{/gist_id}","starred_url":"https://api.github.com/users/mehdichaouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehdichaouch/subscriptions","organizations_url":"https://api.github.com/users/mehdichaouch/orgs","repos_url":"https://api.github.com/users/mehdichaouch/repos","events_url":"https://api.github.com/users/mehdichaouch/events{/privacy}","received_events_url":"https://api.github.com/users/mehdichaouch/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":3,"state":"open","created_at":"2018-05-07T09:32:26Z","updated_at":"2018-05-14T10:00:44Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359/commits","review_comments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359/comments","review_comment_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/359/comments","statuses_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/statuses/9e8e64b2328ea9fefa95cd215041c0b0af850ec1","head":{"label":"oystparis:fix-checkout-discount-display","ref":"fix-checkout-discount-display","sha":"9e8e64b2328ea9fefa95cd215041c0b0af850ec1","user":{"login":"oystparis","id":17929707,"avatar_url":"https://avatars1.githubusercontent.com/u/17929707?v=4","gravatar_id":"","url":"https://api.github.com/users/oystparis","html_url":"https://github.com/oystparis","followers_url":"https://api.github.com/users/oystparis/followers","following_url":"https://api.github.com/users/oystparis/following{/other_user}","gists_url":"https://api.github.com/users/oystparis/gists{/gist_id}","starred_url":"https://api.github.com/users/oystparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oystparis/subscriptions","organizations_url":"https://api.github.com/users/oystparis/orgs","repos_url":"https://api.github.com/users/oystparis/repos","events_url":"https://api.github.com/users/oystparis/events{/privacy}","received_events_url":"https://api.github.com/users/oystparis/received_events","type":"Organization","site_admin":false},"repo":{"id":92943618,"name":"oyst-1click-magento","full_name":"oystparis/oyst-1click-magento","owner":{"login":"oystparis","id":17929707,"avatar_url":"https://avatars1.githubusercontent.com/u/17929707?v=4","gravatar_id":"","url":"https://api.github.com/users/oystparis","html_url":"https://github.com/oystparis","followers_url":"https://api.github.com/users/oystparis/followers","following_url":"https://api.github.com/users/oystparis/following{/other_user}","gists_url":"https://api.github.com/users/oystparis/gists{/gist_id}","starred_url":"https://api.github.com/users/oystparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oystparis/subscriptions","organizations_url":"https://api.github.com/users/oystparis/orgs","repos_url":"https://api.github.com/users/oystparis/repos","events_url":"https://api.github.com/users/oystparis/events{/privacy}","received_events_url":"https://api.github.com/users/oystparis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oystparis/oyst-1click-magento","description":"Oyst 1-Click plugin for Magento","fork":false,"url":"https://api.github.com/repos/oystparis/oyst-1click-magento","forks_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/forks","keys_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/teams","hooks_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/hooks","issue_events_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/events{/number}","events_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/events","assignees_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/assignees{/user}","branches_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/branches{/branch}","tags_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/tags","blobs_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/refs{/sha}","trees_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/statuses/{sha}","languages_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/languages","stargazers_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/stargazers","contributors_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/contributors","subscribers_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/subscribers","subscription_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/subscription","commits_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/commits{/sha}","git_commits_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/commits{/sha}","comments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/comments{/number}","issue_comment_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/comments{/number}","contents_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/contents/{+path}","compare_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/merges","archive_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/downloads","issues_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues{/number}","pulls_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls{/number}","milestones_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/milestones{/number}","notifications_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/labels{/name}","releases_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/releases{/id}","deployments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/deployments","created_at":"2017-05-31T12:25:05Z","updated_at":"2018-05-14T08:47:49Z","pushed_at":"2018-05-14T10:00:16Z","git_url":"git://github.com/oystparis/oyst-1click-magento.git","ssh_url":"git@github.com:oystparis/oyst-1click-magento.git","clone_url":"https://github.com/oystparis/oyst-1click-magento.git","svn_url":"https://github.com/oystparis/oyst-1click-magento","homepage":"","size":371,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":29,"watchers":0,"default_branch":"master"}},"base":{"label":"oystparis:v1.9.1","ref":"v1.9.1","sha":"6dae93efb2a4cd4da6d62d40f71c70c0d4cfe5d8","user":{"login":"oystparis","id":17929707,"avatar_url":"https://avatars1.githubusercontent.com/u/17929707?v=4","gravatar_id":"","url":"https://api.github.com/users/oystparis","html_url":"https://github.com/oystparis","followers_url":"https://api.github.com/users/oystparis/followers","following_url":"https://api.github.com/users/oystparis/following{/other_user}","gists_url":"https://api.github.com/users/oystparis/gists{/gist_id}","starred_url":"https://api.github.com/users/oystparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oystparis/subscriptions","organizations_url":"https://api.github.com/users/oystparis/orgs","repos_url":"https://api.github.com/users/oystparis/repos","events_url":"https://api.github.com/users/oystparis/events{/privacy}","received_events_url":"https://api.github.com/users/oystparis/received_events","type":"Organization","site_admin":false},"repo":{"id":92943618,"name":"oyst-1click-magento","full_name":"oystparis/oyst-1click-magento","owner":{"login":"oystparis","id":17929707,"avatar_url":"https://avatars1.githubusercontent.com/u/17929707?v=4","gravatar_id":"","url":"https://api.github.com/users/oystparis","html_url":"https://github.com/oystparis","followers_url":"https://api.github.com/users/oystparis/followers","following_url":"https://api.github.com/users/oystparis/following{/other_user}","gists_url":"https://api.github.com/users/oystparis/gists{/gist_id}","starred_url":"https://api.github.com/users/oystparis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oystparis/subscriptions","organizations_url":"https://api.github.com/users/oystparis/orgs","repos_url":"https://api.github.com/users/oystparis/repos","events_url":"https://api.github.com/users/oystparis/events{/privacy}","received_events_url":"https://api.github.com/users/oystparis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oystparis/oyst-1click-magento","description":"Oyst 1-Click plugin for Magento","fork":false,"url":"https://api.github.com/repos/oystparis/oyst-1click-magento","forks_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/forks","keys_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/teams","hooks_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/hooks","issue_events_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/events{/number}","events_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/events","assignees_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/assignees{/user}","branches_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/branches{/branch}","tags_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/tags","blobs_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/refs{/sha}","trees_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/statuses/{sha}","languages_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/languages","stargazers_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/stargazers","contributors_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/contributors","subscribers_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/subscribers","subscription_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/subscription","commits_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/commits{/sha}","git_commits_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/git/commits{/sha}","comments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/comments{/number}","issue_comment_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/comments{/number}","contents_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/contents/{+path}","compare_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/merges","archive_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/downloads","issues_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues{/number}","pulls_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls{/number}","milestones_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/milestones{/number}","notifications_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/labels{/name}","releases_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/releases{/id}","deployments_url":"https://api.github.com/repos/oystparis/oyst-1click-magento/deployments","created_at":"2017-05-31T12:25:05Z","updated_at":"2018-05-14T08:47:49Z","pushed_at":"2018-05-14T10:00:16Z","git_url":"git://github.com/oystparis/oyst-1click-magento.git","ssh_url":"git@github.com:oystparis/oyst-1click-magento.git","clone_url":"https://github.com/oystparis/oyst-1click-magento.git","svn_url":"https://github.com/oystparis/oyst-1click-magento","homepage":"","size":371,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":29,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359"},"html":{"href":"https://github.com/oystparis/oyst-1click-magento/pull/359"},"issue":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/359"},"comments":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/issues/359/comments"},"review_comments":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359/comments"},"review_comment":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/pulls/359/commits"},"statuses":{"href":"https://api.github.com/repos/oystparis/oyst-1click-magento/statuses/9e8e64b2328ea9fefa95cd215041c0b0af850ec1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mehdichaouch"}}