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

Cant import two products with the same name #301

Open
TalkMarc opened this issue Sep 10, 2024 · 2 comments
Open

Cant import two products with the same name #301

TalkMarc opened this issue Sep 10, 2024 · 2 comments

Comments

@TalkMarc
Copy link

When importing multiple products with the same name, the slug generator generates duplicate product slugs, which causes a unique constraint violation to trigger:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'en-foo-bar' for key 'UNIQ_105A9084180C698989D9B62

As a workaround, it might make sense for the slug to also be imported and exported.

@oallain
Copy link
Member

oallain commented Sep 14, 2024

Hello @TalkMarc

You can see at https://github.com/FriendsOfSylius/SyliusImportExportPlugin/blame/9ada150500b56f7baae9e9861fe40ab2852c4e9d/src/Processor/ProductProcessor.php#L252
I think you can decorate this code and use some data from your file.

Regards

@TalkMarc
Copy link
Author

Thank you for the message.
Yes, i did end up copying and modifying the ProductProcessor and adding the slug to the imported columns so i could define it manually in the import file.

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

2 participants