int currentQuantity = Int32.Parse(currentDoc.getProperty("stock").Value.ToString()); int total = currentQuantity - orderline.Quantity; currentDoc.getProperty("stock").Value = total.ToString(); umbraco.library.UpdateDocumentCache(currentDoc.Id);
i use this code to update the stock value, the value is updatet but it is first visibel when i go to the backend and click publish.
update document
int currentQuantity = Int32.Parse(currentDoc.getProperty("stock").Value.ToString());
int total = currentQuantity - orderline.Quantity;
currentDoc.getProperty("stock").Value = total.ToString();
umbraco.library.UpdateDocumentCache(currentDoc.Id);
i use this code to update the stock value, the value is updatet but it is first visibel when i go to the backend and click publish.
what am i doing wrong???
You should publish the document (currentDoc.Publish() method)
but then i need a user, and this is frontend :-(
Just use this:
Hmm umbraco.config is still not updatet
thx :-)
is working on a reply...