Send product url and image to Klarna on order lines

If you take a look at Litium.AddOns.Klarna.KlarnaPayments.Builders.OrderLineBuilder.Build it seems that the KCO plugin does not send in product image and url on order lines. Do you have any suggestions on how to accomplish that? Maybe you expose some sort of client, from the KCO plugin, that provide you with a method that makes it possible to update an order with additional data?

Litium version: 7.7.3.0

In KlarnaPaymentConfigV3.cs UpdateDataSentToKlarna(UrlHelper urlHelper, OrderCarrier orderCarrier, KlarnaPaymentArgs paymentArgs, CheckoutOrder klarnaCheckoutOrder) you can add image and url to the CheckoutOrder object.

foreach (var row in klarnaCheckoutOrder.OrderLines)
            {
                if (row.Type != OrderLineType.physical)
                {
                    continue;
                }
                var variant = _variantService.Get(row.Reference);
                row.ImageUrl  = variant//GetImageUrl
}
2 Likes

Thanx, we’ll do that :slight_smile: Your’e a hero Eric!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.