EZZESHOPS OMS - CPANEL STARTER
================================

IMPORTANT
This package is the deployment foundation. WooCommerce sync endpoint is included.
Courier provider API calls must be configured with your actual provider credentials
and the provider's current API contract before live shipment creation.

1) cPanel > MySQL Databases
   Create database, user, and assign user ALL PRIVILEGES.

2) cPanel > phpMyAdmin
   Import database.sql (if your hosting does not allow CREATE DATABASE, remove
   the first two lines and select the database before importing).

3) Upload this package.
   Recommended:
   /public_html/oms/
   The document root for your OMS should point to /public_html/oms/public
   if your cPanel supports domain/subdomain document roots.
   Otherwise put public/index.php at the domain root and adjust paths.

4) Copy .env.example to .env and fill database + WooCommerce credentials.
   NEVER publish .env.

5) PHP requirements:
   PHP 8.1+
   PDO MySQL
   cURL
   JSON

6) WooCommerce:
   WordPress Admin > WooCommerce > Settings > Advanced > REST API
   Create Read/Write key for Ezze OMS.
   Put key/secret into .env.

7) Webhook:
   WooCommerce > Settings > Advanced > Webhooks > Add webhook
   Topic: Order created
   Delivery URL:
   https://YOUR-OMS-DOMAIN/api/webhook/woocommerce.php
   Secret: same as WC_WEBHOOK_SECRET
   Also create Order updated webhook to the same endpoint.

8) Cron:
   Run sync every 5 minutes as fallback:
   */5 * * * * /usr/local/bin/php /home/CPANEL_USER/public_html/oms/api/sync.php

9) Security:
   Protect .env from web access. Use HTTPS. Add admin authentication before exposing
   the dashboard publicly. Do not paste API secrets into chat.

Next implementation:
- Admin login
- Order detail page
- One-click live Steadfast shipment
- Pathao shipment
- Carrybee shipment
- RedX shipment
- Tracking/status sync
- WooCommerce order status/meta updates
