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
I'am trying to get uCommerce up and running, but having trouble with the structure. I have 3 catalogs with multiple categories.
What I'am trying to make is a normal drop-down navigation with catalogs and other content pages, and their subpages / categories. Below is listing the catalogs, but not their categories ...
List<ProductCatalog> catalogs = UCommerce.Api.CatalogLibrary.GetAllCatalogs();
foreach (ProductCatalog productCatalog in catalogs)
@foreach (Category categories in productCatalog) // does not work!
<h2>Category display name</h2>
When doing your foreach you should foreach over the property Categories in productCatalog or use the GetRootCategories method. So your foreach should look like this instead:
@foreach (Category categories in productCatalog.GetRootCategories())
Best regards Martin
Thanks - that worked :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted