fix(settings): read SuperAdmin overlay via ConfigService everywhere

This commit is contained in:
2026-08-22 15:10:54 +03:30
parent 197b49b719
commit 7bdb2c91a0
9 changed files with 31 additions and 35 deletions
@@ -1696,12 +1696,12 @@ class SingleOrderController extends Controller
private function bonusGift($customer, $referrer)
{
$bonus = Setting::where('key', 'referral_bonus_amount')->where('is_active', 1)->first();
if ($bonus === null) {
$bonusRaw = app(\App\Services\ConfigService::class)->getString('referral_bonus_amount');
if ($bonusRaw === '') {
return false;
}
$bonus = json_decode($bonus->value, true);
$bonus = json_decode($bonusRaw, true);
$customer_bonus = $bonus[0]['customer'] ?? 0;
$referrer_bonus = $bonus[0]['referrer'] ?? 0;