Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not changed fields in CustomType will be deleted #110

Open
guidostoffKt opened this issue Jul 8, 2021 · 0 comments
Open

Not changed fields in CustomType will be deleted #110

guidostoffKt opened this issue Jul 8, 2021 · 0 comments

Comments

@guidostoffKt
Copy link

Method extractChanges in vendor/bestit/commercetools-odm-1.22.2/src/UnitOfWork/ChangeManager.php also removes fields in the CustomType that have not changed. Commercetools removes these fields, because the CustomType is assigned as a whole. The following lines after line 122 would do the trick for me

if ($key === 'custom' && array_key_exists('fields', $changedSubData)) {
$changedSubData['fields'] = $value['fields'];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant