Author Topic: Parent-childs empty customfield list disadvantage  (Read 712 times)


  • Beginner
  • *
  • Posts: 5
Parent-childs empty customfield list disadvantage
« on: November 15, 2013, 11:08:46 am »
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:
Code: [Select]
$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...


  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10040
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Parent-childs empty customfield list disadvantage
« Reply #1 on: November 16, 2013, 11:18:28 am »
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)
I should fix your bug, please support the VirtueMart project and become a member
Extensions approved by the core team:


  • Beginner
  • *
  • Posts: 5
Re: Parent-childs empty customfield list disadvantage
« Reply #2 on: November 18, 2013, 08:58:42 am »
Thank you. Waiting for release...