• Resolved userweb

    (@userweb)


    Hi everyone, I’m trying to import a csv containing a list of products with links to images, etc. into Woocomemrce, but the import is not successful and in the logs I see the “Product type invalid” error, how to solve it this error? Thank you.

Viewing 15 replies - 1 through 15 (of 28 total)
  • Can you share the CSV file – or some of the products in it? Or a screenshot of it?

    Thread Starter userweb

    (@userweb)

    Hi, unfortunately it is a csv provided by a platform, so I don’t think I can publicly share something that is not mine, the platform provides it to me as it is used to integrate the platform’s products with my site, we don’t have another way to solve this problem? Thanks for the help.

    Without seeing it no-one will be able to tell you what the issue is.

    I would suggest exporting some products from WooCommerce and comparing that with the provided CSV to see if you can spot any differences.

    ‘Product type invalid’ would suggest that the ‘Type’ column is incorrect – should be simple, variable, variation or virtual: https://woocommerce.com/document/product-csv-importer-exporter/#product-csv-import-schema

    Thread Starter userweb

    (@userweb)

    I don’t have any products in Woocommerce, the products are in the csv to be imported, could it be fine if I create a product as a test and then export it?

    So should I change the “Product type” field in the csv to import?

    Yes, that would work. There are also sample CSV files here: https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce/sample-data

    It needs to be set for each product.

    Thread Starter userweb

    (@userweb)

    Thank you! I managed to import some products, in the “Product type” column I replaced the value that was there with “simple” and some products were imported, now I try to do the same thing with all the products!
    The problem, however, is that I see that despite having set to import the products in separate categories, they were all imported in “uncategorized”

    Plugin Support Shameem R. a11n

    (@shameemreza)

    HI @userweb

    I managed to import some products, in the “Product type” column I replaced the value that was there with “simple” and some products were imported, now I try to do the same thing with all the products!

    That’s great to hear! Thanks for letting us know.

    The problem, however, is that I see that despite having set to import the products in separate categories, they were all imported in “uncategorized”

    It’s possible that the “Category” column in your CSV file might not match exactly with the categories on your WooCommerce site. Please ensure that the category names in the CSV file are exactly the same as the ones on your site. If the category doesn’t exist yet on your site, you should create it before running the import.

    I hope this helps! Please let us know how it goes or if you need further assistance.

    Thread Starter userweb

    (@userweb)

    Hi, thanks for the help! I created the categories corresponding to the csv file in Woocommerce, but when I import the csv the products are not assigned to the corresponding categories, perhaps, I ask you for confirmation, Wordfence asks for only one column for the categories, while in the csv there are several columns, one for each category, if so I think I should “merge” the rows and columns of the categories, in practice now there are 8/10 different categories in the csv and then each row reports “yes” to indicate that that product belongs to that category, there Is there any way to merge the categories into one category? But how do you assign the corresponding “yes” value? Or is there an easier way or automatic tools that do this?

    seank123

    (@seank123)

    You need to look at the link I shared above: https://woocommerce.com/document/product-csv-importer-exporter/#product-csv-import-schema – it tells you the correct format for the CSV file columns.

    Categories is a single column but if you want to add the product to multiple categories you need to separate them by commas: Category 1, Category 2 etc

    If there are sub-categories then you need to have them like this: Category 1 > Sub Category 3

    Thread Starter userweb

    (@userweb)

    The problem is another, the categories are approximately 8/10, but they are in different columns, and then every single row shows the word “yes” to indicate that a product belongs to that category (column) the problem is to combine these data, I not only have to merge the categories into a single column but I have to make sure that all the “yes” match, I don’t know how to explain myself better, from what it seems to me I can only merge the categories into a single column but I don’t understand how to then assign the products using the word “yes” given that the category column will only be one.

    Here is an example image, so I can explain myself better

    https://ibb.co/YkBp5L7

    • This reply was modified 6 months ago by userweb.
    • This reply was modified 6 months ago by userweb.
    • This reply was modified 6 months ago by userweb.

    Hey, @userweb! Thanks for the screenshot.

    The table you shared on the screenshot does not match WooCommerce’s CSV layout.

    As @seank123 mentioned, you need to have only one column for category and name each category the product is on.

    Like this:

    As mentioned, this guide has the instruction to make the CSV file compatible.

    You can also check some sample tabled here.

    I hope this was clarifying. Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    Thread Starter userweb

    (@userweb)

    Hi, yes I understand, so is it impossible to do it automatically? Do I intend to transform the csv into a csv with correct layout? Doing everything manually for thousands of products is impossible!

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @userweb

    WooCommerce doesn’t provide a built-in tool to transform your CSV layout automatically. You might need to consider using a third-party CSV editing tool or a spreadsheet app like Microsoft Excel or Google Sheets. These apps often have features that can help you automate the process of combining your multiple columns into one.

    You can use functions like CONCATENATE in Excel or Google Sheets to merge your category columns. For the “yes” values, you might need to create a formula that checks if the value is “yes”, and if so, returns the name of the category.

    Remember to save the file as a CSV once you’re done editing.

    I hope this helps! If you have any other questions, feel free to ask.

    Thread Starter userweb

    (@userweb)

    Hi, I tried to concatenate some columns, I used “&” and I see that the columns all appear together in a single column, but when I import the csv, I see that the products have not been assigned to the respective categories, evidently the single “yes” which marks the category of a product, with the category itself, in practice in the “categories” column I have all the categories separated by a space, but there is no trace of the “yes” which indicates that a product belongs to a certain category, I don’t know much about Excel, but it seems that this thing cannot be done automatically.

    Hey, @userweb!

    in practice in the “categories” column I have all the categories separated by a space, but there is no trace of the “yes” which indicates that a product belongs to a certain category,

    Please note that de categories need to be separated by a comma, not a space, to be read as different categories, as explained in our guide.

    On the Woo layout, there’s no need to have a “yes” on the category, because, as mentioned, it is just one column for all categories and what assigns the product to a category is adding the category name to the category column of that product.

    Can you share the CSV file you have now so we can take a look or a screenshot of it?

    I don’t know much about Excel, but it seems that this thing cannot be done automatically.

    Unfortunately, we are not able to provide support for Excel beyond the tips we provided before. But please feel free to reach out to their support to find more about the possibility of automatically making those changes.

    Have a wonderful day!

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