public function getType(): string
{ return 'cross-selling';
} public function enrich(CmsSlotEntity
$slot, ResolverContext
$resolverContext, ElementDataCollection
$result): void
{ $config =
$slot->
getFieldConfig();
$context =
$resolverContext->
getSalesChannelContext();
$struct =
new CrossSellingStruct();
$slot->
setData($struct);
$productConfig =
$config->
get('product'
);
if ($productConfig === null ||
$productConfig->
getValue() === null
) { return;
} $product = null;
if ($productConfig->
isMapped() &&
$resolverContext instanceof EntityResolverContext
) {