Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
we have a situation where a product has been added and a stock level has been set to 30; but the website doesn't recognise that. When I personally go in and view the product, it shows a stock level of 30, however when the original editor views it, it shows the 30 that she put in, and I can verify that using the Rollback history.
I'm not sure whether this is a bug with Vendr or Umbraco 8.7; but it doesn't matter how many times she publishes the product, nothing changes. Some screenshots for you to take a look at:
Rollback history showing correct stock level:
List view showing correct stock level:
Editor view incorrectly showing current stock level as 0:
Update: I just tried setting the stock level to 30 and published the product, then refreshed the browser and the stock level was still displaying as 0.
I'm also wondering whether this has something to do with the Conditional Displayers plugin that's being used for the "Track Stock Levels" property to hide the "Stock" property when it's not checked... (https://github.com/KOBENDigital/ConditionalDisplayers)
When I went in and edited the "Track Stock Levels" property to remove the "Stock" property from the toggle list, I can now edit the stock level and it shows up when I come back in.
I've decided this has to be an issue with Umbraco 8.7, so please ignore for now :)
Just a little background that might help here but stock levels are kept in a custom dB table vendrStock and not on the node. But, to allow you to enter the stock we have a prop editor that captures this, then when to product is saved that value is synced to the stock table and the value on the Umbraco node is set to zero. The property editor when it loads ignores any value stored on the node and calls an api to fetch it from the stock table. Also, we have a value converter that fetches this value when you request it on the front end.
The reason this is all required is so the stock can change independently from the node. But it means we have to have all this stuff. My thought then is that something is messing up requesting the stock from the api. This might be the conditional input stuff so I’d check this.
Also, because we don’t store the actual stock on the node, you can’t display stock in the list view as this will always likely be zero as there is no way to get the list view to load data from another source.
Just thought this might help debug the issue.
Aha - that makes a lot of sense - I think I may need a stock level content app or something like that...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted