HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/veltech.komma.pro/resources/views/shop/pages/shoppingCart.blade.php
@extends('site.master')

{{--@section('title', $page->translation->title)--}}
{{--@section('meta_description', $productTranslation->meta_description)--}}

@section('content')
    <div class="o-body o-blocks">
        <div class="l-contain  o-block">
            <h1>@lang('shop/cart.cart')</h1>

            <div class="l-bisection">
                <div class="l-bisection__item shoppingcartItemList">
                    @if(!empty($items))
                        <ul dusk="shoppingCartItemList">
                            @foreach($items as $item)
                                <li>
                                    <h3>{{$item->getProductable()->getDisplayName()}}</h3>
                                    <a href="#"
                                       onclick="ShoppingCart.removeItemFromShoppingcart({{$item->getProductable()->id}}, '{{str_replace('\\','\\\\', (get_class($item->getProductable())))}}')">x</a>
                                    @if(is_array($item->getProductable()->images) > 0) <img
                                            src="{{$item->getProductable()->images[0]["small_image_url"]}}"/> @endif
                                    {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getProductable()->price) }}
                                    <a href="#"
                                       onclick="ShoppingCart.setItemAmountInShoppingcart({{$item->getId()}}, {{$item->getAmount()-1}})">-</a> {{$item->getAmount()}}
                                    <a href="#"
                                       onclick="ShoppingCart.setItemAmountInShoppingcart({{$item->getId()}}, {{$item->getAmount()+1}})">+</a>
                                    |
                                    {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getTotal()) }}
                                </li>
                            @endforeach
                        </ul>
                    @else
                        @lang('shop/cart.no_products') <br>
                    @endif
                    <a href="#" dusk="addRandomProduct"
                       onclick="ShoppingCart.addProductToShoppingcart(Math.floor(Math.random() * ({{ \App\Komma\Shop\Products\Product\Product::count() }} - 1) ) + 1,  '{{ str_replace('\\','\\\\', \App\Komma\Shop\Products\Product\Product::class)  }}')">Voeg
                        een (random) product toe</a><br>
                    <a href="#" dusk="addProductWithId1"
                       onclick="ShoppingCart.addProductToShoppingcart(1,  '{{ str_replace('\\','\\\\', \App\Komma\Shop\Products\Product\Product::class)  }}')">Voeg
                        product met id 1 toe aan winkelwagen</a>
                </div>
                <div class="l-bisection__item shoppingCartInfoBar">
                    <h3>@lang('shop/cart.order_overview') <br></h3>
                    @if($subTotal == $subTotalWithDiscounts)
                        <h4 dusk="subtotal">
                            @lang('shop/cart.subtotal'): {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($subTotal) }}</h4>
                    @else
                        <h4 dusk="subtotal_without_discounts">
                            @lang('shop/cart.subtotal'): {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($subTotalWithDiscounts) }}
                            <s>{{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($subTotal) }}</s>
                        </h4>
                    @endif

                    @if(!empty($items))
                        <form action="{{ route('checkout.show') }}" method="get">
                            <label class="submitButtonHolder">
                                <input class="button filled blue arrow" type="submit" dusk="checkout"
                                       value="@lang('shop/cart.checkout')">
                                <span class="arrow"></span>
                            </label>
                        </form>
                    @endif
                </div>
            </div>
        </div>
    </div>
@endsection