158bev Posted January 26, 2009 Posted January 26, 2009 In the product listing is there a way to change where it says "product listing+" to say something else or even possibly insert an image there ?
Guest Posted January 26, 2009 Posted January 26, 2009 The " + or - " sign denotes the sort order, ascending or descending. To make that an image do this. Create your images like arrow_up.png and arrow_down.png. place those in your images directory. In catalog/includes/functions/general.php find // 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; } Change to // 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>'; $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? ' ' . tep_image(DIR_WS_IMAGES . 'arrow_up.png') : ' ' . tep_image(DIR_WS_IMAGES . 'arrow_down.png')) : '') . '</a>'; } return $sort_prefix . $heading . $sort_suffix; }
158bev Posted January 26, 2009 Author Posted January 26, 2009 The " + or - " sign denotes the sort order, ascending or descending. To make that an image do this. Create your images like arrow_up.png and arrow_down.png. place those in your images directory. In catalog/includes/functions/general.php find // 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; } Change to // 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>'; $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? ' ' . tep_image(DIR_WS_IMAGES . 'arrow_up.png') : ' ' . tep_image(DIR_WS_IMAGES . 'arrow_down.png')) : '') . '</a>'; } return $sort_prefix . $heading . $sort_suffix; } Thanks for the response. I gave it a try and pasted the code it but nothing changed..i made the .png images and put them in the categories/images folder. They are not showing up and nothing has changed. Am I missing something?
Guest Posted January 27, 2009 Posted January 27, 2009 put them in the categories/images folder. Should be catalog/images.If that is where they are, try clearing your browsers cache.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.