Try our conversational search powered by Generative AI!

How can I create model with ProductContent fields?

Vote:
 

Hello. I am trying to investigate EpiServer Commerce. I installed EpiserverCommerceSample. I created new class "Magazine_Product_Content" in MetaDataClasses:

namespace EPiServer.Commerce.Sample.Models.MetaDataClasses
{[CatalogContentType(GUID = "8D2FAA84-28E5-41D4-9AF7-A867574B408A", MetaClassName = "Magazine_Product_Class")]
public class MagazineProductContent : ProductContent
{}}

But in admin panel I cant see that fields as in MediaProductContent Class. I will show screens:

First: Meta Class - Media_Product_Class

Media_Product_Class

Second: Meta Class - Magazine_Product_Class

Magazine_Product_Class

Why there is this difference ? Because both classes has one parrent "ProductContent". What I miss ?

#89106
Aug 07, 2014 13:01
Vote:
 

Hi,

Note that those different "metafields" do not belong to ProductContent. It was added to MediaProductClass by creating metafields, then add it to meta class. In Deparmental package (come with Commerce Sample), those metafields are defined. In other words, MediaProductClass is not entirely "strongly typed type".

You'll need to go to Commerce manager/Administration/Catalog/Metaclass or Metafield to make changes to your MagazineProductClass.

Regards.

/Q

#89110
Aug 07, 2014 13:59
Vote:
 

@Quan Mai Thanks a lot!!!!

#89113
Aug 07, 2014 14:36
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.