Jack_mcs Posted December 5, 2008 Author Share Posted December 5, 2008 First, you should install the latest version. A lot has changed since your version. Next, Header Tags doesn't have an admin section. If you mean the categories in admin->catalog, then see the installation note about such problems. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
witer Posted December 6, 2008 Share Posted December 6, 2008 Hello, Can I received short answer regarding compatibility this great add-ons wth my shop... is it compatble with osCommerce Professional 1.03 B2B? My shop is still working but I need improved seo things so I need to instal somethin like Header Tags Many thanks for your reply. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 6, 2008 Author Share Posted December 6, 2008 It'compatible with all versions of oscommerce. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
tnier Posted December 6, 2008 Share Posted December 6, 2008 Hi When i click on a category i see the header tag.. when i click on a sub category under the main category i see the header tag.. when i click on a product all i see in the header tag is Mozzila Firefox.. is there something im doing wrong or missed.. Thanks Tom Quote Link to comment Share on other sites More sharing options...
witer Posted December 6, 2008 Share Posted December 6, 2008 THANKS... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 6, 2008 Author Share Posted December 6, 2008 Hi When i click on a category i see the header tag.. when i click on a sub category under the main category i see the header tag.. when i click on a product all i see in the header tag is Mozzila Firefox.. is there something im doing wrong or missed.. Thanks Tom What's the header tag? If you are referring to the title in the browser, have you ran fill tags? The test function? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
witer Posted December 6, 2008 Share Posted December 6, 2008 It'compatible with all versions of oscommerce. Jack It is working great but I obserwer that everythin with categories did not work... My code in admin/categories.php case 'new_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']'); /*** Begin Header Tags SEO ***/ $category_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']'); $category_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']'); $category_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']'); $category_htc_description_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_textarea_field('categories_htc_description[' . $languages[$i]['id'] . ']', 'hard', 30, 5, ''); /*** End Header Tags SEO ***/ } $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . TEXT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br>' . TEXT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', '', 'size="2"')); /*** Begin Header Tags SEO ***/ $contents[] = array('text' => '<br>' . 'Header Tags Category Title' . $category_htc_title_string); $contents[] = array('text' => '<br>' . 'Header Tags Category Description' . $category_htc_desc_string); $contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . $category_htc_keywords_string); $contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . $category_htc_description_string); /*** End Header Tags SEO ***/ $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'edit_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_EDIT_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id'])); /*** Begin Header Tags SEO ***/ $category_htc_title_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_title_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_title($cInfo->categories_id, $languages[$i]['id'])); $category_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_desc_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_desc($cInfo->categories_id, $languages[$i]['id'])); $category_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_htc_keywords_tag[' . $languages[$i]['id'] . ']', tep_get_category_htc_keywords($cInfo->categories_id, $languages[$i]['id'])); $category_htc_description_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_textarea_field('categories_htc_description[' . $languages[$i]['id'] . ']', 'hard', 30, 5, tep_get_category_htc_description($cInfo->categories_id, $languages[$i]['id'])); /*** End Header Tags SEO ***/ } $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br>' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br>' . DIR_WS_CATALOG_IMAGES . '<br><b>' . $cInfo->categories_image . '</b>'); $contents[] = array('text' => '<br>' . TEXT_EDIT_CATEGORIES_IMAGE . '<br>' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br>' . TEXT_EDIT_SORT_ORDER . '<br>' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); /*** Begin Header Tags SEO ***/ $contents[] = array('text' => '<br>' . 'Header Tags Category Title' . $category_htc_title_string); $contents[] = array('text' => '<br>' . 'Header Tags Category Description' . $category_htc_desc_string); $contents[] = array('text' => '<br>' . 'Header Tags Category Keywords' . $category_htc_keywords_string); $contents[] = array('text' => '<br>' . 'Header Tags Categories Description' . $category_htc_description_string); /*** End Header Tags SEO ***/ $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=delete_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_DELETE_CATEGORY_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->categories_name . '</b>'); if ($cInfo->childs_count > 0) $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_CHILDS, $cInfo->childs_count)); if ($cInfo->products_count > 0) $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'move_category': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_CATEGORY . '</b>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=move_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => sprintf(TEXT_MOVE_CATEGORIES_INTRO, $cInfo->categories_name)); $contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $cInfo->categories_name) . '<br>' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; This coed is responsible for creationg editing and deleting categoriery... I do not know what is wrong. Quote Link to comment Share on other sites More sharing options...
witer Posted December 6, 2008 Share Posted December 6, 2008 (edited) ok I fixed, it is working now. This is great tool thanks a lot... Edited December 6, 2008 by witer Quote Link to comment Share on other sites More sharing options...
tnier Posted December 6, 2008 Share Posted December 6, 2008 What's the header tag? If you are referring to the title in the browser, have you ran fill tags? The test function? Jack Yes i ran the fill tags for the test i get Option Error: The Search Engine Friendly option is set. This should be disabled since it can cause various problems. Database/File Mismatch Error: The number of file entries in the database (21) does not match the number in the includes/header_tags.php file (19). Files not in the includes/header_tags.php file: 0 allprods.php Quote Link to comment Share on other sites More sharing options...
witer Posted December 6, 2008 Share Posted December 6, 2008 Hi, Cen you help me because probably I found bug I have the same product in two category. And schemat of title look like: name of category - name of product - defoult title of product_info.php It is very nice but the first part of title is alway the same name of category and this is category with lower ID. If I clicke from first or second category it is alway dispaling name category with lower ID. This is normal or is this bug? Maybe I did so;ething wrong? Thanks in advance for support Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 7, 2008 Author Share Posted December 7, 2008 Yes i ran the fill tagsfor the test i get Option Error: The Search Engine Friendly option is set. This should be disabled since it can cause various problems. Database/File Mismatch Error: The number of file entries in the database (21) does not match the number in the includes/header_tags.php file (19). Files not in the includes/header_tags.php file: 0 allprods.php So did you turn off the search engine friendly option? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 7, 2008 Author Share Posted December 7, 2008 Hi, Cen you help me because probably I found bug I have the same product in two category. And schemat of title look like: name of category - name of product - defoult title of product_info.php It is very nice but the first part of title is alway the same name of category and this is category with lower ID. If I clicke from first or second category it is alway dispaling name category with lower ID. This is normal or is this bug? Maybe I did so;ething wrong? Thanks in advance for support If you are using the copy function to create the second product, it adds it using the same product ID. The code uses that ID to get the category path, thus it only finds one. If you manually add the second product, by clicking the Add Product button, the product ID is different and Header Tags will work as expected. But the Header Tags code should be changed to account for that. I will add it to the list of changes but I can't say when that will be done. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted December 7, 2008 Share Posted December 7, 2008 (edited) Hey, I have a problem with some coding in "application_top.php" when merging "Header Tags SEO 3.1.0" with "enable/disable categories". Here are my last tials in this case: $categories_query = tep_db_query("select categories_htc_title_tag from " . TABLE_CATEGORIES_DESCRIPTION . " cd left join " . TABLE_CATEGORIES . " c on cd.categories_id = c.categories_id where c.categories_status = '1' and cd.categories_id = '" . (int)$cPath_array[$i] . "' and cd.language_id = '" . (int)$languages_id . "' LIMIT 1"); and some lines further down $products_query = tep_db_query("select pd.products_head_title_tag from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id and pd.language_id ='" . (int)$languages_id . "' LIMIT 1"); The problem is, that when I cklick to a category, no articles are shown. Even in "product_info.php" nothing appears. I think the reason must bei in these two lines The link to this shop (it is a test shop) is Link click here... Can you help me? Thanks a lot, and best greatings from germany/bavaria Michael Edited December 7, 2008 by e-peoples Quote Link to comment Share on other sites More sharing options...
witer Posted December 7, 2008 Share Posted December 7, 2008 If you are using the copy function to create the second product, it adds it using the same product ID. The code uses that ID to get the category path, thus it only finds one. If you manually add the second product, by clicking the Add Product button, the product ID is different and Header Tags will work as expected. But the Header Tags code should be changed to account for that. I will add it to the list of changes but I can't say when that will be done. Jack Yes, this product is the same it is added only once and than linked with second category. This can be nice improvement. Another question for "current view". Now HTSEO is creating one link. product name - category name - title of index.php = this is complete link to product page. Is it possible to change it in easy way like below product name (link to product) - category name (link to category) - title of index.php (link to shop) I now that it can be difficult but it is possible to do in easy way? Thanks for this addon, work nice and installation is easy even if you have modification in your shop. thanks and sorry for the problem Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 7, 2008 Author Share Posted December 7, 2008 Another question for "current view". Now HTSEO is creating one link.product name - category name - title of index.php = this is complete link to product page. Is it possible to change it in easy way like below product name (link to product) - category name (link to category) - title of index.php (link to shop) See the sort order settings, as explained in the documentation. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
witer Posted December 7, 2008 Share Posted December 7, 2008 See the sort order settings, as explained in the documentation. Jack Hi again, I saw sortning and it is ok. I mean this part in product page <?php /*** Begin Header Tags SEO ***/ ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> <?php echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title']; ?></a></td> </tr> <?php /*** End Header Tags SEO ***/ ?> Here for sereral titles we obtain only one link (url). But it is possible that we will have few links here depending on product, category, and last one to our shop. So construction of my query can be: "current view: product name - category name - title (of index.php)" but product name - url to product name, category name - url to category, title - url to shop sorry that I was not clear enught. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 7, 2008 Author Share Posted December 7, 2008 You would have to code that. It's not part of the package. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rumi Posted December 8, 2008 Share Posted December 8, 2008 Hello, I have installed Header Tags SEO 3.1.0 and Im having a problem. On the product page, above the image, is a large partial image of my header logo with the category heading on top of it. Ive ran "test" and its fine. Ive checked both my index and product info pages for mistakes as well as my admin/category page. I have looked at the possibility of having multiple header_log.png images (I also have installed STS 4.5.8 so I have two stylesheets and image directories). Also have Ultimate SEO urls v2.1d. Im at a loss as to what Im doing wrong. Thank you Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 8, 2008 Author Share Posted December 8, 2008 You need to determine if the problem is with STS or with Header Tags by turning STS off. If it works with it off, then some change you made, or didn't make, to STS is at fault. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
rumi Posted December 8, 2008 Share Posted December 8, 2008 Thanks Jack, Ill try that. Quote Link to comment Share on other sites More sharing options...
Rianton Simbolon Posted December 8, 2008 Share Posted December 8, 2008 I've just installed Header Tags SEO V 3.1.0, everything's working good, but I have 1 problem. I cannot edit a product from Admin page, coz everytime I try to edit a product, it will perform adding new product function. I have checked all codes and contribution, but it seems I've following Installation instruction correctly. Please any help would be appreciate... Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 8, 2008 Author Share Posted December 8, 2008 Did you try using the included categories file as mentioned in the install instructions? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
theinkjetmarket Posted December 9, 2008 Share Posted December 9, 2008 Hi Thanks Jack for a great contribution. I have one problem and a couple of questions. I have default tags set. I also have the code inserted in index.php, product_info.php and allcategories.php. When I view the home page or a product page the title at the top of the browser displays as normal. I get the product information when on a product page. However when I look at any of the categories the default title tag is displayed at the top of the browser page. Any idea why this could be? I have undertaken a tet and that shows no errors. in the admin page control for allcategories.php I only have the Category box checked. If someone could help it would be most appreciated. And a question - what information from the Header Tags SEO, if any actually appears in the search results for Google say? Best Regards Garry Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 10, 2008 Author Share Posted December 10, 2008 I'mnot sure I understand the question but if you are asking why the category name isn't appearing in the title, my guess is that you don't have the category checkbox checked in page control for the index page or fill tags hasn't been ran for categories. Google decides what they list. They will sometimes use the meta tag information but will usually make it up from the text on the page. MSN and Yahoo are more likely to use the meta description text. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
ReyBlack Posted December 10, 2008 Share Posted December 10, 2008 Hi all, I have instaled the Enable & Disable Categories 1.6.6 contrib. (http://addons.oscommerce.com/info/326) and I'm trying to install Header Tags SEO V3.0 (http://addons.oscommerce.com/info/5851) and I'm going crazy with this code: in catalog/includes/aplication_top.php Instructions in Install_Catalog.TXT says: FIND: // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } Replace with /*** Begin Header Tags SEO ***/ // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_htc_title_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "' LIMIT 1"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($_GET['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' LIMIT 1"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id'])); } } // add the products name to the breadcrumb trail if (isset($_GET['products_id'])) { $products_query = tep_db_query("select pd.products_head_title_tag from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id ='" . (int)$languages_id . "' LIMIT 1"); if (tep_db_num_rows($products_query)) { $products = tep_db_fetch_array($products_query); $breadcrumb->add($products['products_head_title_tag'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id'])); } } /*** End Header Tags SEO ***/ But i have this part of code in that file, and i don't know how to do it. // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { // BOF Enable & Disable Categories $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd left join " . TABLE_CATEGORIES . " c on cd.categories_id = c.categories_id where c.categories_status = '1' and cd.categories_id = '" . (int)$cPath_array[$i] . "' and cd.language_id = '" . (int)$languages_id . "'"); // EOF Enable & Disable Categories if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { // BOF Enable & Disable Categories //$model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $model_query = tep_db_query("select p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id left join " . TABLE_CATEGORIES . " c on p2c.categories_id = c.categories_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where c.categories_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id"); // EOF Enable & Disable Categories if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } I have tried to merge the code, find differences....almost everything, but it's not working well. could anyone, who understand the code, tell me how to re-write this part of code to keep both contrib. working? Thank you so much... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.