diff --git a/packages/Webkul/Product/src/Type/AbstractType.php b/packages/Webkul/Product/src/Type/AbstractType.php index 39568653d..d257ae928 100644 --- a/packages/Webkul/Product/src/Type/AbstractType.php +++ b/packages/Webkul/Product/src/Type/AbstractType.php @@ -167,7 +167,9 @@ abstract class AbstractType $product->update($data); foreach ($product->attribute_family->custom_attributes as $attribute) { - if ($attribute->type == 'boolean') { + $route = request()->route() ? request()->route()->getName() : ""; + + if ($attribute->type == 'boolean' && $route != 'admin.catalog.products.massupdate') { $data[$attribute->code] = isset($data[$attribute->code]) && $data[$attribute->code] ? 1 : 0; } @@ -175,7 +177,7 @@ abstract class AbstractType continue; } - if ($attribute->type == 'date' && $data[$attribute->code] == '') { + if ($attribute->type == 'date' && $data[$attribute->code] == '' && $route != 'admin.catalog.products.massupdate') { $data[$attribute->code] = null; } diff --git a/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php b/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php index 79c8d31b2..63813bf2f 100644 --- a/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/DownloadableProductController.php @@ -47,7 +47,7 @@ class DownloadableProductController extends Controller /** * Display a listing of the resource. * - * @return \Illuminate\View\View + * @return \Illuminate\View\View */ public function index() { return view($this->_config['view']); @@ -77,7 +77,7 @@ class DownloadableProductController extends Controller } $remainingDownloads = $downloadableLinkPurchased->download_bought - ($downloadableLinkPurchased->download_used + 1); - + if ($downloadableLinkPurchased->download_bought) { $this->downloadableLinkPurchasedRepository->update([ 'download_used' => $downloadableLinkPurchased->download_used + 1,