I am trying to get the product attribute values for a given product variant.
However everytime i set the code to run, it returns object reference not set to an instance of an object.
Does anyone see where im going wrong please?
ProductAttributeService pas = new ProductAttributeService(_context);
var productVariantAttributeValues = pas.GetProductVariantAttributeValues(productVariant.ProductVariantId); //errors here
foreach( var pva in productVariantAttributeValues )
{
if (pva.IsTaxExempt)
{
return true;
}
}