osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

attribute sort

This is a discussion on attribute sort within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I wanted a way to display my attributes starting with the lowest price first (or zero) to the highest price ...


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 10-02-2005, 07:28 AM
New Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
timbrrr
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 10-26-2005, 11:08 AM
New Member
 
Join Date: Nov 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Smurf
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 10-30-2005, 01:50 PM
New Member
 
Join Date: Oct 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
landshark
Default RE: attribute sort

That fixed my problem thanks for the post. The osCMAX documentation should be updated to reflect this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-17-2006, 12:24 PM
deviantla's Avatar
New Member
 
Join Date: Jan 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
deviantla
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.
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
Sort by price? kenlyle osCMax v2 Customization/Mods 5 04-17-2008 05:37 PM
Needing: Attribute Weight, Hide Price if 0, Actual Attribute crystina osCMax v2 Customization/Mods 0 11-22-2006 05:08 PM
Sort products by price Anonymous osCMax v1.7 Discussion 3 06-02-2005 04:55 AM
sort order to pot!! moreduff osCMax v1.7 Discussion 0 04-12-2005 04:57 AM
Sort function goaskmom osCMax v1.7 Discussion 4 01-17-2005 04:53 PM


All times are GMT -8. The time now is 02:36 PM.


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