Results 1 to 4 of 4

Product Attributes Question

This is a discussion on Product Attributes Question within the osCMax v1.7 Installation forums, part of the osCmax v1.7 Forums category; Hello, Can someone please tell me how I can make my size drop down box appear in order like this ...

      
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    86
    Rep Power
    0


    Default Product Attributes Question

    Hello,

    Can someone please tell me how I can make my size drop down box appear in order like this small, medium, large, x-large, 1x, 2x, 3x for some reasone it is showing up like this 1x, 2x, 3, large, medium, small, x-large. The order is all mixed up.

    Please help.

    Thanks in advance.

  2. #2
    Anonymous
    Guest


    Default

    Hello,
    I have managed to answer my own question for the osC template. I hope this answer will help many with the same question?

    If you have the option to switch templates and you are using the osC template this is the fix for the sort order in product attributes:
    Go to catalog/templates/ osc/content and on line 88 you will see this:
    $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 . "'");

    Change to this if you don’t want to worry about alphabetic or numeric order That way you are not stuck with alphabetic, or numeric ordering, you can control the order that the attributes show according to the order that you enter them. $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 pov.products_options_values_id"); (I used this one, and it worked great)

    Change to this for sort by attribute value: $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 pov.products_options_values_name" ); with this one Then in your product attributes just make sure your values are set up alphabetically

    Try both and see wich one works for you

  3. #3
    Active Member neil's Avatar
    Join Date
    Nov 2002
    Posts
    248
    Rep Power
    10


    Default


    Congratulations Auntie,
    Answering your own questions helps all of us out.

  4. #4
    Member
    Join Date
    Oct 2003
    Location
    The Antelope Valley in SoCal
    Posts
    47
    Rep Power
    0


    Default

    Awesome - worked excellent for my application. I had 30 attributes per product, ranging from 1 -30 and they were coming up all out of order.

    Thanks for outlining.

Similar Threads

  1. Product Options / Product Attributes.. pulldown sorting.?
    By Preston in forum osCommerce 2.2 Discussion
    Replies: 5
    Last Post: 11-24-2005, 07:53 PM
  2. Specific Product Image based on chosen product attributes?
    By chrisrex in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 11-22-2005, 09:41 AM
  3. Product attributes
    By djlane in forum osCMax v1.7 Installation
    Replies: 1
    Last Post: 07-26-2005, 09:38 AM
  4. attributes - product options question
    By stevensdesign in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 07-12-2005, 01:46 PM
  5. Product attributes
    By kellyw628 in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-12-2003, 01:58 PM

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
  •