osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Attribute manager - sorting attributes on SELECT

This is a discussion on Attribute manager - sorting attributes on SELECT within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Is there a way to re-sort the attributes on the Attribute Manager page? It seems that if I use the ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 03-29-2006, 02:37 PM
chrismole's Avatar
Active Member
 
Join Date: Dec 2003
Location: Chicago
Posts: 102
Thanks: 2
Thanked 2 Times in 2 Posts
Rep Power: 5
chrismole
Default Attribute manager - sorting attributes on SELECT

Is there a way to re-sort the attributes on the Attribute Manager page? It seems that if I use the Attributes Manager to create product attributes, the INSERT statement creates the attributes in the order they're listed on the Attribute manager page (which looks like ascending by option_id).

For example, I have an attribute named length with values 32", 34", 36", etc. In attribute manager, they are listed descending, 36, 34, 32. When I check off these attributes for a product and apply changes, they seem to be inserted into the db with 36 first, then 34, then 32. So if I sort my attributes by option_id, I get 36" listed first in the product dropdown rather than 32".

Bascially, I am asking if there is a way to re-order the options listed in Attribute Manager so thay are ordered by option_id (the order they were created in Product Attributes)? I've tried adding "order by option_id" to all the SELECT queries in new_attributes_change.php, but no luck.

thx,
C
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 04-07-2006, 10:32 AM
chrismole's Avatar
Active Member
 
Join Date: Dec 2003
Location: Chicago
Posts: 102
Thanks: 2
Thanked 2 Times in 2 Posts
Rep Power: 5
chrismole
Default RE: Attribute manager - sorting attributes on SELECT

I figured it out. The SELECT statement is in:
admin/new_attributes_include line 58. Here's the statement:
Code:
$query2 = "SELECT * FROM products_options_values_to_products_options WHERE products_options_id = '$current_product_option_id' ORDER BY products_options_values_id DESC";
simply change the "DESC" at the end of the statement to "ASC", like this:
Code:
$query2 = "SELECT * FROM products_options_values_to_products_options WHERE products_options_id = '$current_product_option_id' ORDER BY products_options_values_id ASC";
A plus is it saves the attributes in the same ascending order, based on the order in which you entered them into admin Products Attributes manager. This is handy if you have numerical values in an attribrute dropdown that you want the customer to see in ascending order.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Attribute Manager w/ Catagories CircleG osCMax v2 Customization/Mods 3 03-24-2007 09:37 AM
Product Options / Product Attributes.. pulldown sorting.? Preston osCommerce 2.2 Discussion 5 11-24-2005 07:53 PM
changing default option/attribute drop down to please select sirsonic osCMax v2 Customization/Mods 0 10-12-2005 05:49 PM
Deleted products showing in Attribute Manager neil osCMax v1.7 General Mods Discussion 0 02-17-2004 05:06 AM
Sorting Product attributes kjell osCommerce 2.2 Modification Help 0 01-16-2004 04:29 AM


All times are GMT -8. The time now is 09:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax