Skip to content

Commit

Permalink
Adding page not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Aug 5, 2016
1 parent ead40bb commit 927bbd0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/ModuleProductDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ protected function compile()

$objProduct = \ProductModel::findPublishedByParentAndIdOrAlias(\Input::get('items'),$this->catalogs);

if (null === $objProduct)
{
/** @var \PageError404 $objHandler */
$objHandler = new $GLOBALS['TL_PTY']['error_404']();
$objHandler->generate($objPage->id);
}

// Overwrite the page title
if ($objProduct->title != '')
{
Expand All @@ -107,8 +114,5 @@ protected function compile()
$this->Template->relateds = $this->parseRelateds($objProducts);
}




}
}

0 comments on commit 927bbd0

Please sign in to comment.