cancel
Showing results for 
Search instead for 
Did you mean: 

auto populate “configurable_variations” column for csv import into magento 2.3.4

auto populate “configurable_variations” column for csv import into magento 2.3.4

I am using openoffice calc to generate import files for magento 2 csv import based on previously generated files with a different structure.

Has anyone found a formula to auto-populate the "configurable_variations" column for csv import into magento 2? I would set up the file where the simple associated products would either precede or follow the configurable. The aggregate data from the simple cells will be placed in the "configurable_variations" column then stop aggregating when a row shows type as "configurable"

Below is a simple version of how it should look.

sku size type configurable_variations
bc5  L   simp
abc      conf bc5-L
bc1  S   simp
bc2  M   simp
efg      conf bc1-S|bc2-M</pre>

I do understand how to do the concatenated part. The part I can't figure out is how to get the formula to stop concatenating when it reaches the topmost "type" column "conf" above the "'sim" s, then restart the aggregate/concatenations automatically for the next conf type.

If I input the cells manually the formula would be :

=IF(C5="conf";CONCATENATE(A4;"-";B4;"|";A3;"-";B3))

Ideally, I would like it to auto-generate the a4, b4, a3 & b3 possibly using a helper column that has some type of "if-then" formula

If you have any other suggestion on how to do this it would be much appreciated

Thank you very much for your help