@if (!$stock)
Invalid item selected.
@else
{{ $stock->item->name }}
@if (Auth::check())
@include('widgets._wishlist_add', ['item' => $stock->item, 'small' => true])
@endif
Cost: {!! $stock->currency->display($stock->cost) !!}
@if ($stock->is_limited_stock)
Stock: {{ $stock->quantity }}
@endif
@if ($stock->purchase_limit)
Max {{ $stock->purchase_limit }} @if ($stock->purchase_limit_timeframe !== 'lifetime')
{{ $stock->purchase_limit_timeframe }}
@endif per user
@endif
@if ($stock->disallow_transfer)
Cannot be transferred after purchase
@endif
@if ($stock->item->parsed_description)
@endif
@if ($stock->shop->use_coupons)
You can use coupons in this store!
@if ($shop->allowed_coupons && count(json_decode($shop->allowed_coupons, 1)))
You can use the following coupons: @foreach ($shop->allAllowedCoupons as $coupon)
{!! $coupon->displayName !!}{{ $loop->last ? '' : ',' }}
@endforeach
@endif
@endif
@if (Auth::check())
@if (($stock->is_fto && Auth::user()->settings->is_fto) || !$stock->is_fto)
Purchase
In Inventory: {{ $userOwned->pluck('count')->sum() }}
@if ($stock->is_limited_stock && $stock->quantity == 0)
This item is out of stock.
@elseif($purchaseLimitReached)
You have already purchased the limit of {{ $stock->purchase_limit }} of this item @if ($stock->purchase_limit_timeframe !== 'lifetime')
within the {{ $stock->purchase_limit_timeframe }} reset
@endif.
@else
@if ($stock->purchase_limit)
You have purchased this item {{ $userPurchaseCount }} times @if ($stock->purchase_limit_timeframe !== 'lifetime')
within the {{ $stock->purchase_limit_timeframe }} reset
@endif.
@endif
{!! Form::open(['url' => 'shops/buy']) !!}
{!! Form::hidden('shop_id', $shop->id) !!}
{!! Form::hidden('stock_id', $stock->id) !!}
{!! Form::label('quantity', 'Quantity') !!}
{!! Form::selectRange('quantity', 1, $quantityLimit, 1, ['class' => 'form-control mb-3']) !!}
@if ($stock->use_user_bank && $stock->use_character_bank)
This item can be paid for with either your user account bank, or a character's bank. Please choose which you would like to use.
@elseif($stock->use_user_bank)
This item will be paid for using your user account bank.
{!! Form::hidden('bank', 'user') !!}
@elseif($stock->use_character_bank)
This item must be paid for using a character's bank. Enter the code of the character whose bank you would like to use to purchase the item.
{!! Form::hidden('bank', 'character') !!}
{!! Form::label('slug', 'Character Code') !!}
{!! Form::text('slug', null, ['class' => 'form-control']) !!}
@endif
@if ($stock->shop->use_coupons && $userCoupons !== null)
@if (Settings::get('limited_stock_coupon_settings') == 0)
Note that coupons cannot be used on limited stock items.
@endif
{!! Form::checkbox('use_coupon', 1, 0, ['class' => 'is-coupon-class form-control', 'data-toggle' => 'toggle']) !!}
{!! Form::label('use_coupon', 'Do you want to use a coupon?', ['class' => 'form-check-label ml-3 mb-2']) !!}
{!! Form::select('coupon', $userCoupons, null, ['class' => 'form-control mb-2', 'placeholder' => 'Select a Coupon to Use']) !!}
@elseif($stock->shop->use_coupons && $userCoupons == null)
You do not own any coupons.
@endif
{!! Form::submit('Purchase', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@endif
@else
You must be a FTO to purchase this item.
@endif
@else
You must be logged in to purchase this item.
@endif
@endif
@if (Auth::check())
@endif