Hi
I am trying to get product information on the default variant of a product.
My template looks like this
@{
string langId=GetString("Ecom:Product.LanguageID");
string productidForVariantSearch=@GetString("Ecom:Product.ID");
string defaultVariantId=@GetString("Ecom:Product.DefaultVariantComboID");
var defaultProduct=ProductService.GetProductById("@defaultVariantId", "@productidForVariantSearch", "@langId");
}
lanIs is = "LANG1"
productidForVariantSearch is = "11210-10043"
defaultVariantId is ="VO106.VO2"
However, I get ann error when trying to declare defaultProduct. The error says:
An object reference is required for the non-static field, method, or property 'ProductService.GetProductById(string, string, string)'
What am I doing wrong?
/Hans