Ejemplo n.º 1
0
 /**
  * Prepare attributes
  *
  * @param ConfigurableAttributesData $configurableAttributesData
  * @return array
  */
 protected function prepareAttributes(ConfigurableAttributesData $configurableAttributesData)
 {
     $ids = [];
     foreach ($configurableAttributesData->getAttributes() as $attribute) {
         /** @var CatalogProductAttribute $attribute */
         $ids[] = $attribute->getAttributeId();
     }
     return $ids;
 }
Ejemplo n.º 2
0
 /**
  * Prepare associated product ids
  *
  * @param ConfigurableAttributesData $configurableAttributesData
  * @return array
  */
 protected function prepareAssociatedProductIds(ConfigurableAttributesData $configurableAttributesData)
 {
     $productIds = [];
     foreach ($configurableAttributesData->getProducts() as $product) {
         $productIds[] = $product->getId();
     }
     return $productIds;
 }