{"action":"created","issue":{"url":"https://api.github.com/repos/cubecart/v6/issues/225","labels_url":"https://api.github.com/repos/cubecart/v6/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/cubecart/v6/issues/225/comments","events_url":"https://api.github.com/repos/cubecart/v6/issues/225/events","html_url":"https://github.com/cubecart/v6/issues/225","id":57700612,"number":225,"title":"Request: New Hook","user":{"login":"Noodleyman","id":10614018,"avatar_url":"https://avatars.githubusercontent.com/u/10614018?v=3","gravatar_id":"","url":"https://api.github.com/users/Noodleyman","html_url":"https://github.com/Noodleyman","followers_url":"https://api.github.com/users/Noodleyman/followers","following_url":"https://api.github.com/users/Noodleyman/following{/other_user}","gists_url":"https://api.github.com/users/Noodleyman/gists{/gist_id}","starred_url":"https://api.github.com/users/Noodleyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Noodleyman/subscriptions","organizations_url":"https://api.github.com/users/Noodleyman/orgs","repos_url":"https://api.github.com/users/Noodleyman/repos","events_url":"https://api.github.com/users/Noodleyman/events{/privacy}","received_events_url":"https://api.github.com/users/Noodleyman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-14T17:49:26Z","updated_at":"2015-02-16T17:36:16Z","closed_at":null,"body":"Been using my own here for a while, but would be useful to have one added moving forward.\r\n\r\ncubecart.class.php\r\n\r\nAFTER\r\n\t\tif (isset($_POST['update'])) {\r\n\t\t\t$GLOBALS['cart']->update();\r\n\t\t\tif (isset($_POST['coupon']) && !empty($_POST['coupon'])) {\r\n\t\t\t\t$GLOBALS['cart']->discountAdd($_POST['coupon']);\r\n\t\t\t}\r\n\r\nbut before the save.\r\n\r\nAllows for changes to be made before the cart is saved if it is being updated. "},"comment":{"url":"https://api.github.com/repos/cubecart/v6/issues/comments/74545144","html_url":"https://github.com/cubecart/v6/issues/225#issuecomment-74545144","issue_url":"https://api.github.com/repos/cubecart/v6/issues/225","id":74545144,"user":{"login":"abrookbanks","id":4520803,"avatar_url":"https://avatars.githubusercontent.com/u/4520803?v=3","gravatar_id":"","url":"https://api.github.com/users/abrookbanks","html_url":"https://github.com/abrookbanks","followers_url":"https://api.github.com/users/abrookbanks/followers","following_url":"https://api.github.com/users/abrookbanks/following{/other_user}","gists_url":"https://api.github.com/users/abrookbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/abrookbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abrookbanks/subscriptions","organizations_url":"https://api.github.com/users/abrookbanks/orgs","repos_url":"https://api.github.com/users/abrookbanks/repos","events_url":"https://api.github.com/users/abrookbanks/events{/privacy}","received_events_url":"https://api.github.com/users/abrookbanks/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T17:36:16Z","updated_at":"2015-02-16T17:36:16Z","body":"Hey Alec, do you mean like this? Can you show me what you want the final code to look like?\r\n\r\nCan you use the hook \"class.cubecart.pre_basket\"?\r\n\r\nIn the hook add something like:\r\n\r\n```<?php\r\nif (isset($_POST['update'])) {\r\n .. do something ..\r\n}\r\n?>```\r\n\r\n"}}