# Features — dev.sabullion (SA Bullion WordPress)

Evidence date: 2026-10-17. Source: `git@bitbucket.org:overdrive/dev.sabullion.git`, `master` `c58febf` (2020-07-12).

Status words:

- **Current on `master`** — present at `c58febf`, the only branch.
- **Retired in tree** — file or branch of code is still committed, and comments or `if (false)` show it is not on the live path.
- **Not in git** — named by the task-creation scan, but no blob exists at this commit.

"Current" means current in that git tree. Whether any host still deploys it is **Unknown / Requires Confirmation**.

## Current on `master`

### Public WordPress site

| Feature | Location | Notes |
|---|---|---|
| WordPress front | `index.php`, `.htaccess` | Standard rewrite to `/index.php`. Version `5.1.5` in `wp-includes/version.php` |
| Theme | `wp-content/themes/sabullion/` | Header name "Rocket Theme", Sage 8, version 1.2, author Grant Barnard (mustard.agency). The only theme in the tree |
| Our story | `template-story.php`, `content/about-story.txt` | Founders Hilton Davies, Helen, Imran, Clint |
| Facilities copy | `content/home-content.txt`, `content/bullion-*.txt`, `content/baraka-*.txt`, `partials/hasana.php`, `partials/bedrock.php` | BullionGold and HasanaGold. Baraka remains the file prefix for HasanaGold |
| Partnership | `template-partnership.php`, `content/partner-page.txt`, `content/partner-faq.txt` | Account links on this template point at `sabullion.co.za`. Header and footer point at the QA host |
| Gold price page scripts | `sab-api` enqueue for slug `the-gold-price`; `js/gold-pricing.js` | REST `GET /wp-json/api/v1/gold/index/` and `/gold/alt/` |
| SA gold / savings calculator | slug `south-african-gold-solutions`; `js/savings-calc.js` | |
| International / minted bar | slug `international-gold-solutions`; `js/minted-bar-investments-calc.js` | Currency forced to USD |
| Illustrations | slugs `investment-illustration`, `capital-investment-illustration`, `merged-investment-illustration`, `minted-bar-illustration` | Last commit adds an index graph on the investment calculator |
| Buy Krugerrand | slugs `buy-gold-from-us`, `buy-request`; `js/krugerrand-calc-overview.js` | |
| Sell Krugerrand | slugs `sell-gold-to-us`, `seller-details`; `js/krugerrand-sell.js` | |
| Contact, FAQ, documents, downloads, schedule, services, deal pages | `template-contact.php`, `template-faq.php`, `template-documents.php`, `template-download.php`, `template-schedule.php`, `template-services.php`, `template-deal-*.php` | Templates exist. Published pages are **Unknown** |
| Open account and sign in | `templates/header.php`, `templates/footer.php` | QA host `sabullion.overdriveqa.co.za/dashboard/login.php` |
| SweetAlert and sab-api CSS | `sab-api.php` `sab_api_scripts` | Loaded on every front-end page |

### sab-api (version 1.0)

Plugin name "SA Bullion Custom API Handler". Author Silicon Overdrive. URI `https://sabullion.co.za/`.

| Route | Method | Callback file |
|---|---|---|
| `/wp-json/api/v1/gold/alt/` | GET | `api/gold/alt.php` |
| `/wp-json/api/v1/gold/index/` | GET | `api/gold/index.php` |
| `/wp-json/api/v1/calc/index/` | GET | `api/calc/index.php` |
| `/wp-json/api/v1/altcalc/index/` | GET | `api/altcalc/index.php` |
| `/wp-json/api/v1/calc/minted-bar-index/` | GET | `api/calc/minted-bar-index.php` |
| `/wp-json/api/v1/email/index/` | GET | `api/email/index.php` |
| `/wp-json/api/v1/email/minted-bar-email/` | GET | `api/email/minted-bar-email.php` |
| `/wp-json/api/v1/upload/krugerrand/` | GET | `api/upload/upload-krugerrand-buy.php` |
| `/wp-json/api/v1/upload/krugerrand/sell/` | GET | `api/upload/upload-krugerrand-sell.php` |
| `/wp-json/api/v1/upload/minted-bar-investment/` | GET | `api/upload/upload-minted-bar-investment.php` |
| `/wp-json/api/v1/upload/savings/` | GET | `api/upload/upload-savings.php` |
| `/wp-json/api/v1/upload/investment/` | GET | `api/upload/upload-investment.php` |
| `/wp-json/api/v1/functions/` | GET and POST | `api/create/ajaxfunctions.php` |

`permission_callback` returns true on every route. A download route under `pdf-and-email/download/` is commented out.

Signup mailers live under `api/signup/` for client SA natural, SA legal, non-SA natural, non-SA legal, and IFA natural and legal.

### Legacy public PHP (still in the tree)

| Feature | Location | Notes |
|---|---|---|
| Page router | `helpers/requests.php` | Defaults to home. Facility `pageReq` branches (`iho`, `ibo`, and the savings set) are commented with "20190128 - NA, new URL's". About, partner, help, terms, privacy, mandate, complaints, FICA, access-to-info, and copyrights branches remain |
| Buy page | `krugerrand/buy/index.php` | Loads root `config/site.php` |
| Sell wizard | `krugerrand/sell/index.php` | Older `index-old.php`, `index-bkp.php`, `index.php20191119` kept beside it |
| Schedule drop-off | `scheduler/index.php` | Title "Schedule Drop Off". Cache flag false |
| Marketing copy | `content/*.txt` | Included by the legacy router and, where the theme still includes them, by the theme |
| Downloads library | `assets/templates/downloads/` and `download_files/` | Brochures, gold reports, forms, press PDFs, and audio. Filenames are the catalogue |

