['cybermail_api_key', 'cybermail_from_email', 'cybermail_from_name', 'email_notifications_enabled'], 'twilio' => ['twilio_account_sid', 'twilio_auth_token', 'twilio_phone_number', 'sms_notifications_enabled'], 'push' => ['vapid_public_key', 'vapid_private_key', 'push_notifications_enabled'], 'loyalty' => ['loyalty_enabled'] ]; if (isset($settingsMap[$section])) { foreach ($settingsMap[$section] as $key) { $value = $_POST[$key] ?? ''; $existing = db()->fetch("SELECT id FROM settings WHERE setting_key = :key", ['key' => $key]); if ($existing) { db()->query( "UPDATE settings SET setting_value = :value, updated_at = NOW() WHERE setting_key = :key", ['value' => $value, 'key' => $key] ); } else { db()->insert('settings', [ 'setting_key' => $key, 'setting_value' => $value ]); } } setFlash('success', ucfirst($section) . ' settings saved successfully!'); } redirect('/admin/integrations.php'); } // Load current settings $settings = []; $allSettings = db()->fetchAll("SELECT setting_key, setting_value FROM settings"); foreach ($allSettings as $s) { $settings[$s['setting_key']] = $s['setting_value']; } ?>

CyberMail

Send transactional emails (order confirmations, shipping updates, etc.)

Manage at CyberMail Dashboard

">

Twilio SMS

Send SMS notifications for orders, shipping updates, and promotions

Get your credentials from Twilio Console

Push Notifications

Web push notifications for order updates and promotions

Generate VAPID keys at Web Push Codelab

Loyalty Program

Reward customers with points and tiers (Bronze, Silver, Gold, Platinum)

Tier Structure

Tier Min Points Multiplier Key Benefits
Bronze Bean 0 1x 1 point/$1, Birthday reward
Silver Roast 500 1.25x Free shipping $25+, Double points weekends
Gold Blend 1,500 1.5x Free shipping all orders, Priority support
Platinum Reserve 5,000 2x Express shipping, VIP events, Account manager

100 points = $1 credit • Points earned on every purchase