1

I am in the process of creating an e-commerce site with drupal commerce 2. This site is dedicated to selling clothes for men, women and children. I created a type of clothing product I called Clothes. I have implemented the management of color and size attributes, but my problem is knowing how to manage clothes for men and women with the same type of clothing content. Should we create a type of content clothing for men, a type of clothing for women knowing that men do not wear specific dresses for women?

Shoud I create a product type for woman called clothes_for_woman and clothes_for_man, or use the same content type for all? How do I manage it?

Note: This is the idea I thought of: add an additional field to specify whether it is clothing for women, men or children. A civility or gender field with terms like Male, Female, Boy, Girl or Baby isn't it? When entering a product, make this field mandatory. –

3
  • I guess the common case is to only create new product type if the fields on it differ (if their information structure is different). You can distinguish various product categories with Taxonomy terms and create filters and subpages according to those terms.
    – prkos
    Jun 4 '21 at 14:25
  • This is the idea I thought of: add an additional field to specify whether it is clothing for women, men or children. A civility or gender field with terms like Male, Female, Boy, Girl or Baby isn't it? When entering a product, make this field mandatory.
    – virk
    Jun 4 '21 at 14:41
  • I'm not sure how anyone could answer this question effectively, it seems opinion based.
    – Kevin
    Jun 4 '21 at 15:08
1

The gender field you mentioned can perfectly be implemented as a product attribute, so just an appropriate field for product type “clothes”. I.e. for that you do not need to create multiple product types.

1
  • 1
    yes, so I will use the taxonomy with the associated terms and that will do. Thank you to all of you.
    – virk
    Jun 4 '21 at 19:26
0

I would not recommend this as a product attribute since clothes gender types (male/female/kids(girl/boy)) are not "variations", and should not be stored as such, and we know attributes are for creating variations of the same product entity. This might also complicate and reduce the flexibility when creating views for categorising based on gender and creating pages for them. I agree with another comment made that this is very subjective and could be done in many ways, but I prefer to solve this with a taxonomy field "Gender" with the terms, Male, Female, Kids (Boy, Girl). Make this field mandatory when adding a product of type "Clothes". This method will simplify the creation of search/filter pages of views categories as you want to distinguish clothes based on gender etc. And would also simplify creating facets on search pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.