getCustomerTier($customer['customer_id']); $tiers = loyalty()->getTiers(); $conversion = loyalty()->getConversionInfo(); $history = loyalty()->getHistory($customer['customer_id'], 20); // Handle redemption if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['redeem_points'])) { $points = intval($_POST['points'] ?? 0); if ($points >= 100) { $result = loyalty()->redeemPoints($customer['customer_id'], $points); if ($result['success']) { setFlash('success', "Successfully redeemed {$points} points for " . formatCurrency($result['credit_value']) . " wallet credit!"); } else { setFlash('error', $result['error']); } } else { setFlash('error', 'Minimum 100 points required for redemption'); } redirect('/account/rewards.php'); } require_once __DIR__ . '/../includes/header.php'; require_once __DIR__ . '/includes/sidebar.php'; ?>
Earn points and unlock exclusive benefits
You've reached the highest tier!
Enjoy all the exclusive benefits of = $loyaltyStatus['info']['name'] ?>
Convert your points to wallet credit. = $conversion['points_for_one_dollar'] ?> points = $1
= 100): ?>You need at least 100 points to redeem. Keep shopping to earn more!
No points activity yet
| Date | Activity | Points |
|---|---|---|
| = formatDate($tx['created_at']) ?> | 'fa-plus-circle', 'redeem' => 'fa-gift', 'tier_upgrade' => 'fa-arrow-up', 'birthday_bonus' => 'fa-birthday-cake', 'referral_bonus', 'referral_welcome' => 'fa-user-plus', default => 'fa-circle' }; ?> = htmlspecialchars($tx['description'] ?? ucfirst(str_replace('_', ' ', $tx['type']))) ?> | = $tx['points'] > 0 ? '+' : '' ?>= number_format($tx['points']) ?> |