cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ProductEntitlements Sync problem

0 Kudos
261

Hello,

My hybris version is 6.7

And when I try to do a Sync on my products that have ProductEntitlements I get sync errors. This is a shor of my impex:

 INSERT_UPDATE FixCatalogVersionSyncJob;code[unique=true];$sourceProductCV;$targetProductCV;roottypes(code)[mode=append];sessionUser(uid);syncLanguages(isocode)
 ;$syncJobCode;;;BundleTemplate,Product,Category,SolrHeroProductDefinition,Media,Keyword,TaxRow,DiscountRow,MediaContainer,AbstractConfiguratorSetting,ChangeProductPriceBundleRule,ChangeProductBundleRulePriceRow,ProductEntitlement;admin;$synclanguages
 

After some investigation I found out that ProductEntitlements have a no write modifier on the catalog version:

 <attribute qualifier="catalogVersion" type="CatalogVersion">
                     <description>Catalog Version</description>
                     <modifiers initial="true" write="false"/>
                     <persistence type="property"/>
                 </attribute>

I change it to true, did an update on entitlements extensions and my sync worked.

Is this the right solution or is there any other way?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

No, I think it's wrong. We should never change anything in OOTB extensions as it will be lost when you upgrade to next versions. To address your original issue, the modifiers on the catalogVersion on ProductEntitlement are <modifiers initial="true" write="false"/>. This means you can only set catalogVersion during initial item creation. To override this value, use forceWrite=true in impex header for the attribute and update all the items before the sync. If your intention is to only update the catalogVersion on both Staged and Online items, then maybe you just need to run the update impex on both versions instead of the sync. This is because if you update only the staged and run sync, the items will be created in new catalog and they will be still be left in old Online catalog. Hope this is helpful.

0 Kudos

The problem is that the sync is not working because it says it has duplicated rows, but when I change the catalog version to UNIQUE, the sync works.