Ciao amici, sono nuovo e mi complimento per il forum, ho un problema che mi sta facendo perdere un sacco di tempo e lo espongo qui con la speranza che qualche buona anima mi dia un consiglio...
ho notato che quando non includo il campo nome nella lista prodotti non mi è più possibile ordinare gli oggetti per una determinata specifica (prezzo, produttore, ecc..), nella normalità l'output generato (è compreso il campo nome) è:
<tr>
<td class="productListing-heading"> <a href="http://localhost/catalog/index.php?manu ... f7e83b833c" 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?manu ... f7e83b833c" 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?manu ... f7e83b833c" 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?manu ... f7e83b833c" title="Tipi di prodottiin modo ascendente by Prezzo" class="productListing-heading">Prezzo</a> </td>
<td class="productListing-heading" align="center"> Compra Ora </td>
</tr>
se non includo nome mi risulta:
<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>
a parte un td in meno (giustamente manca un campo) mi mancano tutte le ancore per far si che cliccando sulla header della tabella possa avvenire l'ordinamento...
Ho anche individuato la funzione che genera l'output che è
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;
}
che viene invocata solamente quando c'è il campo nome, ma dove non ho capito...
Cosa devo fare? Come risolvere?
Ordinamento lista prodotti...
Moderatore: mod Generali