sinmike Posted February 14, 2003 Posted February 14, 2003 i got the attribute sorter and copy addon v5, tested it and everthing worked great. after adding about 30 option names and about 630 option values i have the following problem: 1. in product attributes under option values the names and values are displayed nice in order under each other. when i go to categories to add a new product then in the option name table the values a mixed up. 2. when i add options in a new product and i click preview it takes about 30 sec. then i get the preview page and after that i can not do anything. the browser is not responding anymore. hope someone can help me. Quote
Ajeh Posted February 15, 2003 Posted February 15, 2003 Might get v5.1 that is on my site. It is more current and has more features. I would have to see what it is doing to know what the problem is. I have not run into a problem on this, but I have not added 630 option values either. Quote
sinmike Posted February 15, 2003 Author Posted February 15, 2003 hi linda, thank you so much for your reply. i send you a mail with all details so you can take a look at it. btw. thanks for that fantastic contribution. Quote
sinmike Posted February 17, 2003 Author Posted February 17, 2003 hi linda, did you got my mail? hope you can help me. best regards Quote
Ajeh Posted February 18, 2003 Posted February 18, 2003 Yes, got the email ... now I am trying to figure out a plan for people who have so many attributes. Quote
Guest Posted February 21, 2003 Posted February 21, 2003 Linda.. Your attributes mod is great .. thanks ;) I have a problem though .. my only real need for it was to sort the options display in the admin so as I am adding or changing attributes for a product they are listed ASC or DESC .. but they are still appearing in the order in which they were entered in the product attributes page. Did I miss something ? Thanks -caz Quote
Guest Posted February 21, 2003 Posted February 21, 2003 Just to clarify ... currently I see attributes listed as.. black white red forest green baby blue navy baby pink natural royal blue salt n' pepper fuscia lollipop red ... etc. when they should be .. baby blue baby pink black ... etc. I have tried modifying the 'order by' in admin categories.php $options_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name ASC"); (added the ASC) .. but I guees it isn't the correct one because it doesn't change anything. Any help much appreciated. -caz Quote
Guest Posted February 21, 2003 Posted February 21, 2003 I found the sort order column on the admin/product_attributes page .. I have 10 options and over 600 attributes... do I really have to edit each one to put a sort order value for them to show up in my admin/categories.php page in ascending order ? :shock: I am thinking there should be an easier way to accomplish this .. :?: .. maybe I am barking up the wrong mod for my needs. any advice much appreciated. Quote
Ajeh Posted February 21, 2003 Posted February 21, 2003 This the code located beneath the section: ///////////////////////////////////////////////////////////////////// // BOF: WebMakers.com Added: Draw Attribute Tables And change to: $options_query = tep_db_query("select products_options_id, products_options_name, products_options_sort_order TABLE_PRODUCTS_OPTIONS from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name"); while ($options = tep_db_fetch_array($options_query)) { $values_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " p2p where pov.products_options_values_id = p2p.products_options_values_id and p2p.products_options_id = '" . $options['products_options_id'] . "' and pov.language_id = '" . $languages_id . "' " . " order by pov.products_options_values_name"); Be sure to backup first. Quote
Guest Posted February 22, 2003 Posted February 22, 2003 You are awesome ! I love this place !! Fix a little, learn a lot ;) Thank you :!: Quote
sinmike Posted February 25, 2003 Author Posted February 25, 2003 hi linda, i guess i found out what the problem was :idea: . different option names can not have same values. for example: option name: lenght values: 10, 12, 14 option name: diameter values: 8, 10, 12 this causes a double entry in the product_option_values and it looks like osc does not like that. i changed all double values to something like this: 10.0 and everything works fine. ok... it still takes long to load and save when adding a product.... but i guess that is normal if you have over 630 values :wink: . regards, mike Quote
Guest Posted February 25, 2003 Posted February 25, 2003 I just discovered an issue with the code replacement posted previously for making the attributes admin/categories.php page in ascending order . It displays correctly but doesn't put it in the database correctly. ie: if my list were originally sand brown black white red it appeared as... black brown red sand white but anything that should have options red and sand now had black and white :shock: thank goodness for backups .. and I still learned a bunch ;) Quote
Ajeh Posted February 26, 2003 Posted February 26, 2003 I just went through and tested that further ... Yeps ... breaks it real good huh?! :shock: I will have to find a different method without the total mess up of the attributes ... Quote
morbus Posted February 26, 2003 Posted February 26, 2003 This is what I do to get the attributes sorted which, when adding them to your cart, seems to get the proper attribute names. In catalog/includes/product_info.php, look for: echo tep_draw_pull_down_menu( ... bunch of stuff ... ) Right ABOVE that line, add the following: usort($products_options_array, create_function('$a, $b','return strcasecmp($a[text],$b[text]);')); That should be one line (I split it here for readability). Quote http://www.disobey.com/ http://www.gamegrene.com/
Guest Posted February 26, 2003 Posted February 26, 2003 I will try that ;) But what I'm really looking for is for the admin area. I have the modified product_info.php which allows you to add the options as you are adding a product. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.