on 2023 May 23 8:38 PM
help me creating a new attribute in an existing product table and add the data in it through impex and display the values of product id, product name and the new attribute in the storefront under myaccount
Request clarification before answering.
Hi Mayank,
You have to follow below step.
1. In your custom core extension, customcore-items.xml file will be there, you need to add your attribute as below.
<itemtype code="Product" autocreate="false" generate="false">
<attributes>
<attribute qualifier="newattribute" type="typw">
<modifiers read="true" write="true" search="true"
optional="true"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
2. You have to add a new property in ProductData object as per below, in customfacades-beans.xml
<bean class="de.hybris.platform.commercefacades.product.data.ProductData">
<property name="productTypeName" type="java.lang.String"/>
</bean>
3. Do a system build and update the system.
4. Create a populator with implementing " Populator<ProductModel, ProductData>" Add populator and add it to existing converter in the customfacades-spring.xml
5. Add newly created property to your JSP file, where you want to show the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mayank,
i just show you a high level process to introduce new product attribute in your storefront
Hopefully it can help you a little.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.