• Resolved apg1912

    (@apg1912)


    I have been using the CSV importer to insert some sample products. I have imported product variations but would like to set a default value as well. This does not appear as a field in the importer. However, a search found this:

    https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Import-Schema

    that states there is a field for it. I tried adding it to the CSV file, but it was just ignored. Has this been removed from rhe importer meaning default attribute values have to be entered manually once all the products are imported?

    I’d also like to control the order in which the attributes are displayed on the page, but this always seems to be alphabetical. Can this be set in the importer as well. I’ve tried swapping ‘Attribute 1’ and ‘Attribute 2’ but it makes no difference.

    Any advice most welcome, thanks.

    • This topic was modified 5 years, 10 months ago by apg1912.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    @apg1912 Attributes can still be set for products by CSV. I would suggest having a look at the Sample Product CSV that comes with WooCommerce so that you can see how this is done. You can find that sample-product.csv file under wp-content/plugins/woocommerce/sample-data/

    Thread Starter apg1912

    (@apg1912)

    Phil, that is just what I did and based my sample data on. However, there is no field for ‘Attribute 1 default’ which is what leads me to believe it has been removed for whatever reason, which would be a shame

    • This reply was modified 5 years, 10 months ago by apg1912.
    Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    These columns have not been removed. If you are looking at the sample_products.csv file that I mentioned above, you will see an Attribute 1 and Attribute 2 column as shown here:

    Image link: https://cld.wthms.co/mKU6Lq

    As I mentioned above you can find this file in the ./wp-content/plugins/woocommerce/sample-data/ folder on your server. Provided that you have not altered that file, it will have these columns. If you have altered the file, you can re-download the WooCommerce plugin and extract it a fresh copy of the file from there. I’ve also hosted a copy of the file at the following link for the next few days:
    https://cld.wthms.co/lIPkRV

    Thread Starter apg1912

    (@apg1912)

    Exactly my point. You’ll see there is no ‘Attribute 1 default’ which is the one I’m asking about. Without it, you have to manually go to each added product to set it. A lot of time if you have many products.

    For example, you set Attribute 1 (color) values to ‘Red, Green, Blue’, but want it to default to displaying ‘Blue’ as opposed to ‘Select an option’. This can be set manually, but it would be so much nicer if it could be set during the import process which that page I referenced in the first post claimed that you could.

    • This reply was modified 5 years, 10 months ago by apg1912.
    • This reply was modified 5 years, 10 months ago by apg1912.
    • This reply was modified 5 years, 10 months ago by apg1912.
    Phil

    (@fullysupportedphil)

    Automattic Happiness Engineer

    @apg1912 thank you for that clarification and sorry for misunderstanding your original question.

    Setting a default variation for your variable products isn’t included in the default sample csv file I mentioned above, however it is still a valid setting.

    These column headings would be:

    Attribute 1 default
    Attribute 2 default
    Attribute 3 default

    and so on.

    https://cld.wthms.co/rLdnH3

    Keep in mind that the Attributes will already need to be declared properly using the columns I referenced in my earlier replies. You will also need to make sure your input for these fields exactly matches what you’ve specified for that Attribute.

    To test this, you can set the default variation for a variable product and then export your products. You’ll see these columns appear in your CSV. On the import screen you’ll map these to the Default Attribute field.

    Thread Starter apg1912

    (@apg1912)

    Phil,

    Many thanks for the reply and explanation. I did try putting that column into the csv file but it didn’t seem to work in that the default values were not set when I looked at the imported data. However, I may have made a mistake of some sort and so I shall experiment further with it.

    thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Importing Attribute Default Values’ is closed to new replies.