Hi,
I need to extract some product variant information in MessageTokenProvider, but if I add the IProductService interface to constructor, I receive the error:
No parameterless constructor defined for this object.
If I add other interfaces all works fine.
Can someone help me ?
Thanks, Ivano
This is the constructor:
private readonly ILanguageService _languageService;
private readonly ILocalizationService _localizationService;
private readonly IDateTimeHelper _dateTimeHelper;
private readonly IEmailAccountService _emailAccountService;
private readonly IPriceFormatter _priceFormatter;
private readonly ICurrencyService _currencyService;
private readonly IWebHelper _webHelper;
private readonly IProductService _productService;
private readonly StoreInformationSettings _storeSettings;
private readonly MessageTemplatesSettings _templatesSettings;
private readonly EmailAccountSettings _emailAccountSettings;
private readonly CatalogSettings _catalogSettings;
private readonly TaxSettings _taxSettings;
#endregion
#region Ctor
public MessageTokenProvider(ILanguageService languageService,
ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
IEmailAccountService emailAccountService,
IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
IProductService productService,
StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
TaxSettings taxSettings)
{
this._languageService = languageService;
this._localizationService = localizationService;
this._dateTimeHelper = dateTimeHelper;
this._emailAccountService = emailAccountService;
this._priceFormatter = priceFormatter;
this._currencyService = currencyService;
this._webHelper = webHelper;
this._productService = productService;
this._storeSettings = storeSettings;
this._templatesSettings = templatesSettings;
this._emailAccountSettings = emailAccountSettings;
this._catalogSettings = catalogSettings;
this._taxSettings = taxSettings;
}