Community Add-Ons
| Maintainers: | dredwiser |
Category and Product name in Explorer bar
for osCommerce Online Merchant v2.2
When you click on a product int eh store ( product info) this will ddisplay the category nmae and product name after the title in the exploere bar (or fire fox bar ).
you can see it in action at http://www.justspiffy.com/store
Hi this is my first upload and i liked youre version but i needed it to work with information pages unlimited and sts so i changed some thing and maybe people can use my version for sts.
Just go to catalog/includes/modules/sts_inc/general.php
and change.
$sts->template['headertags']= "<title>" . TITLE ."</title>";
into
//start titel meta tags made bij Jeroen dredwiser flightsimstore
if(isset($HTTP_GET_VARS['products_id'])) {
$product_info_query = tep_db_query(
"select p.products_id, pd.products_name, p.products_price from " .
TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION .
" pd where p.products_status = '1' and p.products_id = '" .
(int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = " .
"p.products_id and pd.language_id = '" . (int)$languages_id . "'");
$product_info = tep_db_fetch_array($product_info_query);
$metaqueries_products_name = $product_info['products_name'];
}
$current_category_id = $_REQUEST['cPath'];
if(isset($current_category_id)) {
$metaqueries_cat_id = $current_category_id;
$category_query = tep_db_query(
"select c.parent_id, cd.categories_name from " . TABLE_CATEGORIES .
" c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" .
(int)$metaqueries_cat_id . "' and cd.categories_id = '" .
(int)$metaqueries_cat_id . "' and cd.language_id = '" .
(int)$languages_id . "' limit 1");
$category = tep_db_fetch_array($category_query);
$metaqueries_cat_name = $category['categories_name'];
$metaqueries_cat_id = $category['parent_id'];
}
$current_information_id = $_REQUEST['info_id'];
$info_query = tep_db_query("select information_id, information_title from information where information_id = '" . $current_information_id . "'");
$info = tep_db_fetch_array($info_query);
$informationtitle = $info['information_title'];
$metaqueries_info_id = $info['parent_id'];
$HEADINGTITLES = HEADING_TITLE;
if (strlen($metaqueries_products_name) > 0) {
$metaqueries_title = $metaqueries_products_name . " - " . TITLE;;
} elseif (strlen($metaqueries_cat_id) > 0) {
$metaqueries_title = $metaqueries_cat_name . " - " . TITLE;
} elseif (strlen($informationtitle) > 0) {
$metaqueries_title = $informationtitle . " - " . TITLE;
} elseif (strlen($HEADINGTITLES) > 0) {
$metaqueries_title = $HEADINGTITLES . " - " . TITLE;
} else {
$metaqueries_title = TITLE;
}
$sts->template['headertags']= "<title>" . $metaqueries_title ."</title>";
//end titel meta tags made bij Jeroen dredwiser flightsimstore
Than in custom language files if you have not yet defined HEADING_TITLE just add it if neccesary (advanced search.php was the only one for me to add)
I hope you like it i am not a coder so maybe someone can clean it up ;)
Download is the text above.
