Skip to content

Commit c07d526

Browse files
committed
Update View.php
1 parent 9d48860 commit c07d526

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Controller/Index/View.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public function execute()
100100

101101
try {
102102
$product = $this->_initProduct();
103+
if (!$product) {
104+
echo __('The product with ID %1 is out of stock or not visible individually', $productId);
105+
return;
106+
}
103107
// $page = $this->resultPageFactory->create(false, ['isIsolated' => true]);
104108
$page = $this->resultPageFactory->create();
105109
// $page->addHandle('catalog_product_view');

0 commit comments

Comments
 (0)