@extends('admin.adminmaster') @section('title') Admin-Categories @endsection @section('content') @section('heading') Categories @endsection
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; @endphpFinal Price (with 40% added): ${{ number_format($finalPrice, 2) }}
{{-- @if (!empty($product['variants']))
{{ $variant['variantNameEn'] ?? 'No Name' }} -
${{ $variant['variantSellPrice'] ?? 'N/A' }}
@endforeach