Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 6 of 6

Thread: Product Options / Product Attributes.. pulldown sorting.?

  1. #1
    Preston
    Guest


    Default Product Options / Product Attributes.. pulldown sorting.?

    Ive got an option, "Style", with 10 Options, 100-109, and when I insert them all the dropdown box on the rendered page has them in random order. Is there a setting I'm missing or is this just how it works.

    I've tried adding the attributes in dif orders and it arranges them differently.. even if I re-add them in the original ascending order..

    I'm so confused has anyone else seen this.. I just want them in ascending order

    100
    101,.. etc..

    ive got

    101
    105
    102
    103,..




    Oh.. and while I add them in the admin.. products_attributes.php page in order.. the rearrange with each update on their own.. fun.

  2. #2
    Preston
    Guest


    Default RE: Product Options / Product Attributes.. pulldown sorting.

    Dang. I just looked at the mysql query.. there is no order by.. so I just added that..

    in product_info.php line 131:

    $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 . "'");

    changed to:

    $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 . "' order by pa.options_values_id");


    I hope this helps fix my problem ;/ ill have to add more products and options.

  3. #3
    ktweezee
    Guest


    Default Re: RE: Product Options / Product Attributes.. pulldown sort

    Quote Originally Posted by Preston
    Dang. I just looked at the mysql query.. there is no order by.. so I just added that..

    in product_info.php line 131:

    $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 . "'");

    changed to:

    $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 . "' order by pa.options_values_id");


    I hope this helps fix my problem ;/ ill have to add more products and options.
    nice work man, i really needed this one, there was a contribution that was too much for me to follow:

    http://www.oscommerce.com/community/contributions,1822

  4. #4
    Smurf
    Guest


    Default RE: Re: RE: Product Options / Product Attributes.. pulldown

    I'm having the a similar problem.

    My attribute list is colours, at the moment in a random order. Can I use a modified version of the above code & display them in alphabetical order?

    Any help appreciated.

  5. #5
    Smurf
    Guest


    Default Attributes

    Is anybody willing to she some light on the code, I've tried searching other php forums, no joy yet. I'm going back to trial & error.
    Any help appreciated.

    Thank You

  6. #6
    ericcech
    Guest


    Default RE: Attributes

    if not found in product_info.php, add to the end of the same line as above in pad_base.php

    ." order by pa.options_values_price, pa.products_attributes_id"

    my single radio options are now sorted by option_id.

Similar Threads

  1. 2 Issues - product url for more info and sorting options
    By jaruss in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 10-27-2005, 03:41 PM
  2. attributes - product options question
    By stevensdesign in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 07-12-2005, 12:46 PM
  3. product options/attributes
    By jloyzaga in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 04-13-2004, 10:53 AM
  4. Sorting Product attributes
    By kjell in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-16-2004, 04:29 AM
  5. organizing display of product attributes/options
    By mafunk in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-12-2003, 02:27 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •