Promo Codes Module - Nay Store
==============================

Folder:
app/admin/promo_codes/

Files:
- index.php
- list.php
- create.php
- edit.php
- view.php
- set_status.php
- toggle_status.php
- functions.php
- README.txt

Depends on:
- ../includes/config.php
- ../includes/auth.php (if exists)
- ../includes/header.php
- ../includes/sidebar.php (if exists)
- ../includes/footer.php

Database tables used:
- promo_codes
- promo_code_usage
- orders
- customers

Main features:
- Add promo code
- Edit promo code
- Activate / deactivate promo code
- Percent or fixed discount
- Minimum order amount
- Maximum discount amount (optional)
- Usage limit (optional)
- Start/end date and time (optional)
- Single use per customer flag
- View usage history and related orders

Important notes:
- This module does NOT change the database schema.
- The module reads the stored counter `used_count` and also displays actual usage rows from `promo_code_usage`.
- If your app logic depends on `used_count`, keep updating it from the app/order flow as usual.

Suggested sidebar link:
<a href="/app/admin/promo_codes/index.php">أكواد الخصم</a>
