forked from nopSolutions/nopCommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nopSolutions#601 Add an option to subscribe to nopCommerce newsletter…
…s during installation
- Loading branch information
1 parent
6b30a97
commit ed4dbc7
Showing
6 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,7 @@ public virtual IActionResult Index() | |
{ | ||
AdminEmail = "[email protected]", | ||
InstallSampleData = false, | ||
SubscribeNewsletters = true, | ||
InstallRegionalResources = _appSettings.Get<InstallationConfig>().InstallRegionalResources, | ||
DisableSampleDataOption = _appSettings.Get<InstallationConfig>().DisableSampleData, | ||
CreateDatabaseIfNotExists = false, | ||
|
@@ -225,6 +226,18 @@ public virtual async Task<IActionResult> Index(InstallModel model) | |
|
||
dataProvider.InitializeDatabase(); | ||
|
||
if (model.SubscribeNewsletters) | ||
{ | ||
try | ||
{ | ||
var resultRequest = await _nopHttpClient.Value.SubscribeNewslettersAsync(model.AdminEmail); | ||
} | ||
catch | ||
{ | ||
// ignored | ||
} | ||
} | ||
|
||
var cultureInfo = new CultureInfo(NopCommonDefaults.DefaultLanguageCulture); | ||
var regionInfo = new RegionInfo(NopCommonDefaults.DefaultLanguageCulture); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters