Erjon Posted October 16, 2008 Posted October 16, 2008 Hello I am having trouble with the Option Values on the products. This is a online store for a clothing company, and I need to add sizes to jeans as an example. But when i add in all the sizes in the Products Attributes they wont show in order correctly on the site. For some products the order is (Size: 24,25,26,27,28,29) and for some its like (Size: 29,31,30,24,27,28,25). Does anyone know what the problem is please help, i need to fix this issue right away. take a look: http://cinchit.com/tush/product_info.php?c...products_id=128 (go into the Available Options, and Select Size, there you will see the numbers are not in order).
failsafe Posted October 16, 2008 Posted October 16, 2008 I am having trouble with the Option Values on the products. This is a online store for a clothing company, and I need to add sizes to jeans as an example. But when i add in all the sizes in the Products Attributes they wont show in order correctly on the site. For some products the order is (Size: 24,25,26,27,28,29) and for some its like (Size: 29,31,30,24,27,28,25). Does anyone know what the problem is please help, i need to fix this issue right away. I think the problem is that the options are listed in the order that you defined them for the product. If that's the case, you could either alter the database to order the options as you want (or re-enter the product options in order), or alter the SQL query that pulls them out of the database to construct the options list. Perhaps the latter would be easier. I think osC doesn't sort the option list into order by default because most folks would want the option list to appear in the order they defined them, so they can place the most likely options near the top, for example. It just gives greater control. Anyway, if all your option lists are similar, and you don't mind them being sorted into alphabetical order every time, you could alter the code in product_info.php around line 252, to sort the options via "order by" like this... while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $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"); Simple huh? Good luck. :)
lindsayanng Posted October 16, 2008 Posted October 16, 2008 there is a contribution called attributes sort order.. just install that and you will be all set. go to addons.oscommerce.com and search attributes sort order A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.