GitHub PullRequestEvent at 2014-09-12 14:38:00
Repository: yii2-shopping-cart
Actor: OmgDef
Payload: {"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1","id":21156661,"html_url":"https://github.com/omnilight/yii2-shopping-cart/pull/1","diff_url":"https://github.com/omnilight/yii2-shopping-cart/pull/1.diff","patch_url":"https://github.com/omnilight/yii2-shopping-cart/pull/1.patch","issue_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/1","number":1,"state":"open","locked":false,"title":"Added discounts support","user":{"login":"OmgDef","id":6762337,"avatar_url":"https://avatars.githubusercontent.com/u/6762337?v=2","gravatar_id":"e37086f386f537ed328c3a9b279bf749","url":"https://api.github.com/users/OmgDef","html_url":"https://github.com/OmgDef","followers_url":"https://api.github.com/users/OmgDef/followers","following_url":"https://api.github.com/users/OmgDef/following{/other_user}","gists_url":"https://api.github.com/users/OmgDef/gists{/gist_id}","starred_url":"https://api.github.com/users/OmgDef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmgDef/subscriptions","organizations_url":"https://api.github.com/users/OmgDef/orgs","repos_url":"https://api.github.com/users/OmgDef/repos","events_url":"https://api.github.com/users/OmgDef/events{/privacy}","received_events_url":"https://api.github.com/users/OmgDef/received_events","type":"User","site_admin":false},"body":"Configuration example\r\n```php\r\n        'cart' => [\r\n            'class' => 'yz\\shoppingcart\\ShoppingCart',\r\n            'discounts' => [\r\n                'frontend\\modules\\store\\discounts\\CardDiscount'\r\n            ],\r\n        ],\r\n```\r\n\r\nDiscount example\r\n\r\n```php\r\nnamespace frontend\\modules\\store\\discounts;\r\n\r\nuse Yii;\r\nuse yz\\shoppingcart\\Discount;\r\n\r\nclass CardDiscount extends Discount\r\n{\r\n    public function apply()\r\n    {\r\n        if (Yii::$app->session->has('card')) {\r\n            foreach($this->shoppingCart->getPositions() as $position) {\r\n                $position->setDiscountPrice($position->getCost(false) * (Yii::$app->session->get('card') / 100));\r\n            }\r\n        }\r\n    }\r\n} \r\n```","created_at":"2014-09-12T14:38:00Z","updated_at":"2014-09-12T14:38:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1/commits","review_comments_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1/comments","review_comment_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/comments/{number}","comments_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/1/comments","statuses_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/statuses/1fc8e431fb388baffd9d9d8326c04e6e9fe6551c","head":{"label":"OmgDef:master","ref":"master","sha":"1fc8e431fb388baffd9d9d8326c04e6e9fe6551c","user":{"login":"OmgDef","id":6762337,"avatar_url":"https://avatars.githubusercontent.com/u/6762337?v=2","gravatar_id":"e37086f386f537ed328c3a9b279bf749","url":"https://api.github.com/users/OmgDef","html_url":"https://github.com/OmgDef","followers_url":"https://api.github.com/users/OmgDef/followers","following_url":"https://api.github.com/users/OmgDef/following{/other_user}","gists_url":"https://api.github.com/users/OmgDef/gists{/gist_id}","starred_url":"https://api.github.com/users/OmgDef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmgDef/subscriptions","organizations_url":"https://api.github.com/users/OmgDef/orgs","repos_url":"https://api.github.com/users/OmgDef/repos","events_url":"https://api.github.com/users/OmgDef/events{/privacy}","received_events_url":"https://api.github.com/users/OmgDef/received_events","type":"User","site_admin":false},"repo":{"id":23962949,"name":"yii2-shopping-cart","full_name":"OmgDef/yii2-shopping-cart","owner":{"login":"OmgDef","id":6762337,"avatar_url":"https://avatars.githubusercontent.com/u/6762337?v=2","gravatar_id":"e37086f386f537ed328c3a9b279bf749","url":"https://api.github.com/users/OmgDef","html_url":"https://github.com/OmgDef","followers_url":"https://api.github.com/users/OmgDef/followers","following_url":"https://api.github.com/users/OmgDef/following{/other_user}","gists_url":"https://api.github.com/users/OmgDef/gists{/gist_id}","starred_url":"https://api.github.com/users/OmgDef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmgDef/subscriptions","organizations_url":"https://api.github.com/users/OmgDef/orgs","repos_url":"https://api.github.com/users/OmgDef/repos","events_url":"https://api.github.com/users/OmgDef/events{/privacy}","received_events_url":"https://api.github.com/users/OmgDef/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OmgDef/yii2-shopping-cart","description":"Shopping cart extension for yii2","fork":true,"url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart","forks_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/forks","keys_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/teams","hooks_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/hooks","issue_events_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/issues/events{/number}","events_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/events","assignees_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/assignees{/user}","branches_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/branches{/branch}","tags_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/tags","blobs_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/git/refs{/sha}","trees_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/statuses/{sha}","languages_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/languages","stargazers_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/stargazers","contributors_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/contributors","subscribers_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/subscribers","subscription_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/subscription","commits_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/commits{/sha}","git_commits_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/git/commits{/sha}","comments_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/comments{/number}","issue_comment_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/issues/comments/{number}","contents_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/contents/{+path}","compare_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/merges","archive_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/downloads","issues_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/issues{/number}","pulls_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/pulls{/number}","milestones_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/milestones{/number}","notifications_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/labels{/name}","releases_url":"https://api.github.com/repos/OmgDef/yii2-shopping-cart/releases{/id}","created_at":"2014-09-12T14:04:47Z","updated_at":"2014-09-12T14:33:06Z","pushed_at":"2014-09-12T14:34:48Z","git_url":"git://github.com/OmgDef/yii2-shopping-cart.git","ssh_url":"git@github.com:OmgDef/yii2-shopping-cart.git","clone_url":"https://github.com/OmgDef/yii2-shopping-cart.git","svn_url":"https://github.com/OmgDef/yii2-shopping-cart","homepage":null,"size":204,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"omnilight:master","ref":"master","sha":"9836c02a59b2d5fb13b49bd6901060c9f8b64476","user":{"login":"omnilight","id":3306537,"avatar_url":"https://avatars.githubusercontent.com/u/3306537?v=2","gravatar_id":"efe6f2c6d33d7d3cef7c5ab2d0cb49b8","url":"https://api.github.com/users/omnilight","html_url":"https://github.com/omnilight","followers_url":"https://api.github.com/users/omnilight/followers","following_url":"https://api.github.com/users/omnilight/following{/other_user}","gists_url":"https://api.github.com/users/omnilight/gists{/gist_id}","starred_url":"https://api.github.com/users/omnilight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omnilight/subscriptions","organizations_url":"https://api.github.com/users/omnilight/orgs","repos_url":"https://api.github.com/users/omnilight/repos","events_url":"https://api.github.com/users/omnilight/events{/privacy}","received_events_url":"https://api.github.com/users/omnilight/received_events","type":"User","site_admin":false},"repo":{"id":16144274,"name":"yii2-shopping-cart","full_name":"omnilight/yii2-shopping-cart","owner":{"login":"omnilight","id":3306537,"avatar_url":"https://avatars.githubusercontent.com/u/3306537?v=2","gravatar_id":"efe6f2c6d33d7d3cef7c5ab2d0cb49b8","url":"https://api.github.com/users/omnilight","html_url":"https://github.com/omnilight","followers_url":"https://api.github.com/users/omnilight/followers","following_url":"https://api.github.com/users/omnilight/following{/other_user}","gists_url":"https://api.github.com/users/omnilight/gists{/gist_id}","starred_url":"https://api.github.com/users/omnilight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omnilight/subscriptions","organizations_url":"https://api.github.com/users/omnilight/orgs","repos_url":"https://api.github.com/users/omnilight/repos","events_url":"https://api.github.com/users/omnilight/events{/privacy}","received_events_url":"https://api.github.com/users/omnilight/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omnilight/yii2-shopping-cart","description":"Shopping cart extension for yii2","fork":false,"url":"https://api.github.com/repos/omnilight/yii2-shopping-cart","forks_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/forks","keys_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/teams","hooks_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/hooks","issue_events_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/events{/number}","events_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/events","assignees_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/assignees{/user}","branches_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/branches{/branch}","tags_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/tags","blobs_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/git/refs{/sha}","trees_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/statuses/{sha}","languages_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/languages","stargazers_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/stargazers","contributors_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/contributors","subscribers_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/subscribers","subscription_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/subscription","commits_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/commits{/sha}","git_commits_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/git/commits{/sha}","comments_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/comments{/number}","issue_comment_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/comments/{number}","contents_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/contents/{+path}","compare_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/merges","archive_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/downloads","issues_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues{/number}","pulls_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls{/number}","milestones_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/milestones{/number}","notifications_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/labels{/name}","releases_url":"https://api.github.com/repos/omnilight/yii2-shopping-cart/releases{/id}","created_at":"2014-01-22T16:09:49Z","updated_at":"2014-09-08T12:04:42Z","pushed_at":"2014-09-09T16:04:12Z","git_url":"git://github.com/omnilight/yii2-shopping-cart.git","ssh_url":"git@github.com:omnilight/yii2-shopping-cart.git","clone_url":"https://github.com/omnilight/yii2-shopping-cart.git","svn_url":"https://github.com/omnilight/yii2-shopping-cart","homepage":null,"size":204,"stargazers_count":6,"watchers_count":6,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1"},"html":{"href":"https://github.com/omnilight/yii2-shopping-cart/pull/1"},"issue":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/1"},"comments":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/omnilight/yii2-shopping-cart/statuses/1fc8e431fb388baffd9d9d8326c04e6e9fe6551c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":101,"deletions":15,"changed_files":4}}