London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
You can use ReferenceConverter to get the ContentReference from the code, then use the IContentLoader to load the EntryContentBase. From that you can check if the content is a ProductContent, or a VariationContent, or a BundleContent.
Or you can use this https://github.com/vimvq1987/CatalogContentTypeResolver
Hi,
What's the best way to determine if an entrycode belongs to a product or variant?
I have a renderer that has different behaviour for variants and products.
Using only code as a parameter, is it possible to find out if that code belongs to a product, variant or even perhaps a bundle?
Thanks in advance