diff --git a/packages/Webkul/Admin/src/Resources/lang/ar/app.php b/packages/Webkul/Admin/src/Resources/lang/ar/app.php
index 1f95df145..61969ca19 100644
--- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php
@@ -409,6 +409,7 @@ return [
'add-title' => 'أنشئ شحنة',
'save-btn-title' => 'احفظ الشحنة',
'qty-ordered' => 'أمر qty',
+ 'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'من كيوتي إلى السفينة',
'available-sources' => 'المصادر المتاحة',
'source' => 'المصدر',
diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php
index 7cbeee2e2..e04395bab 100755
--- a/packages/Webkul/Admin/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php
@@ -409,6 +409,7 @@ return [
'add-title' => 'Create Shipment',
'save-btn-title' => 'Save Shipment',
'qty-ordered' => 'Qty Ordered',
+ 'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'Qty to Ship',
'available-sources' => 'Available Sources',
'source' => 'Source',
diff --git a/packages/Webkul/Admin/src/Resources/lang/fa/app.php b/packages/Webkul/Admin/src/Resources/lang/fa/app.php
index 4aff942c4..ea4c62a9b 100644
--- a/packages/Webkul/Admin/src/Resources/lang/fa/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/fa/app.php
@@ -409,6 +409,7 @@ return [
'add-title' => 'ایجاد حمل و نقل',
'save-btn-title' => 'ذخیره حمل و نقل',
'qty-ordered' => 'سفارش داده شده',
+ 'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'مقدار به کشتی',
'available-sources' => 'منابع موجود',
'source' => 'منابع',
diff --git a/packages/Webkul/Admin/src/Resources/lang/nl/app.php b/packages/Webkul/Admin/src/Resources/lang/nl/app.php
index b263d1487..18a75ccd5 100644
--- a/packages/Webkul/Admin/src/Resources/lang/nl/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/nl/app.php
@@ -409,6 +409,7 @@ return [
'add-title' => 'Zending maken',
'save-btn-title' => 'Zending opslaan',
'qty-ordered' => 'Besteld aantal',
+ 'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'Te verzenden',
'available-sources' => 'Beschikbare bronnen',
'source' => 'Bron',
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 71aed9a09..23d6bd830 100755
--- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
@@ -409,6 +409,7 @@ return [
'add-title' => 'Criar Entrega',
'save-btn-title' => 'Salvar Entrega',
'qty-ordered' => 'Qtd pedido',
+ 'qty-invoiced' => 'Qty Invoiced',
'qty-to-ship' => 'Qty para enviar',
'available-sources' => 'Fontes Disponíveis',
'source' => 'Fonte',
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/addresses/orders/index.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/addresses/orders/index.blade.php
index fae339a03..efb412d25 100644
--- a/packages/Webkul/Admin/src/Resources/views/customers/addresses/orders/index.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/customers/addresses/orders/index.blade.php
@@ -1,4 +1,4 @@
-@extends('address::admin.layouts.content')
+@extends('admin::layouts.content')
@section('page_title')
{{ __('address::app.admin.addresses.title-orders', ['customer_name' => $customer->first_name . ' ' . $customer->last_name]) }}
diff --git a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php
index 9380ad3f6..157a9e33e 100755
--- a/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/sales/shipments/create.blade.php
@@ -263,6 +263,7 @@
{{ __('admin::app.sales.orders.SKU') }} |
{{ __('admin::app.sales.orders.product-name') }} |
{{ __('admin::app.sales.shipments.qty-ordered') }} |
+ {{ __('admin::app.sales.shipments.qty-invoiced') }} |
{{ __('admin::app.sales.shipments.qty-to-ship') }} |
{{ __('admin::app.sales.shipments.available-sources') }} |
@@ -288,6 +289,7 @@
@endif
{{ $item->qty_ordered }} |
+ {{ $item->qty_invoiced }} |
{{ $item->qty_to_ship }} |
@@ -324,8 +326,8 @@
-
-
+
+
@verbatim
{{ errors.first('') }}
diff --git a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php
index b9a0d8260..2ca56dfa7 100644
--- a/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php
+++ b/packages/Webkul/BookingProduct/src/Helpers/RentalSlot.php
@@ -104,7 +104,7 @@ class RentalSlot extends Booking
{
$bookingProduct = $this->bookingProductRepository->findOneByField('product_id', $data['product_id']);
- $rentingType = $products[0]['additional']['booking']['renting_type'] ?? $bookingProduct->rental_slot->renting_type;
+ $rentingType = $data['additional']['booking']['renting_type'] ?? $bookingProduct->rental_slot->renting_type;
if ($rentingType == 'daily') {
$from = Carbon::createFromTimeString($data['additional']['booking']['date_from'] . ' 00:00:01')->getTimestamp();
diff --git a/packages/Webkul/BookingProduct/src/Type/Booking.php b/packages/Webkul/BookingProduct/src/Type/Booking.php
index de6b83b40..293f65aa0 100644
--- a/packages/Webkul/BookingProduct/src/Type/Booking.php
+++ b/packages/Webkul/BookingProduct/src/Type/Booking.php
@@ -12,6 +12,7 @@ use Webkul\Product\Helpers\ProductImage;
use Webkul\BookingProduct\Repositories\BookingProductRepository;
use Webkul\BookingProduct\Helpers\Booking as BookingHelper;
use Webkul\Product\Type\Virtual;
+use Carbon\Carbon;
class Booking extends Virtual
{
@@ -168,6 +169,10 @@ class Booking extends Virtual
$bookingProduct = $this->getBookingProduct($data['product_id']);
if ($bookingProduct->type == 'event') {
+ if (Carbon::now() > $bookingProduct->available_from && Carbon::now() > $bookingProduct->available_to) {
+ return trans('shop::app.checkout.cart.event.expired');
+ }
+
$filtered = Arr::where($data['booking']['qty'], function ($qty, $key) {
return $qty != 0;
});
diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php
index d5d15690d..4a9acacaf 100755
--- a/packages/Webkul/Product/src/Repositories/ProductRepository.php
+++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php
@@ -313,7 +313,10 @@ class ProductRepository extends Repository
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
- ->where('product_flat.name', 'like', '%' . urldecode($term) . '%')
+ ->where(function($sub_query) use ($term) {
+ $sub_query->where('product_flat.name', 'like', '%' . urldecode($term) . '%')
+ ->orWhere('product_flat.short_description', 'like', '%' . urldecode($term) . '%');
+ })
->orderBy('product_id', 'desc');
})->paginate(16);
diff --git a/packages/Webkul/Product/src/Type/Configurable.php b/packages/Webkul/Product/src/Type/Configurable.php
index 921b43f0a..49293fb7d 100644
--- a/packages/Webkul/Product/src/Type/Configurable.php
+++ b/packages/Webkul/Product/src/Type/Configurable.php
@@ -568,38 +568,29 @@ class Configurable extends AbstractType
public function haveSufficientQuantity($qty)
{
$backorders = core()->getConfigData('catalog.inventory.stock_options.backorders');
-
- return $qty <= $this->totalQuantity() ? true : $backorders;
- }
-
- /**
- * @return int
- */
- public function totalQuantity()
- {
- $total = 0;
-
- $channelInventorySourceIds = core()->getCurrentChannel()
- ->inventory_sources()
- ->where('status', 1)
- ->pluck('id');
-
+
foreach ($this->product->variants as $variant) {
- foreach ($variant->inventories as $inventory) {
- if (is_numeric($index = $channelInventorySourceIds->search($inventory->inventory_source_id))) {
- $total += $inventory->qty;
- }
+ if ($variant->haveSufficientQuantity($qty)) {
+ return true;
}
+ }
- $orderedInventory = $variant->ordered_inventories()
- ->where('channel_id', core()->getCurrentChannel()->id)
- ->first();
-
- if ($orderedInventory) {
- $total -= $orderedInventory->qty;
+ return $backorders;
+ }
+
+ /**
+ * Return true if this product type is saleable
+ *
+ * @return bool
+ */
+ public function isSaleable()
+ {
+ foreach ($this->product->variants as $variant) {
+ if ($variant->isSaleable()) {
+ return true;
}
}
-
- return $total;
+
+ return false;
}
}
\ No newline at end of file
diff --git a/packages/Webkul/Shop/src/Resources/lang/ar/app.php b/packages/Webkul/Shop/src/Resources/lang/ar/app.php
index 7192698cf..13a90fe68 100644
--- a/packages/Webkul/Shop/src/Resources/lang/ar/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/ar/app.php
@@ -411,7 +411,7 @@ return [
'your-customization' => 'التخصيص الخاص بك',
'total-amount' => 'المبلغ الإجمالي',
'none' => 'لا شيء',
- 'available' => 'Available'
+ 'available' => 'Available',
],
// 'reviews' => [
@@ -461,7 +461,10 @@ return [
'cart-subtotal' => 'المجموع الفرعي للمشتريات',
'cart-remove-action' => 'هل تريد حقا أن تسمح هذا ؟',
'partial-cart-update' => 'تم تحديث بعض المنتجات.',
- 'link-missing' => ''
+ 'link-missing' => '',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php
index 46ce68b3f..80f4cba6f 100755
--- a/packages/Webkul/Shop/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php
@@ -461,7 +461,10 @@ return [
'cart-subtotal' => 'Cart Subtotal',
'cart-remove-action' => 'Do you really want to do this ?',
'partial-cart-update' => 'Only some of the product(s) were updated',
- 'link-missing' => ''
+ 'link-missing' => '',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
diff --git a/packages/Webkul/Shop/src/Resources/lang/es/app.php b/packages/Webkul/Shop/src/Resources/lang/es/app.php
index e4899db68..bb3704a86 100644
--- a/packages/Webkul/Shop/src/Resources/lang/es/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/es/app.php
@@ -429,6 +429,9 @@ return [
'cart-subtotal' => 'Total parcial',
'cart-remove-action' => '¿Realmente quieres hacer esto?',
'partial-cart-update' => 'Solo algunos de los productos se han actualizado',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
diff --git a/packages/Webkul/Shop/src/Resources/lang/fa/app.php b/packages/Webkul/Shop/src/Resources/lang/fa/app.php
index 7a6a2bff5..aad3162f3 100644
--- a/packages/Webkul/Shop/src/Resources/lang/fa/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/fa/app.php
@@ -462,6 +462,9 @@ return [
'cart-subtotal' => 'سبد فرعی',
'cart-remove-action' => 'آیا واقعاً می خواهید این کار را انجام دهید؟',
'partial-cart-update' => 'فقط برخی از محصولات (های) به روز شده اند',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
diff --git a/packages/Webkul/Shop/src/Resources/lang/nl/app.php b/packages/Webkul/Shop/src/Resources/lang/nl/app.php
index 976438315..f3f76dcad 100644
--- a/packages/Webkul/Shop/src/Resources/lang/nl/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/nl/app.php
@@ -466,7 +466,10 @@ return [
'cart-subtotal' => 'Subtotaal',
'cart-remove-action' => 'Wil je dit echt doen?',
'partial-cart-update' => 'Slechts enkele van de producten zijn bijgewerkt',
- 'link-missing' => ''
+ 'link-missing' => '',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
diff --git a/packages/Webkul/Shop/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Shop/src/Resources/lang/pt_BR/app.php
index bae07c541..1f4329f3b 100755
--- a/packages/Webkul/Shop/src/Resources/lang/pt_BR/app.php
+++ b/packages/Webkul/Shop/src/Resources/lang/pt_BR/app.php
@@ -451,7 +451,10 @@ return [
'cart-subtotal' => 'Subtotal do carrinho',
'cart-remove-action' => 'Você realmente quer fazer isso ?',
'partial-cart-update' => 'Only some of the product(s) were updated',
- 'link-missing' => ''
+ 'link-missing' => '',
+ 'event' => [
+ 'expired' => 'This event has been expired.'
+ ]
],
'onepage' => [
|