@extends('frontend.layout.app') @section('content')
@php // Split the photos string into an array $photos = $product->photos ? explode(',', $product->photos) : []; @endphp
thumbnail_img) }} id="mainProductImage" class="w-100" height="500" alt="Img">

{{ $product->name }} @if($product->current_stock >= 1) @else @endif


Orignal Price:
{{ number_format($product->unit_price,2) }} @if($product->unit != null) /{{ $product->unit }} @endif
Discount Price:
@php $price= $product->unit_price-$product->discount; @endphp
Rs:{{ number_format($price,2) }} @if($product->unit != null) /{{ $product->unit }} @endif
@php $quan='1'; @endphp
@csrf
Quantity:

@if ($product->choice_options != null) @foreach (json_decode($product->choice_options) as $key => $choice)
{{ \App\Models\Attribute::find($choice->attribute_id)->name }}:
@foreach ($choice->values as $key => $value) @endforeach
@endforeach @endif @if (count(json_decode($product->colors)) > 0)
Color:
@foreach (json_decode($product->colors) as $key => $color) @php $colorObj = \App\Models\Color::where('code', $color)->first(); @endphp @endforeach

@endif
Total Price:
Rs:{{ number_format($price,2) }}

{{ $product->description }}

{{ $product->name }}

{{ $product->long_desc }}

@endsection