Answer the question
In order to leave comments, you need to log in
How to make different attributes for different categories in woocommerce?
There are about 10 different categories each with about 10 different attributes, i.e. there are about 100 attributes in total. How can I make it so that when filling with goods in the admin panel, when choosing a specific category of goods, attributes are shown only for it, and not all 100 available?
Answer the question
In order to leave comments, you need to log in
Victor, the Advanced Custom Field plugin is the best to deal with this, it allows you to add any number of fields for any data types in WordPress. These are not native Woocommerce attributes, so the product page template will need to be tweaked a bit.
The algorithm is as follows:
1) Install Advanced Custom Fields (the free version of the plugin will be enough for this task)
2) Create a new group of fields by the number of product categories
3) Set fields for all attributes for each group of fields
4) In the display parameters of each group, set the record type = Woocommerce Product and the corresponding product category.
Thus, when assigning a category, the necessary attributes will be displayed automatically on the product editing page.
Как вывести в карточку товара я расскажу отдельно, если подход с ACF вас устроит
Имеется около 10 разных категорий в каждой около 10 разных атрибутов
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question