@extends('layouts.front.app') @section('og') @endsection @section('content') @include('layouts.front.shared.breadcrumb', ['tipo' => 'SG']) @if($product)
@include('layouts.front.shared.error-success')
@if(!$product->quantity > 0) @include('layouts.front.shared.favoritos') @endif @include('layouts.front.shared.floating-button')

{{ $product->name }}

SKU:{{ $product->sku }}


@if(count($productAttributes) > 0) {{-- Se o item possuir um variável, ele abrirá estas opções de produto --}} @php $list = 0; $list_tab = 0; @endphp
Tamanhos
{{-- Esta opção é para o Piccolino --}}
@foreach($productAttributes as $attribute)
@if ($attribute->sale_price && $attribute->sale_price > 0 && ($attribute->sale_price_ini <= now() && ($attribute->sale_price_fim > now() || $attribute->sale_price_ini === null))) de: {{ config('cart.currency_symbol') }} {{ $attribute->price }}

por: {{ config('cart.currency_symbol') }} {{ number_format($attribute->sale_price, 2, ',', '.') }}

@else

por: {{ config('cart.currency_symbol') }} {{ number_format($attribute->price, 2, ',', '.') }}

@endif

@php if ($attribute->sale_price && $attribute->sale_price > 0 && ($attribute->sale_price_ini <= now() && ($attribute->sale_price_fim > now() || $attribute->sale_price_ini === null))) { $preco_valido = $attribute->sale_price; } else { $preco_valido = $attribute->price; } $valorBoleto = (config('cart.desconto_boleto') > 0) ? $preco_valido - ($preco_valido * (config('cart.desconto_boleto') / 100)) : $preco_valido; $valor = 0.00; $parcela = 0; for($p = 1 ; $p <= config('cart.parc_sem_juros') ; $p++) { if (round($preco_valido / $p, 2)> config('cart.valor_min_parcela')) { $valor = $preco_valido / $p; $parcela = $p; } } @endphp

{{ config('cart.currency_symbol') }} {{ number_format($valorBoleto, 2, ',', '.') }} no boleto{{-- (somente para o site) --}}

@if(floatval($preco_valido) !== floatval($valor))

ou, em até {{ $parcela }}x de {{ config('cart.currency_symbol') }} {{ number_format($valor, 2, ',', '.') }} s/ juros{{-- (somente para o site) --}}

@else

@endif


{{-- Fim do Loop --}}
@php $list_tab++; @endphp @endforeach
@else{{-- Caso contrário, ele exibirá o item unitário --}}
@if ($product->sale_price && ($product->sale_price_ini <= now() && $product->sale_price_fim > now() || $product->sale_price_ini === null)) de: {{ config('cart.currency_symbol') }} {{ $product->price }}

por: {{ config('cart.currency_symbol') }} {{ number_format($product->sale_price, 2, ',', '.') }}

@else

por: {{ config('cart.currency_symbol') }} {{ number_format($product->price, 2, ',', '.') }}

@endif

@php if ($product->sale_price && ($product->sale_price_ini <= now() && $product->sale_price_fim > now() || $product->sale_price_ini === null)) { $preco_valido = $product->sale_price; } else { $preco_valido = $product->price; } $valorBoleto = (config('cart.desconto_boleto') > 0) ? $preco_valido - ($preco_valido * (config('cart.desconto_boleto') / 100)) : $preco_valido; $valor = 0.00; $parcela = 0; for($p = 1 ; $p <= config('cart.parc_sem_juros') ; $p++) { if (round($preco_valido / $p, 2)> config('cart.valor_min_parcela')) { $valor = $preco_valido / $p; $parcela = $p; } } @endphp

@if ($product->attributes->count() > 0) (A partir de) @endif {{ config('cart.currency_symbol') }} {{ number_format($valorBoleto, 2, ',', '.') }} no boleto

@if(floatval($preco_valido) !== floatval($valor))

ou, em até {{ $parcela }}x de {{ config('cart.currency_symbol') }} {{ number_format($valor, 2, ',', '.') }} s/ juros

@else

@endif

@endif @if($product->quantity > 0 || $product->attributes->count() > 0) @if($product->attributes->count() > 0) @else @endif @if(auth()->check())
{{ csrf_field() }} @if ($product->sale_price) @else @endif @if ($product->attributes->count() > 0) @endif
@else EFETUE LOGIN, PARA COMPRAR @endif @endif
@if(config('site.busca_correios')) @include("layouts.front.shared.frete_vue") @endif @if ($product->tags)
Tags: {!! $product->tags !!}
@endif
@include("layouts.front.shared.details-product") @else
Este item encontra-se indisponível no momento. Continue navegando no site.
@endif @endsection @section('js') @include('layouts.front.js.vueJS') {{--Arquivo com funções auto invocadas comum aos projetos--}} @include('layouts.front.js.iifeJS') {{--Arquivo com funções auto invocadas comum aos projetos--}} {{--Arquivo Anonimas comum aos projetos--}} @include('layouts.front.js.arrowJS') {{--Arquivo Anonimas comum aos projetos--}} {{--Arquivo Jquery comum aos projetos--}} @include('layouts.front.js.jqueryJS') {{--Arquivo Jquery comum aos projetos--}} @endsection