I'd been working on getting easypopulate to handle product attribs, and managed to achieve something functional. I haven't tested the code extensively yet, but it should theoretically be capable of handling any number of product options, option values, and languages.
This is still beta code, and I haven't put it up as a contribution yet. If anyone is interested in giving this a try (at their own risk!), you can download my easypopulate.php file, and a sample tab-limited file (from an 'out-of-the-box' osc product list), here.
Please try this on a test osc setup, before you even think about using it in your "live" store. And in any case, BACKUP your database.
This code was developed and tested with EP version '2.62-MS2' on oscommerce 2.2-MS2.
Here's an overview of the system. Hope its not confusing as it looks, and makes some sense .
1. v_attribute_options_id_1 v_attribute_options_name_1_1 v_attribute_options_name_1_2 . . . v_attribute_values_id_1_1 v_attribute_values_price_1_1 v_attribute_values_name_1_1_1 v_attribute_values_name_1_1_2 . . . v_attribute_values_id_1_2 v_attribute_values_price_1_2 v_attribute_values_name_1_2_1 v_attribute_values_name_1_2_2 . . . . . . 2. v_attribute_options_id_2 v_attribute_options_name_2_1 v_attribute_options_name_2_2 . . . v_attribute_values_id_2_1 v_attribute_values_price_2_1 v_attribute_values_name_2_1_1 v_attribute_values_name_2_1_2 . . . v_attribute_values_id_2_2 v_attribute_values_price_2_2 v_attribute_values_name_2_2_1 v_attribute_values_name_2_2_2 . . . . . . . . . where, 1. v_attribute_options_id_x x = a count, beginning from 1, and incrementing by 1 This column contains the options ID (each option ID must be unique). 2. v_attribute_options_name_x_y x = count (same as above) y = count and language id . This means, language id must correspond to the count, begin on 1, and increment by 1. For example, correct language id structures include, English (ID = 1), German (ID = 2) and Spanish (ID = 3) English (ID = 1) and French (ID = 2) and the system most likely won't work with the following language id structures, English (ID = 2) and German (ID = 3) French (ID = 2) So basically, if you're using 3 languages (say, English, German and French) make sure their language ids begin with 1, and increment by 1, without jumping values. This column contains the option name (in each language). 3. v_attribute_values_id_x_y x = corresponding option count y = option values count, beginning from 1, and incrementing by 1 This column contains the option value ID (each option value ID must be unique). 4. v_attribute_values_price_x_y x = corresponding option count y = option values count This column contains the "signed" price. If non-empty, attribute value is added to the product. 5. v_attribute_values_name_x_y_z x = corresponding option count y = corresponding option values count z = count and language id . This means, language id must correspond to the count, begin on 1, and increment by 1 (please see description for v_attribute_options_name_x_y).
HOW IT WORKS
Basically, if the field "v_attribute_values_price_x_y" is not empty for a product row, the corresponding attribute is added to that product. Example non-empty values include,
0 (zero) = just the attribute is added (there's no special price)
11.50 = attribute is added, with price value 11.50, and price prefix '+'
-9.30 = attribute is added, with price value 9.30, and price prefix '-'
You'll also be able to add product options/option values, modify option/option value names.
Edited by VJ, 07 November 2003 - 09:24 AM.