News:

Looking for documentation? Take a look on our wiki

Main Menu

Bug with custom fields override ?

Started by aftertaf, November 12, 2017, 21:09:32 PM

Previous topic - Next topic

aftertaf

Hi,

from https://docs.virtuemart.net/manual/general-concepts/186-derived-products-product-pattern-child-products.html

I did :
QuotePATTERN

This can be used for product patterns. Just create an unpublished product, enter your default values and use the command "create child". Then just work with the children.

Before you start to enter your products, think about your product types. Very often vendors directly sell a bunch of similar products or it is even their speciality to sell only one kind of products. Similar products often need the same customfields. Sometimes you entered already 100s of products of one type and then you notice that you would like to add a hint to each product.
When you organized your products as children, then you can just edit the parent product to change all derived products.
to make parent/generic products.
I set them up in categories, like in 1st screenshot (notice the categories and the product).
Each product is itself a child of an common ancestor 'Tissu' product that has all the custom fields added to it, 2 custom fields set as an invariable string.
This effectively both provides and have default/override values in each generic product.
Seen Screenshot 2

However, when i change a child product from one parent to another, it doesn't lose the custom fields that is inherited from the old 'parent' product, causing either duplicates of, or old + new values,  while others seem to not have 1/2 of them applied (due to past manipulations and failed cleanups probably..).
you can see this now on our Liberty of London collection (Laize 136, 100% cotton, etc..)
Am I managing these things wrong? Shouldn't the overridden custom fields be deleted when they no longer apply?
screenshots  3 + 4
on the demo store, imagine setting 'Cotton' or Flax as a default custom field 'string, admin list' to the Root Pattern, and you have how i've built my product structure..

screenshots here -> http://www.socouture.fr/custom_fields_vm


I also am curious on how category inheritance works, how it's meant to..
If a child product has no categories, it inherits from parent?
If it has, does it still inherit those from parents at all ?

aftertaf

cant add screenshots: -> An Error Has Occurred!
The attachments upload directory is not writable. Your attachment or avatar cannot be saved. :(

aftertaf

hi all,
i don't usually do this, but i need help figuring out whether i made a config mistake or if this is a bug.
Can someone confirm either way?
'bump'

Milbo

Quote from: aftertaf on November 12, 2017, 21:09:32 PM
However, when i change a child product from one parent to another, it doesn't lose the custom fields that is inherited from the old 'parent' product, causing either duplicates of, or old + new values,  while others seem to not have 1/2 of them applied (due to past manipulations and failed cleanups probably..).
When you disable or override a customfield it is stored again and related to the product. So, when you do not want that the old customfields are kept, just delete them. When you delete all customfields of a child, yo will see the parent ones again.

Quote from: aftertaf on November 12, 2017, 21:09:32 PM
If a child product has no categories, it inherits from parent?
Yes.

Quote from: aftertaf on November 12, 2017, 21:09:32 PM
If it has, does it still inherit those from parents at all ?
No, overwrite is overwrite.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/