Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi Robert,
I think it is a bug from framework. Content Loader does not return latest published version by default. As I reviewed then you could get correctly only with specific version id.
You can raise a bug to support team to fix it.
Hi Binh,
Thanks for replying. It might be a bug, but due to time constraint we changed the feature we were building - to get the information elsewhere than from the Catalog.
I am trying to add a property to my own CatalogContent.
Previous this topic was created: Add properties to CatalogContent | Optimizely Developer Community And was closed with "Not working".
Then I saw this blog post which says it can be done: https://stefanolsen.com/posts/catalog-roots-can-finally-be-customized-in-optimizely-commerce/
-
I can see my new property in the UI, and when the UI is reentered, I can still see the value I set. But I cannot read the value using code. I am trying to load the properties with something like this:
int catalogId = -2147483645; _contentLoader.Get<MyCatalogContent>(_referenceConverter.GetContentLink(catalogId, CatalogContentType.Catalog, -1))
and
var catalog = _contentLoader.GetAncestors(product.ContentLink) .OfType<MyCatalogContent>() .FirstOrDefault(); var x = catalog.MyProperty; // null
I can see the built in values, but not my own.
Any ideas how to read the value for my custom property?