Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Update text on the button "out of stock" - for unregistered customers

support857df43f7cb3
diff --git a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
index 50c25d2f1..18ecb9921 100644
--- a/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
+++ b/src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
@@ -14277,6 +14277,9 @@
<Value>Notify me when available</Value>
</Resource>
<Resource Name="OutOfStockSubscriptions.OnlyRegistered" Area="Front">
+ <Value>Only registered customers can get notify</Value>
+ </Resource>
+ <Resource Name="OutOfStockSubscriptions.OnlyRegisteredText" Area="Front">
<Value>Only registered customers can use this feature</Value>
</Resource>
<Resource Name="OutOfStockSubscriptions.PleaseWait" Area="Front">
diff --git a/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_210.xml b/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_210.xml
index cb7770d11..3efc9b524 100644
--- a/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_210.xml
+++ b/src/Web/Grand.Web/App_Data/Resources/Upgrade/en_210.xml
@@ -69,4 +69,10 @@
<Resource Name="Admin.System.SystemInfo.GitCommit" Area="Front">
<Value>Git commit</Value>
</Resource>
+ <Resource Name="OutOfStockSubscriptions.OnlyRegistered" Area="Front">
+ <Value>Only registered customers can get notify</Value>
+ </Resource>
+ <Resource Name="OutOfStockSubscriptions.OnlyRegisteredText" Area="Front">
+ <Value>Only registered customers can use this feature</Value>
+ </Resource>
</Language>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Controllers/OutOfStockSubscriptionController.cs b/src/Web/Grand.Web/Controllers/OutOfStockSubscriptionController.cs
index dfb0c239b..11cd2bc6d 100644
--- a/src/Web/Grand.Web/Controllers/OutOfStockSubscriptionController.cs
+++ b/src/Web/Grand.Web/Controllers/OutOfStockSubscriptionController.cs
@@ -71,7 +71,7 @@ namespace Grand.Web.Controllers
var customer = _workContext.CurrentCustomer;
if (!await _groupService.IsRegistered(customer))
- return Content(_translationService.GetResource("OutOfStockSubscriptions.NotifyMeWhenAvailable"));
+ return Content(_translationService.GetResource("OutOfStockSubscriptions.OnlyRegistered"));
if (product.ManageInventoryMethodId != ManageInventoryMethod.ManageStock)
return Content(_translationService.GetResource("OutOfStockSubscriptions.NotifyMeWhenAvailable"));
@@ -108,8 +108,8 @@ namespace Grand.Web.Controllers
if (!await _groupService.IsRegistered(customer))
return Json(new {
subscribe = false,
- buttontext = _translationService.GetResource("OutOfStockSubscriptions.NotifyMeWhenAvailable"),
- resource = _translationService.GetResource("OutOfStockSubscriptions.OnlyRegistered")
+ buttontext = _translationService.GetResource("OutOfStockSubscriptions.OnlyRegistered"),
+ resource = _translationService.GetResource("OutOfStockSubscriptions.OnlyRegisteredText")
});
if (product.ManageInventoryMethodId == ManageInventoryMethod.ManageStock &&