Hey, because when customers are looking for a specific product, they go to the categorie needed. But then all the products in the categorie are messy, i want the alfabet on top so people can press on the letter of the thing they are looking for and than that it shows all the products with that letter. How can i do this or is here something for?
Thanks
Latest News: (loading..)
How can u sort ur products on alfabet?
Started by Pimmy, Oct 26 2003, 14:12
3 replies to this topic
#1
Posted 26 October 2003, 14:12
#2
Posted 27 October 2003, 06:15
I have seen this on an osCommerce website - I don't know if there is a contribution, but its worth a look there - Contributions
Matti Ressler
We were all once expert at...... nothing
_____
We were all once expert at...... nothing
_____
#3
Posted 27 October 2003, 08:18
i've searched there but couldn't find anything... a search field on top so u can search for the product u need in that categorie would be nice to or something else 2 find a product quick...
#4
Posted 27 October 2003, 08:52
Around lines 71-3, 280-2, and 299-301 of index.php, replace
Hth,
Matt
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>with <tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td class="smallText">
<?php
for($i=0; $i < 26; $i++) {
echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('fl')) . 'fl=' . chr($i + ord('A'))) . '">' . chr($i + ord('A')) . '</a> ';
}
?>
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>Around line 127, change } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {to } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id']) || isset($HTTP_GET_VARS['fl'])) {Before this line (around 191): if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {add if (isset($HTTP_GET_VARS['fl']) {
$listing_sql .= " and pd.products_name like " . tep_db_prepare_input($HTTP_GET_VARS['fl']{0}) . "%";
}Backup before you try. No testing has been done. Might need tweaking to work right.Hth,
Matt














