cancel
Showing results for 
Search instead for 
Did you mean: 

Back office, excel import sheets in sequence?

0 Kudos
457

Hi Experts, I'm uploading products using excel import functionality in Back office . In a file ,I have 2 sheets .First sheet contains Base products and second sheet contains Variant products. While uploading this file ,It is throwing below validation error

Since the base products are in the first sheet and variants are in second sheet .I assumed that first base product gets imported and later variant products get imported.But it doesn't works this way!!!!!

Please suggest me an approach how can I upload all these products in one file??

View Entire Topic
Former Member
0 Kudos

Hi,

ExcelBaseProductValidator checks if product pointed by "Base Product" attribute exists in the system. The validation is taking place before the data is imported to the system, so that's why it prevents the data to be imported, because it cannot find new Products in the database. It's a missing feature in ExcelBaseProductValidator and it should accept such cases.

However, it will work if you turn off the ExcelBaseProductValidator, because the generated impex will be valid. As a workaround you can find "excelBaseProductTypeTranslator" bean and remove property "validators" from it, so this code:

     <alias name="defaultExcelBaseProductTypeTranslator" alias="excelBaseProductTypeTranslator"/>
     <bean id="defaultExcelBaseProductTypeTranslator"
           class="com.hybris.backoffice.excel.translators.ExcelBaseProductTypeTranslator"
           parent="abstractCatalogVersionAwareTranslator">
         <property name="order" value="3000"/>
         <property name="excelUniqueFilter" ref="uniqueCheckingFilter"/>
         <property name="mandatoryFilter" ref="mandatoryCheckingFilter" />
         <property name="validators" ref="excelBaseProductValidators"/>
     </bean>

should look like that:

     <alias name="defaultExcelBaseProductTypeTranslator" alias="excelBaseProductTypeTranslator"/>
     <bean id="defaultExcelBaseProductTypeTranslator"
           class="com.hybris.backoffice.excel.translators.ExcelBaseProductTypeTranslator"
           parent="abstractCatalogVersionAwareTranslator">
         <property name="order" value="3000"/>
         <property name="excelUniqueFilter" ref="uniqueCheckingFilter"/>
         <property name="mandatoryFilter" ref="mandatoryCheckingFilter" />
     </bean>

After that the validation for base product in excel will be ignored.

0 Kudos

Hi , Thank you for your reply.

But this doesn't validate the base product fields? If business by any chance gives a wrong value to this Base product field then, it might not be validated.

Instead I'm looking for a solution where we can give preferences to the sheets in my import excel file, such that first base product file gets validated & imported and then variant product file gets validated and imported.

Any suggestions please