Hi,
I’m building a product feed using the standard JSON template:
@Model.ToJson()
I need to output CategoryPath (stored in EcomProducts.CategoryPath) in the JSON feed.
What I’ve done/verified:
-
EcomProducts.CategoryPath is filled in the database.
-
In the repository index (
Products.index) I can see the field exists (e.g.CustomField_CategoryPath/CategoryPathis visible in “Browse index” / “Index document fields”). -
In the query (
Products.query) I added:
<Field Name="CategoryPath" />
</ViewFields>
and rebuilt the index.
-
In the Feed Provider UI for the feed, CategoryPath is selected under “Product Custom Fields”.
Still:
-
@Model.ToJson()does not include CategoryPath anywhere.
So it looks like CategoryPath is not exposed on ProductViewModel/ProductListViewModel, even though it’s available in DB and the index and is selected in the feed provider.
How can I expose CategoryPath in ProductListViewModel/ProductViewModel so it’s available in templates/feeds?
Thanks!