{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
@if (isset($showCompare) && $showCompare) @endif @if (! (isset($showWishlist) && !$showWishlist)) @include('shop::products.wishlist', [ 'addClass' => $addWishlistClass ?? '' ]) @endif
@if (isset($form) && !$form) @if ($product->type != "configurable" && $product->type == 'simple' && $product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder')) @if (core()->getConfigData('preorder.settings.general.percent')) @if (core()->getConfigData('preorder.settings.general.preorder_type') == 'partial')

{{ __('preorder::app.shop.products.percent-to-pay', ['percent' => core()->getConfigData('preorder.settings.general.percent')]) }}

@endif @endif @endif @if ($product->type == "configurable") @else @if ($product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder') && $product->type == 'simple') @else @endif @endif @elseif(isset($addToCartForm) && !$addToCartForm)
@csrf @if ($product->type != "configurable" && $product->type == 'simple' && $product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder')) @if (core()->getConfigData('preorder.settings.general.percent')) @if (core()->getConfigData('preorder.settings.general.preorder_type') == 'partial')

{{ __('preorder::app.shop.products.percent-to-pay', ['percent' => core()->getConfigData('preorder.settings.general.percent')]) }}

@endif @endif @endif @if ($product->type == "configurable") @else @if ($product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder') && $product->type == 'simple') @else @endif @endif
@else @if ($product->type != "configurable" && $product->type == 'simple' && $product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder')) @if (core()->getConfigData('preorder.settings.general.percent')) @if (core()->getConfigData('preorder.settings.general.preorder_type') == 'partial')

{{ __('preorder::app.shop.products.percent-to-pay', ['percent' => core()->getConfigData('preorder.settings.general.percent')]) }}

@endif @endif @endif @if ($product->type == "configurable") @if ($product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder')) @php $count = 0; foreach($product->variants as $variant) { if ($variant->allow_preorder && $variant->totalQuantity() < 1) { $count++; } if ($variant->totalQuantity() > 0) { $count = 0; break; } } @endphp @if($count > 0) @else isSaleable() ? 'false' : 'true' }} show-cart-icon={{ ! (isset($showCartIcon) && ! $showCartIcon) }} btn-text="{{ (! isset($moveToCart) && $product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}"> @endif @else isSaleable() ? 'false' : 'true' }} show-cart-icon={{ ! (isset($showCartIcon) && ! $showCartIcon) }} btn-text="{{ (! isset($moveToCart) && $product->type == 'booking') ? __('shop::app.products.book-now') : $btnText ?? __('shop::app.products.add-to-cart') }}"> @endif @else @if ($product->totalQuantity() < 1 && $product->allow_preorder && core()->getConfigData('preorder.settings.general.enable_preorder') && $product->type == 'simple') @else isSaleable() ? 'false' : 'true' }} show-cart-icon={{ !(isset($showCartIcon) && !$showCartIcon) }} btn-text="{{ $btnText ?? __('shop::app.products.add-to-cart') }}"> @endif @endif @endif
{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}