summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-04-02 14:01:03 -0700
committerMerov Linden <merov@lindenlab.com>2015-04-02 14:01:03 -0700
commit8e117983808f7b4f9d4aa288ec48cea5f0f89536 (patch)
tree58441714ef7bcf1b60209b44ffe283fd24319f02 /indra/newview
parent0118a862fb63971b8b718ebecf72292b8318e464 (diff)
DD-338 : Auto unlist when stock gets to 0 during stock folder manipulation
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llmarketplacefunctions.cpp7
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml12
2 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index ab3be79a2e..6ba98ff00e 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1307,6 +1307,13 @@ void LLMarketplaceData::updateSLMListing(const LLUUID& folder_id, S32 listing_id
Json::Value root;
Json::FastWriter writer;
+
+ // Note : auto unlist if the count is 0 (out of stock)
+ if (is_listed && (count == 0))
+ {
+ is_listed = false;
+ LLNotificationsUtil::add("AlertMerchantStockFolderEmpty");
+ }
// Note : we're assuming that sending unchanged info won't break anything server side...
root["listing"]["id"] = listing_id;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 541a240745..97885a0ce6 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -517,6 +517,18 @@ This listing could not be updated.
</notification>
<notification
+ icon="alertmodal.tga"
+ name="AlertMerchantStockFolderEmpty"
+ type="alertmodal">
+ We have unlisted your listing because the stock is empty. You need to add more units to the stock folder to list the listing again.
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Alert when a listing is unlisted because stock folder is empty"
+ name="okignore"
+ yestext="OK"/>
+ </notification>
+
+ <notification
icon="alertmodal.tga"
name="CompileQueueSaveText"
type="alertmodal">