Hi to all,
I'm working to configure a site and decided to not publish the currency on products and also disable cart as intended to use nopCommerce initially as a catalog.
Unticked published in Configuration/Currency and for every product shown I got an error in the following call in CurrencyService due to targetCurrencyCode is not initialized (null):
public virtual decimal ConvertCurrency(decimal amount, Currency sourceCurrencyCode, Currency targetCurrencyCode)
{
decimal result = amount;
if (sourceCurrencyCode.Id == targetCurrencyCode.Id) here is the issue
return result;
if (result != decimal.Zero && sourceCurrencyCode.Id != targetCurrencyCode.Id)
{
result = ConvertToPrimaryExchangeRateCurrency(result, sourceCurrencyCode);
result = ConvertFromPrimaryExchangeRateCurrency(result, targetCurrencyCode);
}
return result;
Any suggestions?
Thank you in advance.