on 2019 Feb 15 7:48 PM
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?
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.