### Client portal

| Feature | Location | Notes |
|---|---|---|
| Sign-in | `dashboard/login.php`, `dashboard/api/login/index.php` | MD5 password against `applogin`. Roles HOUSE, IFA, CLIENT, UNAPPROVED-CLIENT, GLOBAL_ADMIN |
| Session length | `dashboard/config/site.php` | 3 days. Files under `dashboard/SESSION/` are committed |
| Client portfolio | `dashboard/templates/client/sidebar.php` | Overview, summary, statement, documents, password |
| Unapproved client | `dashboard/index.php` | Documents page only |
| IFA | `dashboard/templates/ifa/sidebar.php` | Portfolio, clients, gold price (parent `/gold-pricing`), saving calculator, investment calculator, quarterly report link to `/magazine/category/quarterly-report/` |
| House and global admin | `dashboard/templates/house/`, `dashboard/templates/global_admin/` | Team, clients, advisors |
| Page switch | `dashboard/helpers/requests.php` | `page` query, default `myportfolio` |
| Daily file cleanup | `dashboard/helpers/cron.daily.php` | Deletes pdf, png, xls when the flag is true. No scheduler in git |
| Document reminder | `dashboard/helpers/cron.documents.reminder.php` | Query only. No email send. Comment says every 48 hours |
| PDF and Excel output | `dashboard/pdf/`, `dashboard/excel/`, `dashboard/plugins/` (mPDF, PHPExcel, PHPMailer, dompdf) | Sample xls files are committed |
| Web-admin handoff | `dashboard/login.php` | Keeps the global-admin session when the referrer contains `/webadmin` |

### Commerce and CMS plugins (vendored)

Present under `wp-content/plugins/`. Active state is a WordPress option and is **Unknown**.

| Plugin | Version in header |
|---|---|
| WooCommerce | 4.1.1 |
| Gravity Forms | 2.4.11 |
| Elementor | 2.9.11 |
| Elementor Pro | 2.5.9 |
| Advanced Custom Fields PRO | 5.8.1 |
| Classic Editor | 1.5 |
| PayGate PayWeb3 for WooCommerce | 1.3.1 (`woocommerce-gateway-paygate-pw3`) |
| WooPay - PayGate | 1.1.4 |
| Custom Post Type UI, Duplicate Post, AJAX Load More, Bulk Page Creator, Gravity Forms CSS Ready Selector, Side Cart WooCommerce, WooCommerce Checkout Manager, WordPress Importer | Versions not opened |
| Directory `woo-eftsecure-gateway` | No PHP header was found in a filename search. Treat the directory as present and the plugin identity as **Requires Confirmation** |

### Deploy

`bitbucket-pipelines.yml` on `master`: Python 3.7.3 image, install `zip`, `git`, `git-ftp`, then `git ftp push`. `git ftp init` is commented out.

## Completed in this repository's history

The whole product surface above landed between 2020-05-12 and 2020-07-12. Notable completions:

- 2020-05-29 — `sab-api` and the gold price chart.
- 2020-06-01 — Krugerrand buy calculator, buy request form, delivery method.
- 2020-07-06 — savings and investment calculators merged.
- 2020-07-07 — minted-bar calculator hardcoded to USD; PDF download opens in a new tab.
- 2020-07-12 — investment calculator index graph (`c58febf`). That is the last commit.

## In development

Nothing. `master` is the only branch and it has not moved since 2020-07-12.

## Planned

No plan file, milestone, or issue list is in the repository. **Unknown**.

## Retired or leftover in the tree

| Item | Evidence |
|---|---|
| Legacy facility routes `pageReq=iho`, `ibo`, and the savings set | Commented in `helpers/requests.php` |
| IFA "add team" page | Condition ends in `&& false` in `dashboard/helpers/requests.php` |
| Salted password | `md5($SALT_KEY.$password)` commented; unsalted `md5($password)` is what runs |
| API authorization header check | Commented in `dashboard/api/login/login.php` |
| PDF download REST route | Commented in `sab-api.php` |
| Partner-fee block inside minted-bar upload | Commented, with the note "2020 - DONT KNOW IF THIS IS STILL APPLICABLE????" |
| `gform_next_button_4` filter | Commented in `sab-api.php` |
| Backup and dated copies | `*.bak`, `*20191119`, `*20200611`, `index-old.php`, `index-bkp.php`, `ajaxfunctions.php20191119` |
| mPDF tree named `mpdf_new_version_donotuse` | Path says not to use it. It is still committed |
| Harry's legal templates | `content/terms-of-use.txt`, `privacy-policy.txt`, `popi-notice.txt`, `client-mandate.txt` |

## Not in git

| Item | Note |
|---|---|
| `wp-config.php` | Listed in `.gitignore`. Absent from the commit |
| `sonar-project.properties`, `sonarqube_scan.bat` | Named in the onboarding scan. Absent from `c58febf` |
| WordPress pages, menus, forms, products, and which plugins are active | Database only |
| Pipeline FTP host | Environment variables, not the yaml |

## Removed

No release note describes a removal. The commented routes above are the only evidence of behaviour taken off the default path while the files stayed.
