@extends('backend.layouts.app') @section('content')
{{ translate('Basic Affiliate')}}
@csrf
@php if(\App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first() != null){ $percentage = \App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->percentage; $status = \App\Models\AffiliateOption::where('type', 'user_registration_first_purchase')->first()->status; } else { $percentage = null; } @endphp

{{ translate('Product Sharing Affiliate')}}

@csrf
@php if(\App\Models\AffiliateOption::where('type', 'product_sharing')->first() != null && \App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details != null){ $commission_product_sharing = json_decode(\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details)->commission; $commission_type_product_sharing = json_decode(\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->details)->commission_type; $status = \App\Models\AffiliateOption::where('type', 'product_sharing')->first()->status; } else { $commission_product_sharing = null; $commission_type_product_sharing = null; } @endphp

{{ translate('Product Sharing Affiliate (Category Wise)')}}

@csrf @php if(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first() != null){ $category_wise_affiliate_status = \App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->status; } @endphp
@if (\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first() != null) @foreach (\App\Models\Category::all() as $key => $category) @php $found = false; @endphp @if(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->details != null) @foreach (json_decode(\App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->details) as $key => $data) @if($data->category_id == $category->id) @php $found = true; $value = $data; @endphp @endif @endforeach @endif @if ($found)
@else
@endif @endforeach @endif
{{ translate('N:B: You can not enable Single Product Sharing Affiliate and Category Wise Affiliate at a time.') }}

{{ translate('Affiliate Link Validatin Time (Days)')}}

@csrf @php $validation_time_info = \App\Models\AffiliateConfig::where('type', 'validation_time')->first(); $validation_time = ''; if($validation_time_info) { $validation_time = $validation_time_info->value; } @endphp
Days
@endsection