private function getInheritedConfig(ARSet $set) { if ($set->size()) { // category level configuration? $prod = $set->shift(); // fill missing product level settings with category level settings foreach ($set as $cat) { foreach (array('theme', 'isAllVariations', 'isVariationImages', 'listStyle') as $field) { if (!$prod->{$field}->get()) { $prod->{$field}->set($cat->{$field}->get()); } } } return $prod; } }