Skip to content

Commit

Permalink
adding description and keywords to pges
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Dec 7, 2014
1 parent 0cc871d commit db51632
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 0 additions & 1 deletion modules/ModuleCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ protected function parseProduct($objProduct, $blnAddCategory=false, $strClass=''
$objTemplate->alias = $objProduct->alias;
$objTemplate->model = $objProduct->model;

print_r($objProduct->features);
if (!empty($objProduct->features))
{
$objTemplate->features = deserialize($objProduct->features);
Expand Down
18 changes: 18 additions & 0 deletions modules/ModuleCatalogDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,25 @@ protected function compile()

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

// Overwrite the page title
if ($objProduct->title != '')
{
$objPage->pageTitle = strip_tags(strip_insert_tags($objProduct->title));
}

// Overwrite the page description
if ($objProduct->description != '')
{
$objPage->description = $this->prepareMetaDescription($objProduct->description);
}

if ($objProduct->keywords != '')
{
$GLOBALS['TL_KEYWORDS'] .= (($GLOBALS['TL_KEYWORDS'] != '') ? ', ' : '') . $objProduct->keywords;
}

$arrProduct = $this->parseProduct($objProduct);

$this->Template->products = $arrProduct;

}
Expand Down

0 comments on commit db51632

Please sign in to comment.