/**
* @internal
*/
public function __construct( private readonly EntityRepository
$customFieldRepository,
private readonly LanguageLocaleCodeProvider
$languageLocaleProvider ) { } public function prepare(iterable
$lineItems, CartDataCollection
$data, SalesChannelContext
$context): void
{ $this->
loadCustomFields($lineItems,
$data,
$context);
} public function add(iterable
$lineItems, CartDataCollection
$data, SalesChannelContext
$context): void
{ foreach ($lineItems as $lineItem) { $product =
$data->
get( $this->
getDataKey($lineItem->
getReferencedId()) );
if (!
($product instanceof SalesChannelProductEntity
)) { continue;
}