1. What is in this package
| Path | Purpose |
|---|---|
index.php | SW Group central landing / portal page |
gwm/ | GWM Lenasia landing page (Tank 300 hero, full range, enquiry forms) |
omoda-jaecoo/ | OMODA JAECOO Boksburg promotions landing page |
suzuki/ | Suzuki Lenasia deals & offers landing page |
virtual-test-drive/ | Virtual Test Drive experience (360° view, cabin hotspots, drive simulation) |
admin/ | Dealership CRM dashboard (leads, follow-ups, test drives, service, finance, campaigns, reports, settings) |
forms/submit.php | Single secure lead-capture endpoint used by every page |
includes/ | Bootstrap, database, helpers, CSRF, mailer, lead pipeline, auth, shared UI partials |
config/ | database.php, mail.php, app.php — the only files you must edit |
database/schema.sql | Full MySQL schema (tables, indexes, foreign keys) |
database/demo_data.sql | Demo dealerships, 31 vehicles, sales staff, 36 leads, campaigns, admin user |
assets/ | CSS, JS, vehicle photography, logos, favicon |
vendor/phpmailer/ | PHPMailer 6.9.1 (SMTP sending, no Composer required) |
unsubscribe.php | Public token-based marketing opt-out page (POPIA) |
.htaccess, robots.txt, sitemap.xml, 404.php | Apache rules, SEO files, error page |
2. Server requirements
- PHP 8.0 or newer (tested on PHP 8.4) with
pdo_mysql,mbstring,openssl,json,filter - MySQL 5.7+ / MariaDB 10.3+ (tested on MariaDB 11.4)
- Apache with
mod_rewrite(standard on cPanel) - An SMTP mailbox on your domain (cPanel → Email Accounts)
- No Composer, no shell access and no Node.js required
3. Installation on cPanel (about 15 minutes)
Step 1 — Upload the files
- cPanel → File Manager → open
public_html(or the document root of the add-on domain). - Upload
swgroup_v1.zip. - Select the file → Extract.
- Open the extracted
swgroup_v1folder, select all items, and Move them into the document root so thatindex.phpsits directly inpublic_html. Then delete the empty folder and the ZIP.
.htaccess is moved along with the rest.Step 2 — Create the database
- cPanel → MySQL® Database Wizard.
- Database name:
swgroup(cPanel will prefix it, e.g.cpuser_swgroup). - Create a user, e.g.
swuser, with a strong password. Save both values. - Grant ALL PRIVILEGES to that user on the database.
Step 3 — Import the SQL
- cPanel → phpMyAdmin → select your new database.
- Import → choose
database/schema.sql→ Go. - Import again → choose
database/demo_data.sql→ Go.
dealerships, vehicles, leads, lead_notes, lead_activity, customers, test_drives, finance_applications, service_bookings, email_campaigns, campaign_recipients, salespeople, users, settings and login_attempts.Step 4 — Configure the database connection
Edit config/database.php:
return [
'host' => 'localhost',
'name' => 'cpuser_swgroup',
'user' => 'cpuser_swuser',
'password' => 'your-database-password',
'charset' => 'utf8mb4',
];
Step 5 — Configure email (SMTP)
Create a mailbox in cPanel → Email Accounts (for example leads@yourdomain.co.za), then edit config/mail.php:
return [
'host' => 'mail.yourdomain.co.za',
'port' => 465,
'encryption' => 'ssl', // 'ssl' for 465, 'tls' for 587
'username' => 'leads@yourdomain.co.za',
'password' => 'mailbox-password',
'from_email' => 'leads@yourdomain.co.za',
'from_name' => 'SW Group Automotive',
'admin_email' => 'sales@yourdomain.co.za',
];
Step 6 — Set the site basics
Edit config/app.php: site URL, dealership phone numbers, WhatsApp numbers, opening hours and the Google Analytics / Meta Pixel IDs if you have them.
Step 7 — Log in to the CRM
Visit https://yourdomain.co.za/admin/
| Username | Password |
|---|---|
Admin | SWgroup.01 |
Step 8 — Finish the SEO files
Replace example.co.za with your real domain in robots.txt and sitemap.xml.
4. Removing the demo data before going live
Run this in phpMyAdmin → SQL when you are ready for real customers. It keeps the dealerships, vehicles, staff and your admin user, and clears only the demo leads.
SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE lead_notes; TRUNCATE TABLE lead_activity; TRUNCATE TABLE test_drives; TRUNCATE TABLE finance_applications; TRUNCATE TABLE service_bookings; TRUNCATE TABLE campaign_recipients; TRUNCATE TABLE email_campaigns; TRUNCATE TABLE customers; TRUNCATE TABLE leads; SET FOREIGN_KEY_CHECKS = 1;
5. How the system works
Lead capture
Every form on every landing page posts to forms/submit.php over AJAX with a CSRF token. That endpoint validates the input, saves the lead with a reference (SW-00001), records the source page, UTM parameters, gclid / fbclid, referrer and device, assigns a salesperson round-robin, scores the lead, writes the matching booking record (test drive / finance / service), upserts the customer, then sends the confirmation and notification emails.
Lead types handled
GENERAL— general enquiryTEST_DRIVE— creates a test drive bookingFINANCE— creates a finance applicationSERVICE— creates a workshop bookingTRADE_IN,PARTS,PROMOTION,VIRTUAL_TEST_DRIVE
CRM modules
| Page | What it does |
|---|---|
| Dashboard | KPI cards, 14-day lead trend, newest leads, source breakdown |
| Leads | Filter by dealership, status, type, salesperson, date and search; bulk status change; CSV export |
| Lead workspace | Full attribution, notes timeline, status & score, follow-up scheduling, send an email to the customer |
| Follow-ups | Everything due today / overdue / upcoming per salesperson |
| Test drives / Service / Finance | Dedicated pipelines with confirm, complete and cancel actions |
| Campaigns | Build an audience (dealership, status, consent), preview the HTML, send in paced batches |
| Customers | De-duplicated customer database with marketing consent state |
| Vehicles / Dealerships | Stock, pricing, promotions, featured flags; dealership details and staff |
| Reports | Leads by dealership, source, type and month; conversion rates |
| Settings | Site settings and admin passwords |
Email campaigns on shared hosting
Campaigns send in batches with a short pause between messages so you stay inside your host's hourly mail limit. Leave the sending page open until it reports Completed; it resumes safely if interrupted. Only customers who granted marketing consent and have not unsubscribed are included.
6. Security notes
- Passwords are stored with
password_hash(); login attempts are rate limited. - All output is escaped; all database access uses prepared statements.
- Every form is CSRF protected and validated server-side as well as in the browser.
.htaccessblocks direct web access toconfig/,includes/,database/andvendor/.- Keep HTTPS enabled (cPanel → SSL/TLS Status → AutoSSL).
7. Troubleshooting
| Symptom | Fix |
|---|---|
| "Database connection failed" | Check the four values in config/database.php; the cPanel prefix is part of both the database and user name. |
| Blank white page | cPanel → PHP Selector: set PHP 8.0+. Then check Errors in cPanel Metrics for the exact message. |
| Forms say "Session expired" | The page was open for a long time — refresh and resubmit. Ensure PHP sessions are writable. |
| Emails not arriving | Verify SMTP host/port/password, try port 587 with tls, and check the mailbox is not over quota. Leads are still saved regardless. |
| Images not loading | Confirm the assets/ folder moved with the rest of the files and that site_url in config/app.php matches your domain. |
| 404 on /gwm | mod_rewrite or .htaccess missing — use /gwm/ with the trailing slash, and re-upload the hidden .htaccess. |
| Admin login loops | Clear cookies for the domain; make sure you are on HTTPS consistently. |
8. Demo credentials summary
| Area | URL | Login |
|---|---|---|
| SW Group home | / | public |
| GWM Lenasia | /gwm/ | public |
| OMODA JAECOO Boksburg | /omoda-jaecoo/ | public |
| Suzuki Lenasia | /suzuki/ | public |
| Virtual Test Drive | /virtual-test-drive/ | public |
| CRM | /admin/ | Admin / SWgroup.01 |
All vehicle photography in this package is generated for demonstration purposes. Replace it with official manufacturer imagery before commercial use, and confirm all pricing with the dealership before publishing.