i am using bagisto eCommerce system and now i want to add a pop up like a modal or a sweet alert to the page where user add the product to the shopping cart . so here is the code :
add-to-cart.blade.php
<button
type="submit"
{{ ! $product->isSaleable() ? 'disabled' : '' }}
class="theme-btn {{ $addToCartBtnClass ?? '' }}">
@if (! (isset($showCartIcon) && !$showCartIcon))
<i class="material-icons text-down-3">shopping_cart</i>
@endif
{{ __('shop::app.products.add-to-cart') }}
</button>
and this file is contained in view.blade.php :
<div class="product-actions">
@include ('shop::products.add-to-cart', [
'form' => false,
'product' => $product,
'showCompare' => true,
'showCartIcon' => false,
])
and some how i feel this script is related to this part but i am not sure :
<script type="text/x-template" id="product-view-template">
<form
method="POST"
id="product-form"
@click="onSubmit($event)"
action="{{ route('cart.add', $product->product_id) }}">
<input type="hidden" name="is_buy_now" v-model="is_buy_now">
<slot v-if="slot"></slot>
<div v-else>
<div class="spritespin"></div>
</div>
</form>
</script>