foreach ($lineItems as $lineItem) { $product =
$data->
get( $this->
getDataKey($lineItem->
getReferencedId()) );
if (!
($product instanceof SalesChannelProductEntity
)) { continue;
} $lineItem->
replacePayload([ 'features' =>
$this->
buildFeatures($data,
$lineItem,
$product),
]);
} } private function buildFeatures(CartDataCollection
$data, LineItem
$lineItem, SalesChannelProductEntity
$product): array
{ $features =
[];
$featureSet =
$product->
getFeatureSet();
if ($featureSet === null
) { return $features;
}