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
I think the meta field "Epi_IsPublished" determines the expired status. IsPublished = true means "not expired".
Hi Bo,
You can use IPublishedStateAssessor to check a catalog entry is published or not like this:
var publishedStateAssessor = ServiceLocator.Current.GetInstance<IPublishedStateAssessor>();
var isPublished = publishedStateAssessor.IsPublished(entryContent, PublishedStateCondition.None);
Binh's answer is correct. Epi_IsPublished is now considered an internal implementation, and in Commerce 12 you can no longer access it via content.Property.
In the Commerce Catalog UI I expire a product by selecting Manage Expiration and Archiving, and setting the expire date to now.
However, loading catalog content from code I see different properties on my products, like Epi_IsPublished, but nothing in regards to an expired status. My question is, how I can check from code, that a product is expired?
Commerce version: 11.8.3.