Forum Moderators: mack
Admin -> Catalog -> Categories/Products
And click on the little icon for meta tags. Once there you can set your meta tags appropriately.
$categories_id = $_POST['categories_id'];
$languages = zen_get_languages();
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$language_id = $languages[$i]['id'];
$check = $db->Execute("select *
from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . "
where categories_id = '" . (int)$categories_id . "'
and language_id = '" . (int)$language_id . "'");
if ($check->RecordCount() > 0) {
$action = 'update_category_meta_tags';
} else {
$action = 'insert_categories_meta_tags';
}
$sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
if ($action == 'insert_categories_meta_tags') {
$insert_sql_data = array('categories_id' => $categories_id,
'language_id' => $language_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array);
} elseif ($action == 'update_category_meta_tags') {
zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
}
}
zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
break;
// eof: categories meta tags
please help me where I can put metas, and please also direct me are these metas works for each page, I mean for each product or we can create separate metas for every product within the categories file.
Thanks
Bilal
/admin/login.php
Try to log into that, and do what I said before. It works; you shouldn't need to edit the code directly :)
Glad you figured it out