Trim SKU before product save#14245
Conversation
|
|
|
@dmanners AFAIK you already discussed this issue as part of import export improvements project. Could you please review this PR? |
| * @param array $productData | ||
| * @return array | ||
| */ | ||
| protected function trimData(array $productData) |
There was a problem hiding this comment.
This is a copy of normalize method which is going to be removed: https://github.com/birmo/magento2/blob/2.2-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L303
Need to be found out in favor of what normalize is going to be removed.
|
Thanks for letting me know @ihor-sviziev . And thank you for this pull request @birmo currently we already have a pull request in place for this as part of the import/export project. As such I will close this pull request as a duplicate. |
Description
There is a problem with spaces before and after attributes value. The problem is very annoying at SKU. It leads to many misunderstandings because for example 'my-sku' is different than 'my-sku ' (look at the space).
I fixed it adding trim function to every product data value.
Manual testing scenarios
Contribution checklist