@extends('admin.adminmaster') @section('title') Admin-Categories @endsection @section('content') @section('heading') Categories @endsection

CJ Dropshipping Products

@foreach ($products as $product)
Product Image
{{ $product['productName'] ?? '' }}
{{ $product['categoryName'] ?? 'Uncategorized' }}

Price: ${{ $product['sellPrice'] ?? 'N/A' }}

@php $originalPrice = isset($product['sellPrice']) ? preg_replace('/[^0-9.]/', '', $product['sellPrice']) : 0; $originalPrice = is_numeric($originalPrice) ? (float) $originalPrice : 0; // Ensure it's a float $increase = $originalPrice * 0.4; // 40% of the original price $finalPrice = $originalPrice + $increase; @endphp

Final Price (with 40% added): ${{ number_format($finalPrice, 2) }}

{{-- @if (!empty($product['variants']))
Variants:
@foreach ($product['variants'] as $variant) Product Image {{ $variant['variantNameEn'] ?? 'No Name' }} - ${{ $variant['variantSellPrice'] ?? 'N/A' }} @endforeach
@endif --}}
@endforeach
@php $prevPage = $page > 1 ? $page - 1 : 1; $nextPage = $page + 1; @endphp ⬅️ Previous Next ➡️
@section('script') @endsection @endsection