@extends('master') @section('content')
@if (session()->has('product_id')) @php $id = session()->get('product_id'); $article = App\Models\Article::select('title','edition_id')->where('id', $id)->first(); $sale_tax = App\Models\Helper::getSaleTax(); $price = App\Models\Helper::getProductPrice($id); $currency_symbol = App\Models\Helper::getCurrencySymbol($currency); $tax = App\Models\Helper::calculateSaleTax($price,$sale_tax); $total = App\Models\Helper::calculateGrandTotal($tax,$price); $image = App\Models\Helper::getEditionImage($article->edition_id,'small'); @endphp

{{{trans('Checkout')}}}

{{{trans('Item Title')}}} {{{trans('Product Price')}}}
@if(!empty($image))
@endif

{{{$article->title}}}

{{{ $currency_symbol }}} {{{$price}}}
{{{trans('Product Subtotal')}}}: {{{ $currency_symbol ." ". $price}}}
{{{trans('Taxes')}}}: {{{$currency_symbol ." ". $tax}}}
{{{trans('Grand Total')}}} {{{ $currency_symbol ." ". $total}}}
@php session()->put(['product_title' => e($article->title)]); session()->put(['product_price' => e($total)]); if (!empty($tax)){ session()->put(['product_vat' => e($tax)]); } @endphp @endif
@endsection