• Resolved chillybang

    (@chillybang)


    I have two attributes with own terms, like

    • color: red, green
    • size: small, big

    All products in category 1 should have a combination of attribute terms like color: red, size: big,

    All products in category 2 should have a combination of attribute terms like color: green, size: small

    My (affiliate) products are automatically, with cronjob, imported into their categories, they have other attributes, given by their merchants, which are imported too.

    How to apply to products, imported into category 1 and 2, their corresponding attribute values, so

    • all products imported into category 1 get applied color: red, size: big and
    • all products imported into category 2 get applied color: green, size: small ?
Viewing 1 replies (of 1 total)
  • Hi @chillybang

    Thanks for reaching out!

    I understand that you have two attributes with their own terms and you would like to apply specific attribute values to products imported into categories 1 and 2.

    To achieve this, you’ll need to modify the code in your cron job script that imports the products. You can add a conditional statement to check the category of the imported product and then apply the corresponding attribute values.

    Unfortunately, custom coding is not something we can assist with directly. However, I’ll keep this thread open for a bit to see if anyone from the community can lend a hand.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘How to apply a set of attribute terms to all products in a category’ is closed to new replies.