osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Installation

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-02-2004, 07:15 PM
Member
 
Join Date: Jan 2004
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
auntie22
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 02-03-2004, 06:15 PM
Anonymous
Guest
 
Posts: n/a
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 02-06-2004, 05:14 PM
neil's Avatar
Active Member
 
Join Date: Nov 2002
Posts: 245
Thanks: 9
Thanked 7 Times in 6 Posts
Rep Power: 6
neil is on a distinguished road
Default


Congratulations Auntie,
Answering your own questions helps all of us out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-09-2004, 07:30 AM
Member
 
Join Date: Oct 2003
Location: The Antelope Valley in SoCal
Posts: 47
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
In-Overtime
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.
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
Product Options / Product Attributes.. pulldown sorting.? Preston osCommerce 2.2 Discussion 5 11-24-2005 07:53 PM
Specific Product Image based on chosen product attributes? chrisrex osCMax v2 Customization/Mods 0 11-22-2005 09:41 AM
Product attributes djlane osCMax v1.7 Installation 1 07-26-2005 08:38 AM
attributes - product options question stevensdesign osCMax v1.7 General Mods Discussion 2 07-12-2005 12:46 PM
Product attributes kellyw628 osCMax v1.7 Discussion 1 09-12-2003 12:58 PM


All times are GMT -8. The time now is 09:30 PM.


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