# Features — sandwichbaronstore.co.za

Evidence date: 2026-10-04. Source: `master` at `c19a5e7` unless a row says `dev` or `qa`.

There is no features document in the source repository. Status here means what the code contains, not a release decision.

## Current (on `master`)

| Feature | What it does | Where |
|---|---|---|
| Home redirect | `index.php` sends the browser to `client.menu.php` | `index.php` |
| Registration | Name, address, suburb, phones, username, security question, password | `client.register.php`, `AddClientDetails` |
| Customer login | Email or username, active user and active security group, salted password or legacy MD5 field | `login.php`, `_framework/_nemo.password.cls.php` |
| Owner login shortcut | `OLOowner` Kpolo credentials redirect into web admin | `login.php` |
| Password reset | Reset email, username reminder, expiring reset link | `resetPassword.php`, `ajaxfunctions.php` `SendResetEmail`, `SendUsernameEmail` |
| Profile | Edit customer details; forced when suburb or branch is unusable | `client.profile.php`, `client.password.php` |
| Logoff | Ends the customer session | `client.logoff.php` |
| Menu and basket | OLO menu sheets, modifier groups, quantities, prices | `client.menu.php`, `includes/client.menu.cls.php` |
| Happy hour | Item only inside `OLOhappyHour` window | `client.menu.cls.php` `checkHappyHour` |
| Previous orders | List earlier orders for re-use | `renderPreviousOrdersMenuList`, `getPreviousOrderItems` |
| Delivery | Sales mode 4, ASAP or future date/time | `client.order.confirm.php`, `generateXML` |
| Collect | Sales mode 5, note prefix `THIS IS A COLLECT ORDER` | same, commits `bc4b3fa` through `4899e84` |
| Contactless | Note prefix and help text. Does not change sales mode | `client.order.confirm.php`, commits `c6e652d` through `c3d3eb8` |
| Cash on delivery | Per branch `kpoloEnableCash` | `client.order.confirm.php` |
| Card payment | NuPay, amount in cents, tip included | `payment/NuPayGateway.php`, `getPaymentGateway`, `paymentSuccess.php`, `paymentFailed.php` |
| EFT | FastPay when merchant fields are set | `getEFTPaymentGateway`, `paymentEFTNotify.php`, `paymentEFTSuccess.php`, `paymentEFTFailed.php` |
| Driver tip | Percentages from `oloDriverTip` | `client.order.confirm.php` |
| Change request | "Need Change for R…" appended to POS notes | `client.order.confirm.php` |
| Minimum order | Checkout button receives the calculated minimum | `getMinimumOrderValues`, checkout button in `client.menu.cls.php` |
| Branch offline | Stale `dtLastCheckin` sends the customer to an offline page | `client.menu.php`, `branchOffline.php` |
| Closed branch | `acceptNetOrders = 0` or `isClosed = 1` returns the customer to profile | `client.menu.php` |
| Order XML | `XOrderList` written to `tOrderXML` for the POS | `generateXML` |
| Branch API | Authenticate, update statuses, return one order, update check-in | `API/api.php` |
| Test order API | Inserts a synthetic order for a branch | `API/testorder.php` |
| Status email | Accept, acknowledge, reject, no response, success, fail | `project.functions.inc.php` `SendEmailOrder*` |
| Order timeout | Queued and in-process orders become Fail | `cron.daily.orderTimeoutCustomer.php` |
| Session cleanup | Day-old auth rows and two-day-old session files | same cron |
| Web-admin dashboard | Today's orders and status chart | `webadmin/index.php`, `includes/dashboard.cls.php` |
| Catalogue admin | Menus, items, types, message groups, region prices, delivery charges | `webadmin/t*.php` |
| Branch admin | Branch, hours, regions | `webadmin/tBranch.php`, `tBranchHours.php`, `tBranchRegion.php` |
| User admin | Separate web-admin and customer user / security-group / settings / email screens | `webadmin/webadmin.*.php`, `webadmin/customer.*.php` |
| FAQ admin | FAQ and FAQ console | `webadmin/faq.php`, `faq.console.php` |
| Order report | Filterable order list | `webadmin/reports/customer.order.list.rpt.php` |
| KingPOS import | ZIP import and staging copy into the customer database | `webadmin/cron.daily.import*.php` |
| Audit | Site actions and order actions | `UpdateAuditLog`, `UpdateAuditLogOrder`, `tAudit`, `tOrderAudit` |
| Refund policy page | Static policy dated 3 November 2009 | `refund.php` |
| Deploy | CodeDeploy to `/var/www/html/sandwichbaronstore/`, pipelines for `qa` and `prod` | `appspec.yml`, `bitbucket-pipelines.yml` |

## Completed in Git history (already on `master`)

These are not separate products. They are changes that landed before `master` stopped.

| When | Change | Commit |
|---|---|---|
| 2020-01-20 | EFT notify page; do not queue an order that is not NotPaid; cancelled payment status `-3` | `732b5b9` |
| 2020-01-21 to 2020-02-14 | Test-order API and extra email templates for it | `7825b8a`, `829fc47` |
| 2020-03-12 | Card payment log | `f041fc4` |
| 2020-03-17 to 2020-03-18 | Contactless delivery and help button | `c6e652d`, `27574e6`, `c3d3eb8` |
| 2020-03-18 | NuPay test portal switched to the live portal in the commit message | `15af9e3` |
| 2020-03-23 | Card gateway pointed back at a testing portal in the commit message | `845f6e5` |
| 2020-03-25 | Shutdown / closure message | `f3ee6b9` |
| 2020-03-27 | Lockdown message reverted; refund-policy fix | `52f3c96` |
| 2020-04-14 | Production changes (message only: "Changes for prod") | `ff08c8b` |
| 2020-06-10 to 2020-06-17 | Collect option, collect note, ASAP default fix | `bc4b3fa`, `f9f0036`, `4899e84` |
| 2020-06-25 | Beta check-in left as a comment; production check-in stays `Now()` | `c19a5e7` |

## On `dev` and not on `master`

| Feature | Since | Also on `qa`? | Where |
|---|---|---|---|
| POS status `Dispatch` emails the customer with template `Dispatch Notification` | 2020-07-27 `b622b16` | Yes | `API/api.php` |
| Google Tag Manager in the customer header | 2020-09-14 `4d71b98` | Yes | `layouts/header.incl.php` |
| Body-tag close fix | 2020-09-17 `72f2b8d` | Not verified | layouts |
| Minimum order uses the suburb value when it is non-zero, otherwise the provider value. It no longer adds them | 2020-11-23 `56891d5` | No | `project.functions.inc.php` |
| Public-holiday import ignores deleted rows | 2021-08-24 `254187a` | No | `webadmin/cron.daily.importStagingOLO.php` |
| Other edits labelled "Various updates" and "no message" | 2021-04-08, 2021-07-07 | No | See `git log master..origin/dev` |

## On `qa` and not on `master` or `dev`

| Feature | What the diff actually does | Commit |
|---|---|---|
| Check-in clock plus 2 hours | `dtLastCheckin = DATE_ADD(Now(), interval 2 hour)`. The commit title says "Added status Dispatch send email", which is not what the diff changes | `33ff936` |

`Dispatch` itself is already on `qa` via `b622b16`.

## Planned

No roadmap, ticket list, or TODO document in the repository describes future work. **Unknown / Requires Confirmation.**

Commented blocks (beta check-in, old localhost production database, unused payment URLs) are previous behaviour kept in comments. They are not a plan.

## In development

Nothing in Git is marked as an open branch that is ahead of `dev`. `dev` is the newest line and its last commit is 2021-08-24. Whether anyone still develops this repository is **Unknown / Requires Confirmation**.

## Recently changed (relative to `master`)

The newest behaviour anywhere in the remote is the 2021-08-24 public-holiday import fix on `dev`. The newest change on the default branch is the 2020-06-25 check-in comment.

## Deprecated or leftover

| Item | Evidence | Status |
|---|---|---|
| Lockdown login and layout copies | `login.lockdown.php`, `login.prelockdown.php`, `layout.basic.incl.lockdown.php`. Commit `52f3c96` says the lockdown message was reverted | Present on disk. Not the `login.php` entry point. Whether Apache still serves them is unknown |
| `*Copy*` and `*.bkp.php` files | Many duplicates of login, payment, and class files | Leftover working copies |
| Commented `tBranch` / `tSuburb` SQL | Replaced by `OLObranch`, `oloSuburb`, and related OLO tables | Old schema references. The OLO tables are what the active queries use |
| `payment/NuPayTestGateway.php` | Class file still in `payment/` | Not selected by `getPaymentGateway` on `master` |
| `phpinfo.php` | Web root | Not a product feature. Exposes PHP configuration if the file is reachable |
| WSDL under `API/wsdl/` | `service.wsdl.xml`, `wsdl.php` | `API/api.php` does not call it. The live API is query-string plus XML, not this WSDL. Whether anything still calls the WSDL is **Unknown / Requires Confirmation** |

## Not features

- Vendored admin UI libraries under `webadmin/vendors/` (Select2, Chart.js, Moment, and others).
- `dompdf`, `mpdf`, `PHPExcel`, `html2pdf`, `fpdi`.
- `emailtest.php` and `webadmin/email.test.php` are test senders, not a customer feature.
- `documents/RSVP_Import.xls` is a spreadsheet in the tree. No code path tying it to ordering was found. Purpose: **Unknown / Requires Confirmation**.
