Hi
I have been updating some of the Message Templates and tried to add the configured logo to the some of the MessageTemplates and I found a need to add this as a new Store token.
To add this new token I only need to edit the MessageTokenProvider.cs with the following changes:
In the "Fields" region add the PictureService
private readonly IPictureService _pictureService;
In the constructor add the PictureService in the parameter list
IPictureService pictureService
and in the constructor body add this
this._pictureService = pictureService;
Now in the AddStoreTokens method add this
tokens.Add(new Token("Store.LogoUrl", _pictureService.GetPictureUrl(_storeInformationSettings.LogoPictureId, showDefaultPicture: true)));
And in the GetListOfCampaignAllowedTokens and GetListOfAllowedTokens add the new token
"%Store.LogoUrl%"
to the allowedToken list.
Now You can use the %Store.LogoUrl% token in Your message templates.
Objecta Data
Denmark