prestashop: edit meta title info

My Goal: I want the Title of the page to show,  Manufacturer Name - Part Number

 

Steps:

Go to Meta.php

Go to the Section

getProductMetas

 

public static function getProductMetas($id_product, $id_lang, $page_name)
{
$sql = 'SELECT `name`, `meta_title`, `meta_description`, `meta_keywords`, `description_short`, `reference`
FROM `'._DB_PREFIX_.'product` p
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = p.`id_product`'.Shop::addSqlRestrictionOnLang('pl').')
'.Shop::addSqlAssociation('product', 'p').'
WHERE pl.id_lang = '.(int)$id_lang.'
AND pl.id_product = '.(int)$id_product.'
AND product_shop.active = 1';
if ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql)) {
if (empty($row['meta_description'])) {
$row['meta_description'] = strip_tags($row['description_short']);
}
return Meta::completeMetaTags($row, $row['name'].' - '.$row['reference']);
}

return Meta::getHomeMetas($id_lang, $page_name);
}

Leave a Reply

Your email address will not be published. Required fields are marked *