@extends('frontend::layouts.master') @section('content') @php $product = $data['product'][0] ?? null; @endphp
@php $images = !empty($product['imgs']) ? $product['imgs'] : ''; @endphp

{!! mwz_getTextString($product['name'] ?? '') !!}

@if (!empty($product['status']['new']))
{{ __('frontend::frontend.label.new') }}
@endif @if (!empty($product['status']['promotion']))
{{ __('frontend::frontend.label.promotion') }}
@endif

SKU : {{ $product['detail']['sku'] ?? '' }}

@if (!empty($product['detail']['brand']))

|

{{ $product['detail']['brand'] }}

@endif @if (!empty($product['detail']['category']))

|

{{ $product['detail']['category'] }}

@endif

{!! $product['desc'] ?? '' !!}

@if (!empty($product['file'])) @endif
@if (!empty($product['status']['promotion'])) @if (!empty($product['price']['after']))

{{ $product['price']['after'] ?? '' }} {{ __('frontend::frontend.label.thb') }}

{{ $product['price']['before'] ?? '' }} {{ __('frontend::frontend.label.thb') }}

@else

{{ $product['price']['before'] ?? '' }} {{ __('frontend::frontend.label.thb') }}

@endif @else

{{ $product['price']['before'] ?? '' }} {{ __('frontend::frontend.label.thb') }}

@endif
{{-- @if (!empty($data['product']) && $data['product']->price_sale->stock > 0) --}} @if (!empty($product))

{{ __('frontend::frontend.quantity') }}:

{{-- --}}
@php $buttons = [ [ 'class' => 'button-primary', 'text' => __('frontend::frontend.btn.add_to_cart'), 'onclick' => 'addToCart();', ], [ 'class' => 'button-secondary', 'text' => __('frontend::frontend.btn.buy_now'), 'onclick' => "addToCart('" . mwz_route('frontend.slug', ['slug' => 'cart']) . "');", ], ]; @endphp @if (Auth::guard('member')->check()) @foreach ($buttons as $button)
@endforeach @else @foreach ($buttons as $button) @endforeach @endif
@endif
@endsection @section('script') {{ module_vite('build-frontend', 'resources/assets/js/cart.js') }} @endsection