This is a simple application that creates an attributes file. It works as follows.
File 1 is the source file and contains 3 columns for sku, color and size, this is a comma seperated file
File 2 is known as the attributes file and contains many columns (both attached) - this is a tab delimited file
Both files will be provided, file 1 is called [login to view URL] (eg. [login to view URL]) and file 2 [login to view URL] ([login to view URL])
The program is going to modify file 2 - the modification rule is as follows.
1. find the matching sku in file 1 and 2 (column2 in file 2) - this gives a row in file 2
2. first look in file 1 at the color line (column 2) and parse it out (comma separated)
3. then take one color at a time and look for the column v_attribute_values_name which has that color, exact match
4. now you should have one cell at the intersection of the sku and the color
5. in the cell just to the left of v_attribute_values_name which is v_attribute_values_price place the value 0 (zero)
6. now we repeat steps 2-6 but useing the size column in file 1 (which is column 3)
So new resulting file 2 will have zero's placed in columns which have a corresponding color and size.
The reason for this project is the file 2 get to large for spreadsheets, so I need a nice elegant script that can handle it. The script can run from the command line and give it two parameters for the two file names.