Product view by url without enabling product view individually #6756
This commit is contained in:
parent
cbe0d51a33
commit
90e7d258be
|
|
@ -44,9 +44,11 @@ class ProductsCategoriesProxyController extends Controller
|
|||
}
|
||||
|
||||
if ($product = $this->productRepository->findBySlug($slugOrPath)) {
|
||||
$customer = auth()->guard('customer')->user();
|
||||
if ($product->visible_individually && $product->url_key) {
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
return view($this->_config['product_view'], compact('product', 'customer'));
|
||||
return view($this->_config['product_view'], compact('product', 'customer'));
|
||||
}
|
||||
}
|
||||
|
||||
abort(404);
|
||||
|
|
|
|||
Loading…
Reference in New Issue