Closed federivo closed 6 years ago
Pending:
@federivo @piotrekkaminski
I think what we will have to do here is change the way that products are duplicated as currently they will silently fail when a product is duplicated via the admin.
I would recommend changing the class Catalog/Model/Product/Copier.php
to take a new class that will allow you to generate a unique url and sku. I know that this is kind of what we are replacing but for me I think that in the case of admin product duplication then generating a unique sku and url would be fine.
What do you both think?
@dmanners so I think we had an automatic naming logic before but it often resulted in proliferation of copies. I think the plan for Magento 2 was to offer meaningful error messages. Can we provide good error messages instead - like product with this SKU already exists, please use a different SKU or edit the original product instead.
Will close this PR in favor of https://github.com/magento-engcom/import-export-improvements/pull/119 119 takes the starting point of this PR and adds a bit more work to make duplication work so @federivo your commits and code will still be in place.
Thank you for your contribution.
Description
Removed logic for generating unique SKU when already exists. Throw an exception instead which will be presented to the user.
Fixed Issues (if relevant)
https://github.com/magento-engcom/import-export-improvements/issues/101
Manual testing scenarios
Contribution checklist