• After much frustration and iterative testing, I’ve discovered a problem with importing variable attributes with the default CSV import tool.

    The challenge was to import variable products, the simple case being product variations on colour. The idea being that the customer sees Colour Variation swatches (provided by a 3rd party plugin) that rely on the variable, global attribute of Colour.

    My basic early import tests used a custom spreadsheet, in which I named the column containing the Colour attribute label as literally, “Colour Attribute Label” (ie., not “Attribute 1 name”, as you would see with the output from a CSV export). Similarly, the other attribute property columns were named in a similar fashion (eg., Colour Attribute Values, Colour attribute visible, etc.).

    Intuitively, I wouldn’t think this should matter. Naming the column headings this way allows me to distinguish from other attributes (in particular, Size (ie., small, medium, large, etc.)). Not a problem, in principle, because when I import the CSV file, I can just map the spreadsheet column Colour Attribute Label to the WooCommerce field Attributes:Attribute name, right?

    Wrong.
    After much testing, the mapping of this spreadsheet column name (and others, see below) appears to fail in the import process, and the attributes are not visible in the product details backend.
    I have made multiple identical spreadsheets with the only difference being the name in this column heading, and what works vs. what doesn’t is truly inexplicable.

    Here are my findings:

    Successful variation imports when the CSV column Attribute 1 Name is:
    * Attribute 1 Name
    * A1N
    * Attrib 1 Name

    Unsuccessful variation imports when the CSV column Attribute 1 Name is:
    * Colour Attribute Label
    * AttributeColour
    * Attribute

    Again: The CSV files I have been testing with are identical, except for the column name as described here. I cannot make any sense of why the import mapping succeeds or fails as it does in the cases above. But the issue is consistent and reproducible in my hands.

    Is this a known problem? Something to do with the parsing method for mapping the CSV columns to the relevant Woo fields, perhaps?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Moses M. (woo-hc)

    (@mosesmedh)

    Hi @paul-m-1,

    I can imagine how frustrating this situation must be for you, and I understand that it can feel overwhelming at times.

    To clarify, when importing products using CSV files, there is a specific template that needs to be followed, especially for variable products. For example, column names should be something like attribute:Color, attribute_data:Color, attribute:Size, attribute_data:Size etc.

    The first column refers to the attribute name, while the second column with “_data” contains the values associated with that attribute for each product.

    You can download the template and follow the guide here: https://woocommerce.com/document/product-csv-import-suite/product-csv-import-suite-importing-product-variations/ to learn more.

    If you have any further questions, don’t hesitate to reach out.

    Thread Starter Paul M.

    (@paul-m-1)

    Thanks for the reply, Moses.
    The link and explanation you’ve provided appears to apply to the optional CSV Import Suite plugin.
    My issue is with the default, in-built CSV product import feature.
    There is no documentation I can find that indicates manual field mapping will only work with certain combinations of column heading names.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Paul M.,

    Thank you for the clarification.

    I have read your initial message and I understand the issue you are facing.
    I would suggest you create a variable product via WP Admin with all the attributes you want.
    Then export that into a CSV file and use it as a template for adding more products directly into the CSV.

    Please let me know if this method works for you or not.
    Here is the documentation for Product CSV Importer and Exporter.

    Looking forward to your response. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.