Nad tym tłem można by jeszcze trochę popracować ponieważ miniaturki wyświetlane są w kilku miejscach, a nie wszędzie jest ten sam odcień różowego tła.
Skończyłem już robić title dla produktów:
/* Products specifics meta tags */
if ($id_product = Tools::getValue('id_product'))
{
$row = Db::getInstance()->getRow('
SELECT distinct '._DB_PREFIX_.'product_lang.name as name, meta_title, meta_description, meta_keywords, description_short, '._DB_PREFIX_.'manufacturer.name as manufacturer
FROM '._DB_PREFIX_.'product_lang, '._DB_PREFIX_.'manufacturer, '._DB_PREFIX_.'product
WHERE '._DB_PREFIX_.'product_lang.id_lang = '.intval($id_lang).' AND '._DB_PREFIX_.'product_lang.id_product = '.intval($id_product).' AND
'._DB_PREFIX_.'product_lang.id_product='._DB_PREFIX_.'product.id_product AND
'._DB_PREFIX_.'manufacturer.id_manufacturer='._DB_PREFIX_.'product.id_manufacturer');
if ($row)
{
if (empty($row['meta_description']))
$row['meta_description'] = strip_tags($row['description_short']);
return self::completeMetaTags($row, $row['name'].' - '.$row['manufacturer']);
}
}
i producentów:
/* Manufacturers specifics meta tags */
elseif ($id_manufacturer = Tools::getValue('id_manufacturer'))
{
$row = Db::getInstance()->getRow('
SELECT `meta_title`, `meta_description`, `meta_keywords`, `name`
FROM `'._DB_PREFIX_.'manufacturer_lang`, `'._DB_PREFIX_.'manufacturer`
WHERE id_lang = '.intval($id_lang).' AND '._DB_PREFIX_.'manufacturer_lang.id_manufacturer = '.intval($id_manufacturer).' AND
'._DB_PREFIX_.'manufacturer_lang.id_manufacturer='._DB_PREFIX_.'manufacturer.id_manufacturer');
if ($row)
{
if (empty($row['meta_description']))
$row['meta_description'] = strip_tags($row['meta_description']);
return self::completeMetaTags($row, $row['name'].' '.$row['meta_title']);
}
}