updates
This commit is contained in:
parent
cc8dd8bf07
commit
daede4e43a
|
|
@ -68,10 +68,7 @@ class WishlistController extends Controller
|
|||
session()->flash('error', trans('customer::app.product-removed'));
|
||||
|
||||
return redirect()->back();
|
||||
} elseif (! $product->status) {
|
||||
return redirect()->back();
|
||||
} elseif (! $product->visible_individually) {
|
||||
session()->flash('warning', trans('shop::app.common.product-individual-view-inactive'));
|
||||
} elseif (! $product->status && ! $product->visible_individually) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ class CartController extends Controller
|
|||
public function add($id)
|
||||
{
|
||||
try {
|
||||
if ($product = $this->productRepository->findOrFail($id)) {
|
||||
if (! $product->visible_individually) {
|
||||
session()->flash('warning', trans('shop::app.common.product-individual-view-inactive'));
|
||||
return redirect()->back();
|
||||
}
|
||||
if (
|
||||
$product = $this->productRepository->findOrFail($id)
|
||||
&& (! $product->visible_individually)
|
||||
) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
Cart::deactivateCurrentCartIfBuyNowIsActive();
|
||||
|
|
|
|||
|
|
@ -79,11 +79,11 @@ class ProductController extends Controller
|
|||
} else {
|
||||
$productDownloadableSample = $this->productDownloadableSampleRepository->findOrFail(request('id'));
|
||||
|
||||
if ($product = $this->productRepository->findOrFail($productDownloadableSample->product_id)) {
|
||||
if (! $product->visible_individually) {
|
||||
session()->flash('warning', trans('shop::app.common.product-individual-view-inactive'));
|
||||
return redirect()->back();
|
||||
}
|
||||
if (
|
||||
$product = $this->productRepository->findOrFail($productDownloadableSample->product_id)
|
||||
&& (! $product->visible_individually)
|
||||
) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
if ($productDownloadableSample->type == 'file') {
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ class ComparisonController extends Controller
|
|||
|
||||
$customerId = auth()->guard('customer')->user()->id;
|
||||
|
||||
if ($product = $this->productRepository->findOrFail($productId)) {
|
||||
if (! $product->visible_individually) {
|
||||
session()->flash('warning', trans('shop::app.common.product-individual-view-inactive'));
|
||||
return redirect()->back();
|
||||
}
|
||||
if (
|
||||
$product = $this->productRepository->findOrFail($productId)
|
||||
&& (! $product->visible_individually)
|
||||
) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$compareProduct = $this->compareProductsRepository->findOneByField([
|
||||
|
|
|
|||
Loading…
Reference in New Issue