OSC 商品說明上方導覽列修正

OSC 的上方導覽列到了商品頁面部份會跑出很詭異的情形。
就是只顯示型號出來,而不是商品名稱。

這與一般的閱覽習慣差別滿大的,因為連結是竟是連到商品說明頁…..

// 只顯示型號
首頁 » 商品目錄 » 臉部彩妝 » 隔離霜 » A328

// 而不是品名
首頁 » 商品目錄 » 臉部彩妝 » 隔離霜 » RMK水凝粉霜

要修改為顯示商品名稱而不是型號的話,只需修改 includes/application_top.php


搜尋

php · [高亮] · [原始]

  1. // add the products model to the breadcrumb trail
  2.   if (isset($HTTP_GET_VARS[‘products_id’])) {
  3.     $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = ‘" . (int)$HTTP_GET_VARS[‘products_id’] . "’");
  4.     if (tep_db_num_rows($model_query)) {
  5.       $model = tep_db_fetch_array($model_query);
  6.       $breadcrumb->add($model[‘products_model’], tep_href_link(FILENAME_PRODUCT_INFO, ‘cPath=’ . $cPath . ‘&products_id=’ . $HTTP_GET_VARS[‘products_id’]));
  7.     }
  8.   }
// 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\']));
    }
  }

取代

php · [高亮] · [原始]

  1. // add the products model to the breadcrumb trail
  2.   if (isset($HTTP_GET_VARS[‘products_id’])) {
  3.     $model_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = ‘" . (int)$HTTP_GET_VARS[‘products_id’] . "’");
  4.     if (tep_db_num_rows($model_query)) {
  5.       $model = tep_db_fetch_array($model_query);
  6.       $breadcrumb->add($model[‘products_name’], tep_href_link(FILENAME_PRODUCT_INFO, ‘cPath=’ . $cPath . ‘&products_id=’ . $HTTP_GET_VARS[‘products_id’]));
  7.     }
  8.   }
// add the products model to the breadcrumb trail
  if (isset($HTTP_GET_VARS[\'products_id\'])) {
    $model_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($model_query)) {
      $model = tep_db_fetch_array($model_query);
      $breadcrumb->add($model[\'products_name\'], tep_href_link(FILENAME_PRODUCT_INFO, \'cPath=\' . $cPath . \'&products_id=\' . $HTTP_GET_VARS[\'products_id\']));
    }
  }

Leave a Comment