$product->
setMinStock((int) $data['__variant_stockmin'
]);
$product->
setWeight((float) $data['__variant_weight'
]);
$product->
setWidth((float) $data['__variant_width'
]);
$customerGroups =
explode('|',
$data['__product_blocked_customer_groups'
] ?? ''
);
$customerGroups =
array_filter($customerGroups);
$product->
setBlockedCustomerGroupIds($customerGroups);
$product->
setHasAvailableVariant($data['__product_has_available_variants'
] > 0
);
$product->
setFallbackPriceCount($data['__product_fallback_price_count'
]);
if (\
array_key_exists('__product_custom_price_count',
$data)) { $product->
setCustomerPriceCount($data['__product_custom_price_count'
]);
} else { $product->
setCustomerPriceCount($data['__product_fallback_price_count'
]);
} } /**
* Iterates the attribute data and assigns the attribute struct to the product.
*/
private function assignAttributeData(ListProduct
$product, array
$data): void
{ $translation =
$this->
getProductTranslation($data);