Skip to content

Commit

Permalink
#6429 Fixed currency in gift card notification
Browse files Browse the repository at this point in the history
  • Loading branch information
skoshelev committed Nov 25, 2022
1 parent daecff3 commit 40a013f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Libraries/Nop.Services/Messages/MessageTokenProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,9 @@ public virtual async Task AddGiftCardTokensAsync(IList<Token> tokens, GiftCard g
tokens.Add(new Token("GiftCard.SenderEmail", giftCard.SenderEmail));
tokens.Add(new Token("GiftCard.RecipientName", giftCard.RecipientName));
tokens.Add(new Token("GiftCard.RecipientEmail", giftCard.RecipientEmail));
tokens.Add(new Token("GiftCard.Amount", await _priceFormatter.FormatPriceAsync(giftCard.Amount, true, false)));
var language = await _workContext.GetWorkingLanguageAsync();
var primaryStoreCurrency = await _currencyService.GetCurrencyByIdAsync(_currencySettings.PrimaryStoreCurrencyId);
tokens.Add(new Token("GiftCard.Amount", await _priceFormatter.FormatPriceAsync(giftCard.Amount, true, primaryStoreCurrency.CurrencyCode, false, language.Id)));
tokens.Add(new Token("GiftCard.CouponCode", giftCard.GiftCardCouponCode));

var giftCardMessage = !string.IsNullOrWhiteSpace(giftCard.Message) ?
Expand Down

0 comments on commit 40a013f

Please sign in to comment.