diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 2f4b434f9..eab1841e0 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -2,7 +2,7 @@ #### This changelog consists the bug & security fixes and new features being included in the releases listed below. -## **v1.1.0 (20th of March 2020)** - *Release* +## **v1.1.0 (24th of March 2020)** - *Release* * [feature] Added new booking type product. @@ -10,6 +10,8 @@ * [feature] Impletment compare product feature. +* #2525 [fixed] - Add more settings to the installers + * #2541 [fixed] - Showing product's price with the price including tax * #2552 [fixed] - error mysql 8 @@ -72,14 +74,20 @@ * #2606 [fixed] - custom attributes are not Visible on Product View Page on Front-end +* #2607 [fixed] - Getting exception on editing category for pt_BR locale in php 7.4 + * #2608 [fixed] - Getting exception on creating category. * #2609 [fixed] - product removed from comparison page when update product by name * #2611 [fixed] - installer error +* #2612 [fixed] - available slots are not showing for current date even if slot time is not expired + * #2613 [fixed] - Propaganistas/Laravel-Intl is abandoned +* #2614 [fixed] - table booking slot time is expired still exist in cart + * #2619 [fixed] - Issue when category slug & product slug are same * #2621 [fixed] - i create a site and it is up kind of noting works @@ -150,7 +158,9 @@ * #2667 [fixed] - By default wishlist option is selected in cart -* #2669 [fixed] - Booking product should be removed from the cart when selected slot time expired +* #2670 [fixed] - Booking product should be removed from the cart when selected slot time expired + +* #2669 [fixed] - Browser compatibility issue * #2671 [fixed] - Error on moving booking product to wishlist @@ -164,7 +174,25 @@ * #2693 [fixed] - Booking product page - add to cart button js error -* #2707 [fixed] Getting exception when generate invoice in appointment booking +* #2704 [fixed] - product's assigned category can't be removed + +* #2707 [fixed] - Getting exception when generate invoice in appointment booking + +* #2715 [fixed] - Error message should throw if "To" time is less than "From". + +* #2716 [fixed] - After saving the default booking time product selected time for date range changes to 00:00:00 ,because of which not able to book appointment on frontend. + +* #2717 [fixed] - Getting error message on adding rental product in cart if rental booking is not available for that day. + +* #2722 [fixed] - warning showing when update event booking cart quantity from the product page + +* #2723 [fixed] - Compare product icon on header showing counts of compare product but there are no product in compare list. + +* #2724 [fixed] - table bookings quantity should update in existing booking added in cart for same slot/date + +* #2726 [fixed] - is shop.js the vue framework ?? + +* #2732 [fixed] - missing product's quick view in category page ## **v1.0.0 (24th of February 2020)** - *Release* diff --git a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php index fd9a84761..59997b828 100644 --- a/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/AddressDataGrid.php @@ -13,6 +13,7 @@ class AddressDataGrid extends DataGrid */ public $index = 'address_id'; + /** * @var string */ @@ -168,4 +169,4 @@ class AddressDataGrid extends DataGrid 'method' => 'DELETE', ]); } -} \ No newline at end of file +} diff --git a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php index f4d3e9969..71aed9a09 100755 --- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php @@ -1,8 +1,8 @@ 'Salve ', - 'create' => 'Crio', + 'save' => 'Salvar', + 'create' => 'Criar', 'update' => 'Atualizar', 'delete' => 'Excluir', 'failed' => 'Falhou', @@ -64,7 +64,7 @@ return [ 'settings' => 'Opções', 'locales' => 'Idiomas', 'currencies' => 'Moedas', - 'exchange-rates' => 'Impostos de Câmbios', + 'exchange-rates' => 'Taxas de Câmbios', 'inventory-sources' => 'Fontes de Inventários', 'channels' => 'Canais (Lojas)', 'users' => 'Usuários', @@ -98,7 +98,7 @@ return [ 'locales' => 'Idiomas', 'currencies' => 'Moedas', 'exchange-rates' => 'Impostos de Câmbios', - 'inventory-sources' => 'Fontes de Inventários', + 'inventory-sources' => 'Origens de Estoque', 'channels' => 'Canais (Lojas)', 'users' => 'Usuários', 'roles' => 'Funções', @@ -1248,7 +1248,7 @@ return [ 'allow-guest-review' => 'Permitir comentário de convidado', 'inventory' => 'Inventário', 'stock-options' => 'Opções de ações', - 'allow-backorders' => 'Permitir atrasos', + 'allow-backorders' => 'Permitir Pedidos por Admin', 'customer' => 'Cliente', 'settings' => 'Definições', 'address' => 'Endereço', @@ -1287,29 +1287,30 @@ return [ 'locale-options' => 'Opções de unidade', 'weight-unit' => 'Unidade de peso', 'admin-page-limit' => 'Itens padrão por página (administrador)', - 'design' => 'Projeto', - 'email-settings' => 'Email Settings', - 'email-sender-name' => 'Email Sender Name', - 'shop-email-from' => 'Shop Email Address [For sending emails]', - 'admin-name' => 'Admin Name', + 'design' => 'Design', + 'email-settings' => 'Configurações de Email', + 'email-sender-name' => 'Nome do Email da Loja', + 'shop-email-from' => 'Endereço de Email da Loja [Para enviar emails]', + 'admin-name' => 'Admin Nome', 'admin-email' => 'Admin Email', + 'admin-page-limit' => 'Quantidade Padrão de Itens por Página (Admin)', 'design' => 'Design', 'admin-logo' => 'Admin Logo', 'logo-image' => 'Logo Imagem', 'credit-max' => 'Máximo de crédito do cliente', 'credit-max-value' => 'Valor Máximo de Crédito', 'use-credit-max' => 'Use o máximo de crédito', - 'order-settings' => 'Order Settings', - 'orderNumber' => 'Order Number Settings', - 'order-number-prefix' => 'Order Number Prefix', - 'order-number-length' => 'Order Number Length', - 'order-number-suffix' => 'Order Number Suffix', + 'order-settings' => 'Configurações do Pedido', + 'orderNumber' => 'Configuração do Número do Pedido', + 'order-number-prefix' => 'Prefixo do Número do Pedido', + 'order-number-length' => 'Tamanho do Número do Pedido', + 'order-number-suffix' => 'Sufixo do Número de Pedido', 'default' => 'Padrão', 'sandbox' => 'Sandbox', 'all-channels' => 'Todos', 'all-locales' => 'Todos', 'sandbox' => 'Sandbox', - 'invoice-slip-design' => 'Invoice Slip Design', + 'invoice-slip-design' => 'Design da Nota do Pedido', 'logo' => 'logo' ] ] diff --git a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php index a6c82a26f..1915bb77a 100644 --- a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php +++ b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php @@ -140,24 +140,48 @@ class RentalSlot extends Booking public function isSlotExpired($cartItem) { $bookingProduct = $this->bookingProductRepository->findOneByField('product_id', $cartItem['product_id']); - - $typeHelper = app($this->typeHelpers[$bookingProduct->type]); - $timeIntervals = $typeHelper->getSlotsByDate($bookingProduct, $cartItem['additional']['booking']['date']); + if (isset($cartItem['additional']['booking']['date'])) { + $timeIntervals = $this->getSlotsByDate($bookingProduct, $cartItem['additional']['booking']['date']); - $isExpired = true; + $isExpired = true; - foreach ($timeIntervals as $timeInterval) { - foreach ($timeInterval['slots'] as $slot) { - if ($slot['from_timestamp'] == $cartItem['additional']['booking']['slot']['from'] - && $slot['to_timestamp'] == $cartItem['additional']['booking']['slot']['to'] - ) { - $isExpired = false; + foreach ($timeIntervals as $timeInterval) { + foreach ($timeInterval['slots'] as $slot) { + if ($slot['from_timestamp'] == $cartItem['additional']['booking']['slot']['from'] + && $slot['to_timestamp'] == $cartItem['additional']['booking']['slot']['to'] + ) { + $isExpired = false; + } } } - } - return $isExpired; + return $isExpired; + } else { + $currentTime = Carbon::now(); + + $requestedFromDate = Carbon::createFromTimeString($cartItem['additional']['booking']['date_from'] . " 00:00:00"); + + $requestedToDate = Carbon::createFromTimeString($cartItem['additional']['booking']['date_to'] . " 23:59:59"); + + $availableFrom = ! $bookingProduct->available_every_week && $bookingProduct->available_from + ? Carbon::createFromTimeString($bookingProduct->available_from) + : Carbon::createFromTimeString($currentTime->format('Y-m-d 00:00:00')); + + $availableTo = ! $bookingProduct->available_every_week && $bookingProduct->available_from + ? Carbon::createFromTimeString($bookingProduct->available_to) + : Carbon::createFromTimeString('2080-01-01 00:00:00'); + + if ($requestedFromDate < $availableFrom + || $requestedFromDate > $availableTo + || $requestedToDate < $availableFrom + || $requestedToDate > $availableTo + ) { + return true; + } + + return false; + } } /** diff --git a/packages/Webkul/BookingProduct/src/Repositories/BookingProductRepository.php b/packages/Webkul/BookingProduct/src/Repositories/BookingProductRepository.php index 29e1b7059..826a2d32e 100644 --- a/packages/Webkul/BookingProduct/src/Repositories/BookingProductRepository.php +++ b/packages/Webkul/BookingProduct/src/Repositories/BookingProductRepository.php @@ -174,6 +174,12 @@ class BookingProductRepository extends Repository $to = Carbon::createFromTimeString($timeInterval['to'])->getTimestamp(); + if ($from > $to) { + unset($slots[$key]); + + continue; + } + $isOverLapping = false; foreach ($tempSlots as $slot) { diff --git a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php index 197baadca..a76ad3401 100644 --- a/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php +++ b/packages/Webkul/BookingProduct/src/Resources/views/admin/catalog/products/accordians/booking.blade.php @@ -57,7 +57,7 @@