Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/Libraries/Nop.Services/ExportImport/ExportManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2034,7 +2034,8 @@ async Task<object> getStateProvince(Customer customer)

return stateProvince?.Name ?? string.Empty;
}

// Fetch all stores from the service
var stores = await _storeService.GetAllStoresAsync();
//property manager
var manager = new PropertyManager<Customer, Language>(new[]
{
Expand Down Expand Up @@ -2111,7 +2112,18 @@ async Task<object> getStateProvince(Customer customer)

}, !_securitySettings.AllowStoreOwnerExportImportCustomersWithHashedPassword),

}, _catalogSettings);
}
.Concat(
// Add newsletter subscription properties for each store dynamically
stores.Select(store => new PropertyByName<Customer, Language>(
$"Newsletter-in-store-{store.Id}",
async (customer, lang) =>
{
var newsletter = await _newsLetterSubscriptionService.GetNewsLetterSubscriptionByEmailAndStoreIdAsync(customer.Email, store.Id);
return (newsletter != null && newsletter.Active).ToString();
}
))
), _catalogSettings);

//activity log
await _customerActivityService.InsertActivityAsync("ExportCustomers",
Expand Down