Try our conversational search powered by Generative AI!

Pagetype linking to a product

Vote:
 

Hi,

I have a page type in the CMS that needs to link to a single Commerce product or variant.  

[Display(
Name = "Slide Content"]
[AllowedTypes(typeof(MyProduct), typeof(MyVariation))]
public virtual ContentReference SlideContent { get; set; }

In the CMS as an editior, when trying to select the product/variant, the dialog  box only displays a "Root" node.

What is the correct way to link to a single catalog item?  Changing ContentReference  to Url works, but it doesn't seem correct as it give the editors to many other options.

Thanks

Danie

#131576
Jul 30, 2015 12:25
Vote:
 

Think adding the following UIHint is what you want Danie. [UIHint(EPiServer.Commerce.UIHint.CatalogContent)]

#131581
Jul 30, 2015 13:59
Vote:
 

Hi,

Which version are you using?

ContentReference to catalog content was not supported until 7.10.

Regards.

/Q

#131582
Jul 30, 2015 14:00
Vote:
 

Thanks Mark, exactly what I was looking for.

Quan, we are using 8.13.2

#131583
Jul 30, 2015 14:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.