Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Get rid of + on Product Name+


timmaggs

Recommended Posts

Does anyone know how to get rid of this annoying + that is only found on the Product name but not the manufacture or price etc?

 

If you don't know what I mean look at the osCommerse demonstration site page which i have helpfully linked to here!

 

Tim

 

The '+', or '-', also appear for price, manufacturer etc. once you click on the column header name.

The function which is responsible for this you can find in (catalog)/includes/functions/general.php

Search for:

////
// Return table heading with sorting capabilities
 function tep_create_sort_heading($sortby, $colnum, $heading) {
global $PHP_SELF;

$sort_prefix = '';
$sort_suffix = '';

if ($sortby) {
  $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
  $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
}

return $sort_prefix . $heading . $sort_suffix;
 }

and change the plus and minus sign within

(substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '')

to ie.

(substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '' : '') : '')

or simply

//	  $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
}

return $sort_prefix . $heading;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...