Format SKU

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi,

I am upgrading my plugin from nopCommerce 3.9 to nopCommerce 4.1. How do I fix this error?

        foreach (OrderItem ov in od.OrderItems)
        {
            if (!String.IsNullOrEmpty(ov.AttributesXml))
                odd.Sku = ov.Product.FormatSku(ov.AttributesXml, _productAttributeParser);
            else
                odd.Sku = ov.Product.Sku;
  }

'Product' does not contain a definition for 'FormatSku' and no extension method 'FormatSku' accepting a first argument of type 'Product' could be found (are you missing a using directive or an assembly reference?)
5 years ago
You can use search to find items - search for FormatSku

//SKU
var sku = _productService.FormatSku(p, orderItem.AttributesXml);
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.