Merge remote-tracking branch 'upstream/master' into perm-fix

This commit is contained in:
devansh bawari 2021-01-27 10:55:46 +05:30
commit 37dd015d98
4 changed files with 13 additions and 9 deletions

View File

@ -132,8 +132,9 @@ class Bundle extends AbstractType
public function update(array $data, $id, $attribute = "id")
{
$product = parent::update($data, $id, $attribute);
$route = request()->route() ? request()->route()->getName() : '';
if (request()->route()->getName() != 'admin.catalog.products.massupdate') {
if ($route != 'admin.catalog.products.massupdate') {
$this->productBundleOptionRepository->saveBundleOptons($data, $product);
}
@ -765,4 +766,4 @@ class Bundle extends AbstractType
return true;
}
}
}

View File

@ -95,8 +95,9 @@ class Configurable extends AbstractType
public function update(array $data, $id, $attribute = "id")
{
$product = parent::update($data, $id, $attribute);
if (request()->route()->getName() != 'admin.catalog.products.massupdate') {
$route = request()->route() ? request()->route()->getName() : '';
if ($route != 'admin.catalog.products.massupdate') {
$previousVariantIds = $product->variants->pluck('id');
if (isset($data['variants'])) {
@ -660,4 +661,4 @@ class Configurable extends AbstractType
return $total;
}
}
}

View File

@ -122,8 +122,9 @@ class Downloadable extends AbstractType
public function update(array $data, $id, $attribute = "id")
{
$product = parent::update($data, $id, $attribute);
$route = request()->route() ? request()->route()->getName() : '';
if (request()->route()->getName() != 'admin.catalog.products.massupdate') {
if ($route != 'admin.catalog.products.massupdate') {
$this->productDownloadableLinkRepository->saveLinks($data, $product);
$this->productDownloadableSampleRepository->saveSamples($data, $product);
@ -291,4 +292,4 @@ class Downloadable extends AbstractType
return $result;
}
}
}

View File

@ -96,8 +96,9 @@ class Grouped extends AbstractType
public function update(array $data, $id, $attribute = "id")
{
$product = parent::update($data, $id, $attribute);
$route = request()->route() ? request()->route()->getName() : '';
if (request()->route()->getName() != 'admin.catalog.products.massupdate') {
if ($route != 'admin.catalog.products.massupdate') {
$this->productGroupedProductRepository->saveGroupedProducts($data, $product);
}
@ -235,4 +236,4 @@ class Grouped extends AbstractType
return $products;
}
}
}