You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/resources/views/segments/card/NsCard/NsCard.blade.php

46 lines
2.1 KiB
PHTML

<section class='NsCard'>
<div class="container-fluid">
@include('components.err')
@if(cardCount() == 0 )
<div class="alert alert-info">
{{__("There is nothing added to card!")}}
</div>
@else {{-- count 0--}}
<form method="post" class="safe-from" >
<input type="hidden" class="safe-url" data-url="{{route('client.card.check')}}">
@csrf
<ns-card
:items='@json(cardItems())'
:qs='{{\Cookie::get("q")}}'
symbol="{{config('app.currency.symbol')}}"
@if(auth('customer')->check())
:addresses='@json(auth('customer')->user()->addresses)'
@endif
card-link="{{route('client.product-card-toggle','')}}/"
discount-link="{{route('client.card.discount','')}}/"
product-link="{{route('client.product','')}}/"
:transports='@json(transports())'
:def-transport="{{defTrannsport()}}"
:can-pay="{{!auth('customer')->check() || auth('customer')->user()->mobile == null || auth('customer')->user()->mobile == '' || auth('customer')->user()->addresses()->count() == 0?'false':'true'}}"
>
<br>
@if(!auth('customer')->check())
<a href="{{ route('client.sign-in') }}" class="btn btn-danger text-light btn-lg w-100">
{{__("You need to sign in/up to continue")}}
</a>
@else
{{__("Welcome back")}}: <strong> {{auth('customer')->user()->name}} </strong>
@if(auth('customer')->user()->mobile == null || auth('customer')->user()->mobile == '' || auth('customer')->user()->addresses()->count() == 0)
<a href="{{ route('client.profile') }}" class="btn btn-danger text-light btn-lg w-100">
{{__("You need complete your information")}}
</a>
@endif
@endif
</ns-card>
@endif {{-- count 0--}}
</form>
</div>
</section>