The main reason that you don't already have a built-in way to do that in the view model is because most stores don't do this. The most common use case is that a product could belong to many categories, so adding this to the view is a nightmare scenario to a designer. :D
You can add a method to the view in question that queries the API for the product and then list the various categories it belongs to.
Will Strohl, Upendo Ventures
Hotcakes Cloud |
Get Support |
Code Support Official Cloud & Support provider for Hotcakes