Skip to content

Commit 227fc05

Browse files
committed
Minor fixes
1 parent 19063dd commit 227fc05

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/Libraries/SmartStore.Core/Domain/Messages/MessageTemplateNames.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ public class MessageTemplateNames
3333
public const string BackInStockCustomer = "Customer.BackInStock";
3434
public const string SystemCampaign = "System.Campaign";
3535
public const string SystemContactUs = "System.ContactUs";
36+
public const string SystemGeneric = "System.Generic";
3637
}
3738
}

src/Libraries/SmartStore.Services/Messages/MessageFactory.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,14 @@ public virtual object[] GetTestModels(MessageContext messageContext)
515515
["Address"] = "VatAddress"
516516
});
517517
break;
518+
case MessageTemplateNames.SystemGeneric:
519+
result.Add(new NamedModelPart("Generic")
520+
{
521+
["Email"] = "[email protected]",
522+
["Subject"] = "Subject",
523+
["Body"] = LoremIpsum
524+
});
525+
break;
518526
}
519527
}
520528

src/Presentation/SmartStore.Web/Administration/Controllers/CustomerController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public ActionResult Create(CustomerModel model, bool continueEditing, FormCollec
496496
var numberExists = _customerService.SearchCustomers(new CustomerSearchQuery { CustomerNumber = model.CustomerNumber }).SourceQuery.Any();
497497
if (numberExists)
498498
{
499-
NotifyError("Common.CustomerNumberAlreadyExists");
499+
NotifyError(T("Common.CustomerNumberAlreadyExists"));
500500
}
501501
else
502502
{
@@ -680,7 +680,7 @@ public ActionResult Edit(CustomerModel model, bool continueEditing, FormCollecti
680680
var numberExists = _customerService.SearchCustomers(new CustomerSearchQuery { CustomerNumber = model.CustomerNumber }).SourceQuery.Any();
681681
if (model.CustomerNumber != customer.CustomerNumber && numberExists)
682682
{
683-
NotifyError("Common.CustomerNumberAlreadyExists");
683+
NotifyError(T("Common.CustomerNumberAlreadyExists"));
684684
}
685685
else
686686
{

src/Presentation/SmartStore.Web/Controllers/CustomerController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ public ActionResult Info(CustomerInfoModel model)
10311031
var numberExists = _customerService.SearchCustomers(new CustomerSearchQuery { CustomerNumber = model.CustomerNumber }).SourceQuery.Any();
10321032
if (model.CustomerNumber != customer.CustomerNumber && numberExists)
10331033
{
1034-
NotifyError("Common.CustomerNumberAlreadyExists");
1034+
NotifyError(T("Common.CustomerNumberAlreadyExists"));
10351035
}
10361036
else
10371037
{

0 commit comments

Comments
 (0)