Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter simlock

    (@simlock)

    So, finally, my request works if it is written this way…

    WooCommerce.get('products', { 'sku': 'MK_MB' })

    Thread Starter simlock

    (@simlock)

    I’m doing a Python script that’s inspired by the WooCommerce import tool and so I’m trying to figure out the point of this step.

    I’m not from the Web/Commerce world at all and so I’m trying to figure out how to adapt to a customer who comes in with their custom CSV file. I tend to believe that it could be
    possible that the column names are different from what WooCommerce expects and so how to adapt.
    I tought it was the purpose of the “Map to field” step

    Thank you for your answers !

    • This reply was modified 4 years, 8 months ago by simlock.
    Thread Starter simlock

    (@simlock)

    Ok thanks for your feedback.

    Let’s take as an example a CSV file where I have the fields :
    “Attribute 1 name”, “Attribute 1 value(s)”, “Attribute 2 name”, “Attribute 2 value(s)”

    Here are two cases that I tested :

    Case 1: I import my file as it is. Everything works. It recognizes well that there are two attributes to import.

    Case 2: In the CSV file, I change the name of the columns “Attribute X name” and “Attribute X value(s)” to a random name. WooCommerce does not recognize them anymore and sets them to “Do not import”.
    I force the “Map to field” to “Attribute Name” and “Attribute value(s)” and import.
    WooCommerce failed to import my attributes.

    As you said, WooCommerce uses a “Product CSV Import Schema” so in the end, I don’t understand why WooCommerce is trying to propose the intermediate step of “Map to field” when it will internally try to read the column names.

    Thanks again !

    Thread Starter simlock

    (@simlock)

    Well for the commas, a field that contains several data is contained in quotation marks so I understand why it is not disturbed.

    If you can help me on the other part of my question, I am still confused

Viewing 4 replies - 1 through 4 (of 4 total)