Product view by url without enabling product view individually #6756

This commit is contained in:
sanjeev 2022-11-23 15:52:23 +05:30
parent cbe0d51a33
commit 90e7d258be
1 changed files with 4 additions and 2 deletions

View File

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