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

Thread: attribute sort

  1. #1
    timbrrr
    Guest


    Default attribute sort

    I wanted a way to display my attributes starting with the lowest price first (or zero) to the highest price last. After trying to find any post to this that was current and that worked, I looked on my own. I think I found the way to do this in the classes directory in the pads_base.php file. around line 312, I placed the order statement that was referred to in some earlier documentation, so that it looks like this (new addition in bold):


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

    If anyone has a better way to do this, I'd like to hear from them, or if someone sees a red flag doing this, please point it out.
    Thanks

  2. #2
    Smurf
    Guest


    Default RE: attribute sort

    I'm trying to sort my attributes into alphabetical order.
    Will the above work if the code was changed slightly? If so, to what?

    Thanks

  3. #3
    landshark
    Guest


    Default RE: attribute sort

    That fixed my problem thanks for the post. The osCMAX documentation should be updated to reflect this.

  4. #4
    deviantla
    Guest


    Default RE: attribute sort

    I used the attribute sort mod from osCommerce myself. Where instructions call to change the linkes in /catalog/product_info.php, make the change in pads_base.php. Continue with the other changes (be sure to manually change /admin/product_attributes.php!) and there is now the option to sort your attributes on the Products Attributes page. unfortunately, the sort option is not available on the Attributes Manager page, which is a whole lot cleaner and easier to use.

Similar Threads

  1. Sort by price?
    By kenlyle in forum osCmax v2 Customization/Mods
    Replies: 9
    Last Post: 09-14-2010, 01:40 AM
  2. Needing: Attribute Weight, Hide Price if 0, Actual Attribute
    By crystina in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 11-22-2006, 05:08 PM
  3. Sort products by price
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 06-02-2005, 04:55 AM
  4. sort order to pot!!
    By moreduff in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-12-2005, 04:57 AM
  5. Sort function
    By goaskmom in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 01-17-2005, 04:53 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
  •