Professional Documents
Culture Documents
Catalog Design Approach
Catalog Design Approach
Type definition:
<typegroup name="TWM">
<itemtype code="TWMProduct" extends="Product"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMProduct">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="fullName"
type="java.lang.String">
<description>shortName of the
product.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="TWMItem" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMItem">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="volume" type="java.lang.String">
<description>volume of the item.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
</typegroup>
Approach 2
Extending TWMProduct from VariantProduct and TWMItem from
VariantProduct.
Type definition:
<typegroup name="TWM">
<itemtype code="TWMProduct" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMProduct">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="fullName"
type="java.lang.String">
<description>shortName of the
product.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="TWMItem" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMItem">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="volume" type="java.lang.String">
<description>volume of the item.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
</typegroup>
Type definition:
<typegroup name="TWM">
<itemtype code="TWMProduct" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMProduct">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="baseProduct" type="Product"
redeclare="true">
<persistence type="property"/>
<modifiers read="true" write="true" search="true"
optional="true" initial="false"/>
</attribute>
<attribute qualifier="fullName"
type="java.lang.String">
<description>shortName of the
product.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="TWMItem" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMItem">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="volume" type="java.lang.String">
<description>volume of the item.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
</typegroup>
Type Definition:
After Initialization
Exception in logs:
Type definition:
<typegroup name="TWM">
<itemtype code="TWMProduct" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMProduct">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="fullName"
type="java.lang.String">
<description>shortName of the
product.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="TWMItem" extends="VariantProduct"
autocreate="true" generate="true"
jaloclass="de.hybris.platform.yacceleratorcore.jalo.TWMItem">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="volume" type="java.lang.String">
<description>volume of the item.</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="VariantProduct"
autocreate="false" generate="false">
<description>Total Wines Product type that contains additional
attribute specific to TWM product model.
</description>
<attributes>
<attribute qualifier="baseProduct" type="Product"
generate="false" autocreate="false" redeclare="true">
<persistence type="property"/>
<modifiers read="true" write="true" search="true"
optional="true" initial="false"/>
</attribute>
</attributes>
</itemtype>
</typegroup>
After Initialization