osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Product Options / Product Attributes.. pulldown sorting.?

This is a discussion on Product Options / Product Attributes.. pulldown sorting.? within the osCommerce 2.2 Discussion forums, part of the osCommerce 2.2 Forums category; Ive got an option, "Style", with 10 Options, 100-109, and when I insert them all the dropdown ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 08-21-2005, 01:01 PM
Lurker
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Preston
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 08-21-2005, 01:22 PM
Lurker
 
Join Date: Aug 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Preston
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-26-2005, 09:54 AM
Lurker
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
ktweezee
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
The Following User Says Thank You to ktweezee For This Useful Post:
pefc2525 (12-09-2007)
  #4  
Old 10-26-2005, 11:14 AM
New Member
 
Join Date: Nov 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Smurf
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 11-08-2005, 02:31 AM
New Member
 
Join Date: Nov 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Smurf
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 11-24-2005, 07:53 PM
New Member
 
Join Date: Oct 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ericcech
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.
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
2 Issues - product url for more info and sorting options jaruss osCommerce 2.2 Modification Help 0 10-27-2005 03:41 PM
attributes - product options question stevensdesign osCMax v1.7 General Mods Discussion 2 07-12-2005 12:46 PM
product options/attributes jloyzaga osCMax v1.7 Discussion 1 04-13-2004 10:53 AM
Sorting Product attributes kjell osCommerce 2.2 Modification Help 0 01-16-2004 04:29 AM
organizing display of product attributes/options mafunk osCommerce 2.2 Modification Help 1 09-12-2003 02:27 PM


All times are GMT -8. The time now is 10:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax