-
Notifications
You must be signed in to change notification settings - Fork 814
Description
What type of issue is it? (Choose one - delete the others)
Wrong documentation
What article/section is this about?
Multiple, originally found on https://docs.umbraco.com/umbraco-commerce/tutorials/build-a-store/cart/custom-cart
Describe the issue
I've been looking at this article: https://docs.umbraco.com/umbraco-commerce/tutorials/build-a-store/cart/custom-cart
And in some of the examples it has this code for finding the current store:
StoreReadOnly store = CurrentPage!.GetStore()!;However, when trying to adapt the example I could not find the GetStore() extension method anywhere.
When searching the documentation I found many references to it in examples, but no explanation of what it does / which NuGet package it comes from:
After some more digging I found that it is an extension method that is set up in the demo store here:
https://github.com/umbraco/Umbraco.Commerce.DemoStore/blob/96059c2fe95312604de9ff1dff139e30e4694dec/src/Umbraco.Commerce.DemoStore/Extensions/PublishedContentExtensions-Cart.cs#L12
I don't think the examples in the documentation should contain code that is not readily available when installing - or atleast all the examples using the method should have a note on where to find the source of it 🙂