Categories transfer

Why doesn’t the category/tag combination transfer from the parent to the variants upon variant creation?

Is there an option to make this happen automatically?

Hello - this costs nothing to say Hello

I dont really understand what you want to do
But give a look at Setup - Default values/filters/sorting

Good continuation

1 Like

Indeed Hello,

I am sorry but now it is my turn to not understand your answer! Setup - Default values has got nothing to do with what I am saying.

I am on Dolibarr 15.0.1 so I do not know if this is going to happen in future versions but do this to witness what I am trying to say:

  1. Create a dummy product, don’t worry about the rest of the fields just create a reference you can delete later.
  2. Give it a couple of Category/Tags
  3. Create a Variant based on this product. You should have at least one variant attribute defined and of course you will need the Product Variant Module activated. A new product is created based on the 1st product you have created.
  4. Check that the newly created variant has not inherited the parent’s categories/tags.

Is this understandable now?

Thank you
PR

Hi,

If you consider the categories/products/variants hierarchy as a kind of filter it should make more sense. If categories would be inherited automatically the base products and their variants would end up at the same level which might be overwhelming depending on the kind of products in stock.

Ultimately it most likely was a choice made for a particular kind of use case. Had a different one been anticipated, this choice might have been made differently. But in the end neither one is obviously right or wrong. Maybe it would be sensible to have a switch to choose the default behaviour, so if it really bugs you, feel free to submit an issue (or start coding yourself…)

I agree partially. Your reasoning is sound IF you’re limited in processing power and/or space (but might go on a limb here and say that you can take care of overwhelming by using an adequate categorizing/tagging policy.
On the other hand what if one uses the variants as the sellable products and only uses the parent product as a container? In that case this situation dos not make sense. The inheritance does.

I agree 1000% here. The coding part may get a bit complicated for me though. I can go as far as changing the pdf for printing and hunt down a few bugs but venturing into new modules and the like is not my comfort zone. Given a certain effort I’d do it.
Thinking of it I might do a special configuration string like VARIANTS_INHERIT_TAGS and check where in the code this darn duplication is done!
Stay well!
** PR disappears into the phpcave and the days change place with the nights vertiginously **