【发布时间】:2023-01-19 14:27:50
【问题描述】:
我想向我的自定义模型添加新属性(定制服装产品), 它从 ApparelProduct 模型 (服装产品模型已经从产品型号- SAP 核心模型)。
扩展项.xml
<typegroup name="Apparel">
<itemtype code="ApparelProduct" extends="Product"
autocreate="true" generate="true"
jaloclass="de.hybris.training.core.jalo.ApparelProduct">
<description>Base apparel product extension that contains additional attributes.</description>
<attributes>
<attribute qualifier="genders" type="GenderList">
<description>List of genders that the ApparelProduct is designed for</description>
<modifiers/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
<itemtype code="CustomApparelProduct" extends="ApparelProduct"
autocreate="true" generate="true" > // My custom type
<description> Custom Apparel Product that contains total amount attributes</description>
<attributes>
<attribute qualifier="amount" type="java.lang.Integer">
<description>Total buying amount </description>
<modifiers/>
<persistence type="property"/>
<defaultvalue>Integer.valueOf(0)</defaultvalue>
</attribute>
</attributes>
</itemtype>
但是,当我使用 FlexibleSearch 转到 Hybris 管理控制台检查新类型的数据时。结果是所有字段都缺少数据。 (下图来自我定制服装产品类型)
同时,当我检查 flexibleSearch for服装产品类型和产品键入所有发回其中充满数据字段的表。 (下图来自服装产品类型)
我不知道我需要做什么才能将原始数据从产品我的新类型定制服装产品(原始数据是使用 impex 和 csv 文件插入到系统中的——选择插入的类型是产品).我如何将新数据传输到我的自定义类型。感谢您的支持。
【问题讨论】:
-
你还有用来插入数据的 impex 吗?我会编辑 impex 以删除所有内容,然后将它们再次插入到新类型中。