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/stafa.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">
        <div class="l-contain  o-block"></div>
        <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)
                                <?php /** @var \App\Komma\Shop\Cart\ShoppingCartItem $item */?>
                                <li>
                                    <h3>{{$item->getProductable()->getDisplayName()}}</h3>
                                    <a href="#" class="js-remove-item-from-shoppingcart" data-product-id="{{ $item->getProductable()->id }}" data-product-type="{{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="#" class="js-change-quantity-of-shoppingcart-item" data-shoppingcart-item-id="{{ $item->getId() }}" data-quantity="{{ $item->getQuantity() - 1 }}">-</a> {{$item->getQuantity()}}
                                    <a href="#" class="js-change-quantity-of-shoppingcart-item" data-shoppingcart-item-id="{{ $item->getId() }}" data-quantity="{{ $item->getQuantity() + 1 }}">+</a>
                                    |
                                    {{ $regionInfo->getCurrencySymbol().' '.$regionInfo->getNumberFormat()->centsToCurrency($item->getTotal()) }}
                                </li>
                            @endforeach
                        </ul>
                    @else
                        @lang('shop/cart.no_products') <br>
                    @endif

                    <a href="#" class="js-add-product-to-shoppingcart" dusk="addRandomProduct"  data-product-id="{{ rand(1, (\App\Komma\Shop\Products\Product\Product::count() - 1))  }}" data-product-type="{{ \App\Komma\Shop\Products\Product\Product::class  }}">Voeg een (random) product toe</a><br>
                    <a href="#" class="js-add-product-to-shoppingcart" dusk="addProductWithId1" data-product-id="1" data-product-type="{{ \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