News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Parent-childs empty customfield list disadvantage

Started by vasena, November 15, 2013, 11:08:46 AM

Previous topic - Next topic

vasena

Today I have found new disadvantage due using parent-child products with custom fields. I have added ONE plugin custom field to parent. But all my childs gets it too. When I tried to delete this custom field from my child product (using checkbox overwrite parent params) I have no effect untill I add another custom field to child product. This is very big disadvantage. Then I tried to find the source of this bug and found this:
$product->customfields = $customfieldModel->getproductCustomslist ($this->_id);
if (empty($product->customfields) and !empty($product->product_parent_id)) {
$product->customfields = $customfieldModel->getproductCustomslist ($product->product_parent_id, $this->_id);
$product->customfields_fromParent = TRUE;
}

And this means, if i have no custom fields for child, it will always use parent custom fields.

So the main Idea of this post to add functionality to VM to able remove parent custom field from list of childs OR add param to custom field to check if should it be inherited for child products or not
PS I think variant 2 is easier and better...

Milbo

There is a checkbox, you can override the customs of the parent. in the next version vm2.2 you can override or disable each customfield of the parent in the child.
This is not a bug and the "fix" means more than 1000 lines changed code, (done already in the svn, vm2.1)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

vasena