Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product ordering


antonaq

Recommended Posts

Posted

Hi guys, i have this question:

when i go in admin panel and i set that i don't need column name in product list than i can't order product list by other parameter (price, manufacturer) by click on header of table.

HTML of example with name parameter:

<tr>
<td class="productListing-heading"> <a href="http://localhost/catalog/index.php?manufacturers_id=56&page=1&sort=1d&osCsid=a85e8ad9e5a5f18c3da0f1f7e83b833c" title="Tipi di prodottiin modo discendente by Prodotto" class="productListing-heading">Prodotto+</a> </td>
<td class="productListing-heading" align="center">  </td>
<td class="productListing-heading"> <a href="http://localhost/catalog/index.php?manufacturers_id=56&page=1&sort=3a&osCsid=a85e8ad9e5a5f18c3da0f1f7e83b833c" title="Tipi di prodottiin modo ascendente by Produttore" class="productListing-heading">Produttore</a> </td>
<td class="productListing-heading"> <a href="http://localhost/catalog/index.php?manufacturers_id=56&page=1&sort=4a&osCsid=a85e8ad9e5a5f18c3da0f1f7e83b833c" title="Tipi di prodottiin modo ascendente by Modello" class="productListing-heading">Modello</a> </td>
<td class="productListing-heading" align="right"> <a href="http://localhost/catalog/index.php?manufacturers_id=56&page=1&sort=5a&osCsid=a85e8ad9e5a5f18c3da0f1f7e83b833c" title="Tipi di prodottiin modo ascendente by Prezzo" class="productListing-heading">Prezzo</a> </td>
<td class="productListing-heading" align="center"> Compra Ora </td>
</tr>

 

without parameter name:

 

<tr>
<td class="productListing-heading" align="center">  </td>
<td class="productListing-heading"> Produttore </td>
<td class="productListing-heading"> Modello </td>
<td class="productListing-heading" align="right"> Prezzo </td>
<td class="productListing-heading" align="center"> Compra Ora </td>
</tr> 

 

i lost href for ordering.

 

I found function that make href in general.php

 

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;
} 

 

but i don't know where is used and how solve this problem. Please help me.

Archived

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

×
×
  • Create New...