SunDust Posted March 25, 2009 Share Posted March 25, 2009 Has anybody tried modifng this contribution to work in a multylanguage store?I guess that in the instalation part, every file modification of files having "english" in their paths, has to be done in the respective language file too.. But does one have to do anything else to make it work? I look forward to your reply, and to installing this contribution :-D To use this great contribution in a Multilanguage store, make the next steps: First: Make the same changes in the files of your language (in my case, spanish): "/catalog/admin/includes/languages/english.php" --> make the same changes in --> "/catalog/admin/includes/languages/espanol.php" "/catalog/admin/includes/languages/english/categories.php" --> make the same changes in --> "/catalog/admin/includes/languages/espanol/categories.php" "/catalog/admin/includes/languages/english/products_attributes.php" --> make the same changes in --> "/catalog/admin/includes/languages/espanol/products_attributes.php" Second: COPY also the next files in your language folder (in my case, "spanol" folder): /catalog/admin/includes/languages/english/products_attributes_sets.php /catalog/admin/includes/languages/english/products_attributes_sets_edit.php /catalog/admin/includes/languages/english/images/buttons/button_add_as.gif /catalog/admin/includes/languages/english/images/buttons/button_create.gif --------------------------------------------------------------------------------- Well, now we have a problem. If you use Multilanguage you will see the Attributes and the Values of the different languages at the same time when you make new attribute sets. The contribution works but is something uncomfortable. To fix this, make the next changes in the file "/catalog/admin/products_attributes_sets.php": 1a.- Change this: $options_name_query_sql = "select po.products_options_name, po.products_options_id from " . TABLE_PRODUCTS_OPTIONS . " po where po.products_options_id=".$_POST['products_options_id']; 1b.- To this: $options_name_query_sql = "select po.products_options_name, po.products_options_id from " . TABLE_PRODUCTS_OPTIONS . " po where po.language_id = '" . (int)$languages_id . "' and po.products_options_id=".$_POST['products_options_id']; ----------------------------------------------- 2a.- Change this: $attributeSets_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " order by products_options_name"); 2b.- To this: $attributeSets_query = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_name"); ----------------------------------------------- 3a.- Change this: $attribute_set_sql = "SELECT pas.products_attributes_sets_id, pas.products_attributes_sets_name, pas.products_options_id, po.products_options_name, pase.products_attributes_sets_elements_id, pase.options_values_id, pase.options_values_price, pase.price_prefix, pase.sort_order FROM " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, ". TABLE_PRODUCTS_OPTIONS . " po WHERE pas.products_attributes_sets_id = " . $_GET['attset_id'] . " AND pas.products_attributes_sets_id = pase.products_attributes_sets_id AND pas.products_options_id = po.products_options_id ORDER BY pase.sort_order"; 3b.- To this: $attribute_set_sql = "SELECT pas.products_attributes_sets_id, pas.products_attributes_sets_name, pas.products_options_id, po.products_options_name, pase.products_attributes_sets_elements_id, pase.options_values_id, pase.options_values_price, pase.price_prefix, pase.sort_order FROM " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, ". TABLE_PRODUCTS_OPTIONS . " po WHERE pas.products_attributes_sets_id = " . $_GET['attset_id'] . " AND pas.products_attributes_sets_id = pase.products_attributes_sets_id AND pas.products_options_id = po.products_options_id AND po.language_id = '" . (int)$languages_id . "' ORDER BY pase.sort_order"; ----------------------------------------------- 4a.- Change this: $options_query_sql = "select pov.products_options_values_name, pov.products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po where pov2po.products_options_id = " . (int)$_POST['products_options_id'] . " and pov.products_options_values_id = pov2po.products_options_values_id order by pov.products_options_values_name"; 4b.- To this: $options_query_sql = "select pov.products_options_values_name, pov.products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po where pov2po.products_options_id = " . (int)$_POST['products_options_id'] . " and pov.products_options_values_id = pov2po.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name"; ----------------------------------------------- 5a.- Change this: $options_query_sql = "SELECT pov.products_options_values_name, pov.products_options_values_id FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po where pov2po.products_options_id = '" . $attribute_set['products_options_id'] . "' and pov.products_options_values_id=pov2po.products_options_values_id order by pov.products_options_values_name"; 5b.- To this: $options_query_sql = "SELECT pov.products_options_values_name, pov.products_options_values_id FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po where pov2po.products_options_id = '" . $attribute_set['products_options_id'] . "' and pov.products_options_values_id=pov2po.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_name"; ----------------------------------------------- SunDust Quote Link to comment Share on other sites More sharing options...
SunDust Posted March 25, 2009 Share Posted March 25, 2009 PROBLEM: THE ADMINISTRATOR LOGIN SCREEN IS BLOCKED All works fine in localhost but when I transfer the files to my server by FTP, the Administrator Login Screen is blocked. FIX: In the files: /catalog/admin/includes/database_tables.php /catalog/includes/database_tables.php Insert a space before 'products_attributes_sets_elements'. BEFORE: define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS','products_attributes_sets_elements'); AFTER: define('TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS', 'products_attributes_sets_elements'); ------------------------------------------------------------------------------------ SunDust Quote Link to comment Share on other sites More sharing options...
Guest Posted March 26, 2009 Share Posted March 26, 2009 I have a strange thing in relation to attribute sets. I noticed that they are not displaying on my site in IE (I am using version 6) but they do show up fine in firefox. When I view the source of the page in IE, I can see the drop downs there and the options that should show to the user. Is there any reason why this wouldn't work in IE? It could be my implementation as well! Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
acbatchelor Posted May 3, 2009 Share Posted May 3, 2009 does anyone know a way to add attribute sets to many products in a fast way. i have a store where i sell shirts. i am going to add a sweatshirt category. what i am going to do is copy the entire "adult tee" category and add it to the "adult sweatshirt" category since the designs in each category will be the same. all that is fast, but the problem is the attribute sets. i need to change all the products' attribute sets from "adult tee sizes" to "adult sweat sizes" because i don't have the same sizes in sweatshirts. i also have to deal with shirt colors. :( does anyone know a quick way to do this because i have about 600 products. Quote Link to comment Share on other sites More sharing options...
ce55l Posted May 4, 2009 Share Posted May 4, 2009 What a great contribute!!! THANKS :rolleyes: Quote Link to comment Share on other sites More sharing options...
Guest Posted May 4, 2009 Share Posted May 4, 2009 If I first install more pics classic 1.4.3 is it then easy to upgrade to More pics advanced 2.0.6 if I see this is needed? :huh: Quote Link to comment Share on other sites More sharing options...
acbatchelor Posted May 24, 2009 Share Posted May 24, 2009 (edited) does anyone know how to add next and previous product buttons in the attribute sets edit page? when i check the sets i want to add to a product i would like to just hit next product instead of hitting save and then have to search thru my list of hundreds of products to select the next product in the category manually. Edited May 24, 2009 by acbatchelor Quote Link to comment Share on other sites More sharing options...
doremient Posted May 25, 2009 Share Posted May 25, 2009 Hi All I have tried installing this twice and both times I can't get the attribute sets option in my admin panel. I'm sure there is somethign wrong with teh code, just not sure which file. Does anyone have any ideas? Thanks, Quote Link to comment Share on other sites More sharing options...
acbatchelor Posted May 25, 2009 Share Posted May 25, 2009 Hi AllI have tried installing this twice and both times I can't get the attribute sets option in my admin panel. I'm sure there is somethign wrong with teh code, just not sure which file. Does anyone have any ideas? Thanks, if you mean that attribute sets is not in the catalog menu under the admin then the error is in catalog/admin/includes/boxes/catalog.php Quote Link to comment Share on other sites More sharing options...
doremient Posted May 25, 2009 Share Posted May 25, 2009 if you mean that attribute sets is not in the catalog menu under the admin then the error is in catalog/admin/includes/boxes/catalog.php Thanks, I pretty much figured that is where the issue was, Just not sure how to change it. Here is the code I have // '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' . // BOF Linkmatics attributes sets plus //'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES_SETS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES_SETS . '</a><br>' . // EOF Linkmatics attributes sets plus // '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' . // // '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' . // '<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">Easy Populate</a><br>' . // // START: Product Extra Fields // '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_XSELL_PRODUCTS) . '" class="menuBoxContentLink">' . BOX_CATALOG_XSELL_PRODUCTS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXTRA_FIELDS . '</a>'); // // END: Product Extra Fields Quote Link to comment Share on other sites More sharing options...
acbatchelor Posted May 26, 2009 Share Posted May 26, 2009 i don't know why but you have "//" in front of every line of code. the only lines you should have "//" in are: ---------------------------------------------------- // BOF Linkmatics attributes sets plus // EOF Linkmatics attributes sets plus // START: Product Extra Fields // END: Product Extra Fields ---------------------------------------------------- remove all the rest Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2009 Share Posted June 4, 2009 (edited) I currently just realized that I have 1.01 installed. Its working fine, but have a question as to whether this was fixed in new versions or not. I sell decals and sometimes you need 2+ color options. I can make an Attribute Set (using the same Product Option and Values, just different Set name) for each (ie. color 1, color 2) but on the product page, if both sets are applied, it doubles, sometimes quadruples the colors in only one drop down box. Also, the name in front of the dropdown box is the Product Option rather than the Attribute Set that I created with specific name. Is this correct? I am trying to prevent having to make an entire new Product Option with its own values If I can use the same one with a different Attribute Set name. Thanks in advance! Edited June 4, 2009 by rivalgraphix Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2009 Share Posted June 4, 2009 Thanks Nick - good call. Turns out I thought I had done this but my site is so customised I missed it...long story!I have had a crack at this today hopefully this will do the trick. Anyone care to test it? Just paste the following additional code (in product_info.php) as instructed below: Just to be clear, this code is to provide the ability to use the normal attributes system alongside the ASP contribution (even using both on the same product). The logic is simple: Go get the current option attributes set sort order (what it did previously), if this returns nothing then it must be a non-set option so lets ignore the sets stuff and order the attributes as per original osC. NOTE: this code should not cause damage (as it only selects data, it does not update the database) but be warned it has undergone no testing at all and any untested code may cause spurious results so BACKUP first. So... where original code is: // BOF Linkmatics attributes sets plus $products_options_query = tep_db_query(" SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov WHERE pa.products_id = '" . (int)$_GET['products_id'] . "' AND pa.options_id = '" . $products_options_name['products_options_id'] . "' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '" . $languages_id . "' ORDER BY pase.sort_order, pa.options_values_id"); // EOF Linkmatics attributes sets plus Change it to this: // BOF Linkmatics attributes sets plus $products_options_query = tep_db_query(" SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pase.sort_order FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_TO_PRODUCTS . " pas2pa, " . TABLE_PRODUCTS_ATTRIBUTES_SETS . " pas, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov WHERE pa.products_id = '" . (int)$_GET['products_id'] . "' AND pa.options_id = '" . $products_options_name['products_options_id'] . "' AND pas2pa.products_id = pa.products_id AND pas.products_attributes_sets_id = pas2pa.products_attributes_sets_id AND pas.products_options_id = pa.options_id AND pase.products_attributes_sets_id = pas.products_attributes_sets_id AND pase.options_values_id = pa.options_values_id AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '" . $languages_id . "' ORDER BY pase.sort_order, pa.options_values_id"); // BOF Linkmatics attributes sets plus test patch 001 if (tep_db_num_rows($products_options_query)== 0 ) { $products_options_query = tep_db_query(" SELECT pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix , pa.options_values_id FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov WHERE pa.products_id = '" . (int)$_GET['products_id'] . "' AND pa.options_id = '" . $products_options_name['products_options_id'] . "' AND pov.products_options_values_id = pa.options_values_id AND pov.language_id = '" . $languages_id . "' ORDER BY pa.options_values_id"); } // EOF Linkmatics attributes sets plus test patch 001 // EOF Linkmatics attributes sets plus Any takers ? regards Chris. I tried the change above (which is in a new version) but still doesn't work. Any help? Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2009 Share Posted July 20, 2009 hi, i just installed this contribution and hope to get it running. I think i found a error in the code but i could be wrong. this is what i got from the instructions for admin/categories.... for($i=0; $i <= $iteration; $i++){ ?> <tr> <td class="main"> <?php if( isset($_GET['pID']) ){ if( $i == $iteration ){ echo "Add An " . TEXT_PRODUCTS_ATTRIBUTES_SET; }else{ echo "Using " . TEXT_PRODUCTS_ATTRIBUTES_SET; } } ?> </td> <td class="main"> <?php if(isset($_GET['pID']) ){ if( $i == $iteration ){ echo tep_draw_separator('pixel_trans.gif', '30', '1'). '<a href="' . tep_href_link( FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$_GET['pID']) . '" >'. tep_image_button('button_add_as.gif', '[Click To Add And A.S.]' ) .'</a>'; }else{ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; echo $attribute_sets_names_array[$arr_pas_id[$i]]; echo tep_draw_separator('pixel_trans.gif', '24', '15'); echo tep_draw_checkbox_field('remove_products_attributes_sets_id_'.$i); echo "<font size=-3>(Remove Set)</font>"; echo tep_draw_hidden_field('products_attributes_sets_id_'.$i, $arr_pas_id[$i]); } } ?> </td> </tr> <?php } ?> It looks like not all for or if statements are closed...or am i just looking at this wrong? thanks kenz Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2009 Share Posted July 20, 2009 hi, i just installed this contribution and hope to get it running. I think i found a error in the code but i could be wrong. this is what i got from the instructions for admin/categories.... for($i=0; $i <= $iteration; $i++){ ?> <tr> <td class="main"> <?php if( isset($_GET['pID']) ){ if( $i == $iteration ){ echo "Add An " . TEXT_PRODUCTS_ATTRIBUTES_SET; }else{ echo "Using " . TEXT_PRODUCTS_ATTRIBUTES_SET; } } ?> </td> <td class="main"> <?php if(isset($_GET['pID']) ){ if( $i == $iteration ){ echo tep_draw_separator('pixel_trans.gif', '30', '1'). '<a href="' . tep_href_link( FILENAME_PRODUCTS_ATTRIBUTES_SETS_EDIT, 'pID='.$_GET['pID']) . '" >'. tep_image_button('button_add_as.gif', '[Click To Add And A.S.]' ) .'</a>'; }else{ echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '; echo $attribute_sets_names_array[$arr_pas_id[$i]]; echo tep_draw_separator('pixel_trans.gif', '24', '15'); echo tep_draw_checkbox_field('remove_products_attributes_sets_id_'.$i); echo "<font size=-3>(Remove Set)</font>"; echo tep_draw_hidden_field('products_attributes_sets_id_'.$i, $arr_pas_id[$i]); } } ?> </td> </tr> <?php } ?> It looks like not all for or if statements are closed...or am i just looking at this wrong? thanks kenz I added a closed tag at the end of the last one and it works now. maybe this will help someone else out too. Quote Link to comment Share on other sites More sharing options...
jenmladucky Posted August 11, 2009 Share Posted August 11, 2009 I installed version: AttributeSetsPlus 1.3.2 on: osCommerce Online Merchant v2.2 RC1, PHP Version 5.2.6 I added 2 sets just fine. I open a product, click on the ADD A.S. button, I select the sets - but when I click "SAVE" I get this error: Fatal error: Call to undefined function jjg_db_attributesets() in /home/gordys/public_html/admin/products_attributes_sets_edit.php on line 25 Any ideas? Quote Link to comment Share on other sites More sharing options...
Lebasi Posted October 9, 2009 Share Posted October 9, 2009 Hi all. This a super contribution, thanks to all that developed it and also to those that helped giving ideas and suggestions. I was wondering if it posible to add the category_id when saving a new template. The purpose of adding the category_id would be that the next time a product is added, all attributes for that category would load. Quote Link to comment Share on other sites More sharing options...
Solan Posted October 25, 2009 Share Posted October 25, 2009 Thanks for a great contrib... :thumbsup: I am in need of applying quantity to my different attributes, so i have to ask how you guys solved that.. :) Quote Link to comment Share on other sites More sharing options...
acbatchelor Posted November 6, 2009 Share Posted November 6, 2009 can someone find a way to add attribute sets to multiple products at one time. maybe using check boxes to choose which products or at least to a whole category at one time. this could save me hours of work on my 2000 products. i would be extremely thankful. i bet others would too. Quote Link to comment Share on other sites More sharing options...
toasty Posted November 12, 2009 Author Share Posted November 12, 2009 can someone find a way to add attribute sets to multiple products at one time. maybe using check boxes to choose which products or at least to a whole category at one time. this could save me hours of work on my 2000 products. i would be extremely thankful. i bet others would too. Hi FOR THE ADVENTUROUS IN NEED OF AN EASY STOCK LOAD SOLUTION: If you have some understanding of php you may be able to do this yourself. If not this reminder (I have posted this previously - over a year ago) may help. On this link you will find the rudimentary code I used to achieve what you are asking for. It is a bit of a hack but it worked extremely well for me. I effectively had a 1-Click stock loading system from my PC and never had one problem with it. It holds the advantage that if you need to do any updates, any system wide changes or if any glitches occur you can reload the system in one go and always be sure it is all correct. i.e. all the combined advantages of EP and ASP in one. Personally I think controlling 200o products from the Osc admin acapability must be a nightmare. Essentially this code uses the Easy Populate contribution (an old version) and imports a spreadsheet of your entire stock with attributes and sets. There is also some advice on how to implement a rudimentary filter if you wanted to import only a category (for example). The spreadsheet to use can be found by installing the EP contrib and exporting your current database of products.. The logic is not that difficult to comprehend if you have idea about this sort of thing. Here is the link: asp screenshots + Increase Size and EP Extensions (look for the easy_populate_Xtra.txt link at the bottom, but do read all the notes above.) cheers Chris (Author of re-engineered ASP many moons ago!) Quote Link to comment Share on other sites More sharing options...
maxemus Posted December 13, 2009 Share Posted December 13, 2009 Hello I have been using this contrib since early this year it works great. I would like to use the sort order function. Mine don't seem to work. It is going by price then alphabetical. Thanks for making it it has saved Lots of time. torgrima 1 Quote Link to comment Share on other sites More sharing options...
torgrima Posted December 15, 2009 Share Posted December 15, 2009 Dear all, I have been looking for a solution like Attribute Sets Plus where I can apply multiple attributes from one place. But I am also looking for a solution similar to osCommerce version 3. In version 3 it is possible to add multiple attributes to one product. If you sell products like a Sweater you will have different types of attributes like: A sweater consists of a specific style, style name and a description. The specific style can have multiple attributes like colour and size. For every colour and size combination you will have a specific price and item number, picture and a stock volume for that specific style, colour and size. Is there a similar contribution for version 2.x of osCommerce? Quote Link to comment Share on other sites More sharing options...
maxemus Posted January 4, 2010 Share Posted January 4, 2010 Hello I have been using this contrib since early this year it works great. I would like to use the sort order function. Mine don't seem to work. It is going by price then alphabetical. Thanks for making it it has saved Lots of time. Ok here it is. I don't know how this will react if you don't have options as images installed. you just might have to take out pov.products_options_values_thumbnail, but not sure Have any of you wanted to have the sort order actually work. well here is the fix. one stipulation this script is for options as images along with attribute sets contrib installed together. so if you have both installed this should work for you. Make sure you back up so you can go back if this don't work for you. Replace in catalog/options_images.php -----find------ $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, 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 asc"); -----Replace with------ $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix, pase.sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase 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 . "' and pase.options_values_id = pa.options_values_id order by pase.sort_order asc"); Quote Link to comment Share on other sites More sharing options...
maxemus Posted January 4, 2010 Share Posted January 4, 2010 Ok here it is. I don't know how this will react if you don't have options as images installed. you just might have to take out pov.products_options_values_thumbnail, but not sure Have any of you wanted to have the sort order actually work. well here is the fix. one stipulation this script is for options as images along with attribute sets contrib installed together. so if you have both installed this should work for you. Make sure you back up so you can go back if this don't work for you. Replace in catalog/options_images.php -----find------ $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, 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 asc"); -----Replace with------ $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pov.products_options_values_thumbnail, pa.options_values_price, pa.price_prefix, pase.sort_order from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES_SETS_ELEMENTS . " pase 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 . "' and pase.options_values_id = pa.options_values_id order by pase.sort_order asc"); Oh yeah forgot to say this will sort your Attributes as you mark them in the Attribute Sets screen.. wow this hurt my head making this up Quote Link to comment Share on other sites More sharing options...
maxemus Posted January 4, 2010 Share Posted January 4, 2010 (edited) Oh yeah forgot to say this will sort your Attributes as you mark them in the Attribute Sets screen.. wow this hurt my head making this up OOps kinda didn't get enough sleep. Most defiantly you need Options as Images contrib for this to work. Edited January 4, 2010 by maxemus Quote Link to comment Share on other sites More sharing options...
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.