/** * {@inheritdoc} */ public function getVariatedProperties(ProductInterface $product, array $fields = array()) { if (null === $product->getParent()) { // This is not a variation, hence no properties variated return array(); } $fields = $this->getMergedFields($fields); $accessor = PropertyAccess::createPropertyAccessor(); $properties = array(); foreach ($fields as $field) { $properties[$field] = $accessor->getValue($product, $field); } return $properties; }