Merge pull request #1945 from rahulshukla-webkul/development

Development
This commit is contained in:
Jitendra Singh 2019-12-24 13:12:52 +05:30 committed by GitHub
commit 3b1b3e819f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -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,