Most of you might have noticed in your Oscommerce Catalog that Attributes for every products don't come up in sorted order. Which looks very awkward. There's a simple modification to get rid of it.
1. Edit product_info.php file under your catalog's main folder.
2. Search for
""""" $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); """"""""
3. Replace with
""""""" $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pa.products_attributes_id"); """""""""
*** IGNORE/DONT COPY """""""""
What it actually does
1st - It sorts by price
2nd - if price is same or 0(zero) it sorts on basis of order the option was entered.
4. Save the page and you are done.
Don't forget to post your comments.
Categories
- Drupal ( 1 )
- Entertainment ( 0 )
- Fun and Fantasy ( 0 )
- Issues and Solution ( 1 )
- Joomla ( 7 )
- Jquery ( 1 )
- Oscommerce ( 1 )
- Photoshop ( 1 )
- PHP ( 1 )
- Research and Development ( 0 )
- Tips and Tricks ( 0 )
- Tutorial ( 0 )
- Useful Elements ( 0 )
- Web Design and Development Tips ( 2 )
Most Popular
- Drupal Blank Login node?destination=node
- Joomla Articles show a Blank Page
- Remove border around textbox in google chrome
- redirect 404 / 301 pages page not found error page in joomla
- Sort product attributes in product order page oscommerce
- Undefined variable: HTTP_POST_VARS php
- Stylish Jquery Form Tooltip
- Change Joomla Default Login Message Alerts
- How to remove Welcome to the Frontpage title
- Web Design Color Palettes






![]() | Today | 12 |
![]() | Yesterday | 94 |
![]() | This week | 193 |
![]() | Last week | 649 |
![]() | This month | 612 |
![]() | Last month | 4836 |
![]() | All days | 30225 |
Your IP: 38.107.191.97
,
Today: Sep 08, 2010








