@extends('layouts.front.app') @section('css') @if (config('clearsale.fingerprint')) @endif @endsection @section('content')
@php use Illuminate\Support\Str; use App\Shop\Orders\Order; $formaPagamento = explode(",", config('payees.name')); $order_id = ''; $order = null; $valFrete = ($valorFrete) ?? 0.00; $valTotal = ($total) ?? 0; $desconto = request()->desconto ?? 0.00; $subtotal = floatVal(request()->subTotal); $order_id = request()->id; if(isset($order_id)) { $order_id = $order_id; $pedido = Order::find($order_id); } if (isset($pedido)) { // $valFrete = floatval($pedido->total_shipping); $valTotal = floatval($pedido->total); } if (session()->has('delivery')) { $valFrete = session('delivery')["w_pedido_vl_frete"]; $valTotal = floatval($valFrete) + floatval($cartTotal); } $valTotal = floatVal(request()->subTotal) - floatVal($desconto) + $valFrete; $total = $valTotal; $valorTotal = $valTotal; @endphp @if(request()->session()->has('delivery')) @php $valorFrete = request()->session()->get('delivery')['w_pedido_vl_frete']; @endphp @else @endif @if (session()->has('delivery')) @else @endif {{-- Para o comprador --}}

Ao Clicar no botão abaixo, você será redirecionado para um ambiente seguro de pagamento.

Após a conclusão do pagamento, esta tela será atualizada.

Ir ao PagSeguro

Ao Clicar no botão abaixo, você será gerado um boleto para você.

Após a geração, esta tela será atualizada.

Gerar Boleto

Resumo

    @if ($getCartItems && $getCartItems->count() > 0)
  • Itens

    @foreach($getCartItems as $product)
    {{ $product->name }} @if (!$order && $product->options->combination) ({{ $product->options->combination[0]['value'] }}) @endif
    @if(isset($product->pivot)) {{ $product->pivot->quantity }} x @else @if(isset($product->qty)) {{ $product->qty }} x @endif @endif
    {{ config('cart.currency_symbol') }} {{ number_format($product->price, 2, ',', '.') }}
    @endforeach

  • Descontos @if (config('cart.desconto_dinheiro') || config('cart.desconto_avista')) (à vista) @endif
    {{ config('cart.currency_symbol') }} {{ number_format($desconto, 2, ',','.') }}
    @if ($desconto > 0)
    Valor com desconto
    @php $valorDescontado = floatVal($subtotal) - $desconto; @endphp {{ config('cart.currency_symbol') }} {{ number_format($valorDescontado, 2, ',','.') }}
    @endif @if (!isset($order_paid) || $order_paid > 1) @endif
  • Frete
    {{ config('cart.currency_symbol') }} {{ number_format(floatval($valFrete), 2, ",", ".") }}
  • Total
    {{ config('cart.currency_symbol') }} {{ number_format($valTotal, 2, ",", ".") }}
  • @endif @if (isset($pedido))
  • Produtos no pedido

    @foreach($pedido->products as $product)
    {{ $product->name }} @if ($product->attributes->count() > 0) @endif
    @if(isset($product->pivot)) {{ $product->pivot->quantity }} x @else @if(isset($product->qty)) {{ $product->qty }} x @endif @endif
    {{ config('cart.currency_symbol') }} {{ number_format(floatval($product->price), 2, ',', '.') }}
    @endforeach
  • Frete
    {{ config('cart.currency_symbol') }} {{ number_format(floatval($pedido->total_shipping), 2, ",", ".") }}
  • Total
    {{ config('cart.currency_symbol') }} {{ number_format(floatval($pedido->total), 2, ",", ".") }}
  • @endif @if(session()->has('delivery')) @php $valFrete = session('delivery')["w_pedido_vl_frete"]; $delivery = collect(session('delivery')); @endphp
  • @if (intval($delivery["w_pedido_entr_tipo"]) === 2)
    Dados da entrega
    @else
    Pedido a ser retirado
    @endif
      @php $periodo = ($delivery["w_pedido_id_entr_periodo"] === 1) ? 'pela manhã' : 'na parte da tarde'; $comp = ($delivery["w_pedido_entrega_complem"]) ? "(" . $delivery["w_pedido_entrega_complem"] .")" : ""; $endereco = $delivery["w_pedido_entrega_logr"] . ", " . $delivery["w_pedido_entrega_numero"] . $comp . " - " . $delivery["w_pedido_entrega_bairro"] . "
      "; $endereco .= "CEP: ". $delivery["w_pedido_entrega_cep"] . "-" . $delivery["w_pedido_entrega_munic"] ."/".$delivery["w_pedido_entrega_uf"] ; @endphp @if (intval($delivery["w_pedido_entr_tipo"]) === 2)
    • Entregar para: {{$delivery["w_pedido_entrega_nome"]}}
    • Entregar no dia: {{$delivery["w_pedido_data_saida"]}}
    • Período {{$periodo}}
    • Local da entrega: {!! $endereco !!}
    • Referência {{$delivery["w_pedido_entrega_prox"]}}
    • @else
    • Irei retirar no dia: {{$delivery["w_pedido_data_saida"]}}
    • Período {{$periodo}}
    • @endif
    @if ($delivery["w_pedido_cartao_tit"] !== '')
  • Cartão de presente

    • Título: {{$delivery["w_pedido_cartao_tit"]}}
    • Mensagem: {{$delivery["w_pedido_cartao_msg"]}}
    • Assinado: {{$delivery["w_pedido_cartao_ass"]}}
  • @endif
  • @if (config('site.checkout.novo')) @else
    {{ csrf_field() }}
    @endif
  • @endif
@endsection @section('js') @if(config('pagseguro.environment') === "sandbox") @else @endif @endsection