From ea20e3e43fff012216bdbfe753577f87cf883cd0 Mon Sep 17 00:00:00 2001 From: jitendra Date: Wed, 30 Mar 2022 12:55:55 +0530 Subject: [PATCH] Issue #6158 fixed --- .../shop/default/products/view/booking/event.blade.php | 10 ++++++++-- .../velocity/products/view/booking/event.blade.php | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php index 37a1791f8..2d0e96c0a 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/shop/default/products/view/booking/event.blade.php @@ -38,8 +38,8 @@ + :quantity="defaultQty" + :min-quantity="defaultQty"> @@ -61,6 +61,12 @@ return { tickets: @json($bookingSlotHelper->getTickets($bookingProduct)), } + }, + + computed: { + defaultQty: function() { + return this.tickets.length > 1 ? 0 : 1; + } } }); diff --git a/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php index 37a1791f8..2d0e96c0a 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/shop/velocity/products/view/booking/event.blade.php @@ -38,8 +38,8 @@ + :quantity="defaultQty" + :min-quantity="defaultQty"> @@ -61,6 +61,12 @@ return { tickets: @json($bookingSlotHelper->getTickets($bookingProduct)), } + }, + + computed: { + defaultQty: function() { + return this.tickets.length > 1 ? 0 : 1; + } } });