Skip to content

Commit

Permalink
Fixed error notification for missing rate currency plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ehalzombi committed Nov 6, 2018
1 parent 2d6d8b3 commit 3fa85e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6327,7 +6327,7 @@ protected virtual void InstallSettings(bool installSampleData)
DisplayCurrencyLabel = false,
PrimaryStoreCurrencyId = _currencyRepository.Table.Single(c => c.CurrencyCode == "USD").Id,
PrimaryExchangeRateCurrencyId = _currencyRepository.Table.Single(c => c.CurrencyCode == "USD").Id,
ActiveExchangeRateProviderSystemName = "CurrencyExchange.MoneyConverter",
ActiveExchangeRateProviderSystemName = "CurrencyExchange.ECB",
AutoUpdateEnabled = false
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Core;
using Nop.Core.Domain.Directory;
using Nop.Services.Configuration;
Expand Down Expand Up @@ -114,8 +115,17 @@ public virtual IActionResult List(bool liveRates = false)
if (!_permissionService.Authorize(StandardPermissionProvider.ManageCurrencies))
return AccessDeniedView();

//prepare model
var model = _currencyModelFactory.PrepareCurrencySearchModel(new CurrencySearchModel(), liveRates);
var model = new CurrencySearchModel();

try
{
//prepare model
model = _currencyModelFactory.PrepareCurrencySearchModel(new CurrencySearchModel(), liveRates);
}
catch (Exception e)
{
_notificationService.ErrorNotification(e);
}

return View(model);
}
Expand Down

0 comments on commit 3fa85e9

Please sign in to comment.