Author Topic: osC AddonsRplace "Product Model" with "Product Name" in Breadcrumb Trail  (Read 963 times)

0 Members and 1 Guest are viewing this topic.

NewsBot

  • The osCommerce University News Bot
  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1024
  • Karma: 0
    • View Profile
Rplace "Product Model" with "Product Name" in Breadcrumb Trail
     


Just a Simple way of replacing "Product Model" with "Product Name"  at the end of your Breadcrumb Trail.





------------------------------------------------------



To install:



1. Backup! your copy of /your_catalog_path/includes/application_top.php



2. Find in "application_top.php" this line (Around line 493)



$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));



3. Replace with:



// $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));



4. Find the last "}" (line 495) and isert at line 496:



// add the products name to the breadcrumb trail

  if (isset($HTTP_GET_VARS['products_id'])) {

    $name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

    if (tep_db_num_rows($name_query)) {

      $name = tep_db_fetch_array($name_query);

      $breadcrumb->add($name['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));

    }

  }



------------------------------------------------------



Thats it, Now the "Product Name" is at the end in your breadcrumb trail.



-Ivaylo ;)
     

http://addons.oscommerce.com/info/5807
     
================================
This post was created by the osCommerce University News Bot.  Feel free to reply, attach polls, etc -- but do not hold the osCommerce University responsible for the content of the post itself.  PM the Administrator for SPAM, thanks!