Merge pull request #6658 from papnoisanjeev/slot-selection-issue-rental-booking-type-product

Slot duration selection message for one hour #6271
This commit is contained in:
Jitendra Singh 2022-08-29 11:17:40 +05:30 committed by GitHub
commit 1b7b78cbc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 31 additions and 2 deletions

View File

@ -172,7 +172,19 @@ class Booking extends Virtual
$bookingProduct = $this->getBookingProduct($data['product_id']);
if ($bookingProduct->type == 'event') {
if ($bookingProduct->type == 'rental') {
if (isset($data['booking']['slot']['from'])) {
$time = $data['booking']['slot']['to'] - $data['booking']['slot']['from'];
$hours = floor($time / 60) / 60;
if ($hours > 1) {
return trans('shop::app.checkout.cart.integrity.select_hourly_duration');
}
}
$products = parent::prepareForCart($data);
} elseif ($bookingProduct->type == 'event') {
if (
Carbon::now() > $bookingProduct->available_from
&& Carbon::now() > $bookingProduct->available_to

View File

@ -496,6 +496,7 @@ return [
'missing_links' => 'الروابط القابلة للتنزيل مفقودة لهذا المنتج.',
'qty_missing' => 'يجب أن يحتوي منتج واحد على الأقل على كمية واحدة.',
'qty_impossible' => 'لا يمكن إضافة أكثر من واحد من هذه المنتجات إلى سلة التسوق',
'select_hourly_duration' => 'حدد مدة الفتحة لمدة ساعة واحدة.',
],
'create-error' => 'صادفت بعض القضايا أثناء صناعة السيارات',
'title' => 'عربة التسوق',

View File

@ -494,6 +494,7 @@ return [
'missing_links' => 'এই পণ্যটির জন্য ডাউনলোডযোগ্য লিঙ্কগুলি অনুপস্থিত৷',
'qty_missing' => 'অন্তত একটি পণ্যে 1 পরিমাণের বেশি হওয়া উচিত।',
'qty_impossible' => 'এই পণ্যগুলির একটির বেশি কার্টে যোগ করা যাবে না।',
'select_hourly_duration' => 'এক ঘন্টার একটি স্লট সময়কাল নির্বাচন করুন।',
],
'create-error' => 'কার্টের উদাহরণ তৈরি করার সময় কিছু সমস্যার সম্মুখীন হয়েছে৷',
'title' => 'বাজারের ব্যাগ',

View File

@ -496,6 +496,7 @@ return [
'missing_links' => 'Downloadable links are missing for this product.',
'qty_missing' => 'Atleast one product should have more than 1 quantity.',
'qty_impossible' => 'Cannot add more than one of these products to cart.',
'select_hourly_duration' => 'Select a slot duration of one hour.',
],
'create-error' => 'Encountered some issue while making cart instance.',
'title' => 'Shopping Cart',

View File

@ -495,6 +495,7 @@ return [
'missing_links' => 'Faltan enlaces descargables para este producto.',
'qty_missing' => 'Al menos un producto debe tener más de 1 cantidad.',
'qty_impossible' => 'No se pueden agregar más de uno de estos productos al carrito.',
'select_hourly_duration' => 'Seleccione una duración de ranura de una hora.',
],
'create-error' => 'Se encontraron problemas con el carrito de compra',
'title' => 'Carrito de la compra',

View File

@ -491,6 +491,7 @@ return [
'missing_links' => 'لینک های قابل بارگیری برای این محصول وجود ندارد',
'qty_missing' => 'حداقل یک محصول باید بیش از 1 مقدار داشته باشد.',
'qty_impossible' => 'نمی توان بیش از یکی از این محصولات را به سبد خرید اضافه کرد',
'select_hourly_duration' => 'مدت زمان یک ساعت را انتخاب کنید.',
],
'create-error' => 'هنگام تهیه نمونه سبد خرید ، با برخی از شماره ها روبرو شد',
'title' => 'سبد خرید',

View File

@ -489,6 +489,7 @@ return [
'missing_links' => 'Il manque des liens téléchargeables pour ce produit.',
'qty_missing' => 'Au moins un produit doit avoir plus d\'une quantité.',
'qty_impossible' => 'Impossible d\'ajouter plus d\'un de ces produits au panier.',
'select_hourly_duration' => 'Sélectionnez une durée de créneau d\'une heure.',
],
'create-error' => 'J\'ai rencontré un problème lors de la création d\'une instance de panier.',

View File

@ -493,6 +493,7 @@ return [
'missing_links' => 'חסרים קישורים להורדה למוצר זה.',
'qty_missing' => 'לפחות מוצר אחד צריך לכלול יותר מכמות אחת.',
'qty_impossible' => 'לא ניתן להוסיף יותר מאחד מהמוצרים האלה לעגלה.',
'select_hourly_duration' => 'בחר משך משבצת של שעה אחת.',
],
'create-error' => 'נתקלתי בבעיה כלשהי בעת יצירת מופע של עגלה.',
'title' => 'עגלת קניות',

View File

@ -495,6 +495,7 @@ return [
'missing_links' => 'इस उत्पाद के लिए डाउनलोड करने योग्य लिंक गायब हैं।',
'qty_missing' => 'कम से कम एक उत्पाद में 1 से अधिक मात्रा होनी चाहिए।',
'qty_impossible' => 'कार्ट में इनमें से एक से अधिक उत्पाद नहीं जोड़े जा सकते हैं।',
'select_hourly_duration' => 'एक घंटे की स्लॉट अवधि चुनें।',
],
'create-error' => 'कार्ट इंस्टेंस बनाते समय कुछ समस्या आई।',
'title' => 'शॉपिंग कार्ट',

View File

@ -492,6 +492,7 @@ return [
'missing_links' => 'I link per il download di questo prodotto sono mancanti.',
'qty_missing' => 'Almeno un prodotto dovrebbe avere una quantità superiore a 1.',
'qty_impossible' => 'Non è possibile aggiungere più di un pezzo di questo articolo nel carrello.',
'select_hourly_duration' => 'Seleziona una durata dello slot di un\'ora.',
],
'create-error' => 'Si è verificato un problema durante la visualizzazione del carrello.',
'title' => 'Carrello',

View File

@ -457,6 +457,7 @@ return [
'missing_links' => 'Downloadable links are missing for this product.',
'qty_missing' => 'Atleast one product should have more than 1 quantity.',
'qty_impossible' => 'Cannot add more than one of these products to cart.',
'select_hourly_duration' => 'Select a slot duration of one hour.',
],
'create-error' => 'カートで問題が発生しました',
'title' => 'カート',

View File

@ -499,6 +499,7 @@ return [
'missing_links' => 'Downloadbare links ontbreken voor dit product.',
'qty_missing' => 'Minstens één product moet meer dan 1 hoeveelheid bevatten.',
'qty_impossible' => 'Kan niet meer dan één van deze producten toevoegen aan winkelwagen.',
'select_hourly_duration' => 'Kies een slotduur van één uur.',
],
'create-error' => 'Er is een probleem opgetreden bij het maken van een winkelwageninstantie.',
'title' => 'Winkelwagen',

View File

@ -492,6 +492,7 @@ return [
'missing_links' => 'Brak linków do pobrania dla tego produktu.',
'qty_missing' => 'Przynajmniej jeden produkt powinien zawierać ilośćwiększą niż 1',
'qty_impossible' => 'Nie można dodać więcej niż jednego z tych produktów do koszyka.',
'select_hourly_duration' => 'Wybierz przedział czasu na jedną godzinę.',
],
'create-error' => 'Wystąpił problem podczas tworzenia instancji koszyka.',
'title' => 'Koszyk zakupu',

View File

@ -484,6 +484,7 @@ return [
'missing_links' => 'Faltam links para download para este produto.',
'qty_missing' => 'Pelo menos um produto deve ter mais de 1 quantidade.',
'qty_impossible' => 'Não é possível adicionar mais do que um desse produto ao carrinho.',
'select_hourly_duration' => 'Selecione uma duração de slot de uma hora.',
],
'create-error' => 'Encontrou algum problema ao fazer a instância do carrinho',

View File

@ -494,6 +494,7 @@ return [
'missing_links' => 'Для этого продукта отсутствуют ссылки для скачивания.',
'qty_missing' => 'По крайней мере, у одного товара должно быть более 1 количества.',
'qty_impossible' => 'Невозможно добавить в корзину более одного из этих товаров.',
'select_hourly_duration' => 'Выберите продолжительность слота один час.',
],
'create-error' => 'Обнаружена проблема при создании экземпляра корзины.',
'title' => 'Корзина',

View File

@ -494,6 +494,7 @@ return [
'missing_links' => 'මෙම නිෂ්පාදනය සඳහා බාගත කළ හැකි සබැඳි නොමැත.',
'qty_missing' => 'අවම වශයෙන් එක් නිෂ්පාදනයක ප්‍රමාණය 1කට වඩා තිබිය යුතුය.',
'qty_impossible' => 'මෙම නිෂ්පාදන එකකට වඩා කරත්තයට එක් කළ නොහැක.',
'select_hourly_duration' => 'පැයක ස්ලට් කාල සීමාවක් තෝරන්න.',
],
'create-error' => 'කරත්ත නිදසුන සෑදීමේදී යම් ගැටලුවකට මුහුණ පෑමට සිදු විය.',
'title' => 'සාප්පු ට්රොලිය',

View File

@ -492,6 +492,7 @@ return [
'missing_links' => 'Bu ürün için indirilebilir linkler girilmemiş.',
'qty_missing' => 'En az bir adet ürün girilmelidir.',
'qty_impossible' => 'Bu üründen birden fazla adet girilemez.',
'select_hourly_duration' => 'Bir saatlik bir slot süresi seçin.',
],
'create-error' => 'Alışveriş sepeti oluşturulurken hata meydana geldi!',
'title' => 'Alışveriş Sepeti',

View File

@ -492,7 +492,8 @@ return [
'missing_options' => '此产品缺少选项.',
'missing_links' => '此产品缺少可下载链接.',
'qty_missing' => '至少一种产品的数量应超过 1 个.',
'qty_impossible' => '不能将这些产品中的一种以上添加到购物车.'
'qty_impossible' => '不能将这些产品中的一种以上添加到购物车.',
'select_hourly_duration' => '選擇一小時的時隙持續時間。',
],
'create-error' => '制作购物车实例时遇到一些问题.',
'title' => '购物车',