protected function updateVariants($item, $activeLanguage, $allIds, $baseAttributes = false)
    {
        foreach ($this->getAttributes() as $strAttributeId => $objAttribute) {
            // Skip unset attributes.
            if (!$item->isAttributeSet($objAttribute->getColName())) {
                continue;
            }

            if (!$baseAttributes && $item->isVariant() && !($objAttribute->get('isvariant'))) {
                // Skip base attribute.
                continue;
            }

            if ($item->isVariantBase() && !($objAttribute->get('isvariant'))) {
                // We have to override in variants.
                $arrIds = $allIds;
            } else {
                $arrIds = array($item->get('id'));
            }
            $this->saveAttribute($objAttribute, $arrIds, $item->get($strAttributeId), $activeLanguage);
        }
    }