{"action":"created","issue":{"url":"https://api.github.com/repos/CORE-POS/IS4C/issues/816","repository_url":"https://api.github.com/repos/CORE-POS/IS4C","labels_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/816/labels{/name}","comments_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/816/comments","events_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/816/events","html_url":"https://github.com/CORE-POS/IS4C/issues/816","id":178209335,"number":816,"title":"Different pricing by time of day?","user":{"login":"scannerdarkly","id":494489,"avatar_url":"https://avatars.githubusercontent.com/u/494489?v=3","gravatar_id":"","url":"https://api.github.com/users/scannerdarkly","html_url":"https://github.com/scannerdarkly","followers_url":"https://api.github.com/users/scannerdarkly/followers","following_url":"https://api.github.com/users/scannerdarkly/following{/other_user}","gists_url":"https://api.github.com/users/scannerdarkly/gists{/gist_id}","starred_url":"https://api.github.com/users/scannerdarkly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scannerdarkly/subscriptions","organizations_url":"https://api.github.com/users/scannerdarkly/orgs","repos_url":"https://api.github.com/users/scannerdarkly/repos","events_url":"https://api.github.com/users/scannerdarkly/events{/privacy}","received_events_url":"https://api.github.com/users/scannerdarkly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CORE-POS/IS4C/labels/Code%20Enhancing","name":"Code Enhancing","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-20T23:45:21Z","updated_at":"2016-09-21T19:03:37Z","closed_at":null,"body":"I'd like to set up a promo where certain items are discounted between say 8am and 10am. Is there any functionality in CORE-POS to automate a discount based on time of day?"},"comment":{"url":"https://api.github.com/repos/CORE-POS/IS4C/issues/comments/248710415","html_url":"https://github.com/CORE-POS/IS4C/issues/816#issuecomment-248710415","issue_url":"https://api.github.com/repos/CORE-POS/IS4C/issues/816","id":248710415,"user":{"login":"gohanman","id":426966,"avatar_url":"https://avatars.githubusercontent.com/u/426966?v=3","gravatar_id":"","url":"https://api.github.com/users/gohanman","html_url":"https://github.com/gohanman","followers_url":"https://api.github.com/users/gohanman/followers","following_url":"https://api.github.com/users/gohanman/following{/other_user}","gists_url":"https://api.github.com/users/gohanman/gists{/gist_id}","starred_url":"https://api.github.com/users/gohanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohanman/subscriptions","organizations_url":"https://api.github.com/users/gohanman/orgs","repos_url":"https://api.github.com/users/gohanman/repos","events_url":"https://api.github.com/users/gohanman/events{/privacy}","received_events_url":"https://api.github.com/users/gohanman/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T19:03:36Z","updated_at":"2016-09-21T19:03:36Z","body":"No, there isn't.\r\n\r\nIt seems like something that should be grafted onto batches, but backwards compatibility is a bit of a headache. The hour portion of the end date has never mattered before, e.g. a sale with end date `2016-12-31 00:00:00` actually runs through `2016-12-31 23:59:59` but making every batch specify an end date with that level of precision seems like a UI step backwards. I'd also be sort of concerned about start/stop task performance. It'd essentially have to run completely including pushing updates to the lanes in under a minute, so having some kind of flag marking hourly/high-precision batches and a separate start/stop task that only looks at those items seems optimal.\r\n\r\nI could see a couple ways to go about this. Tacking a boolean `exactTime` column onto `batches` would be sufficient and minimalist, but if you want to do something like 8am to 10am *every Monday* then there's a whole recurrence piece that would have to be bolted on as [most likely] separate table(s). In that case it'd probably make more sense to have a separate interface for creating & managing the batches' attributes but it could probably share `EditBatchPage.php` for adding/removing items.\r\n\r\nThat's quite the undertaking though. The easier, not generic way would be to write put a `TotalAction` in a plugin that rewrites pricing based on time and hardcode the items that it applies to somewhere. Depending how often these deals change that might be perfectly acceptable."}}
{"actor":{"display_login":"gohanman"}}