Closed akropivko closed 1 year ago
The URL isn't unique and nobody enforces this, that's true. It's also not strictly an error to have an old and a new product sharing the same URL, so maybe a warning would be the better option if the order is well defined. When copying an item, we could also add a "2" at the end of the URL to make it unique. What do you think?
Having two or more products sharing the same URL may lead to an issue where the stock values of one of the products are unexpectedly set to null. I have encountered this problem a couple of times, but unfortunately, I have not been able to reproduce it consistently for an issue report. It appears to me that adding a '2' or maybe something similar to what you have done for the SKU, would be good. Thanks
The product label now gets the same hash as the code. This ensures that the product URL will get it too if no other values is entered but a product can still have the same URL if the original product contains a text of type "URL segment" for different languages.
The stock level of the products is never copied and will be always 0 if not changed and we think this is the correct behavior.
Environment Version - 2023.07 Integration - Laravel System - Windows10
Describe the bug A new duplicated product item can be saved with the same URL without any error message. So we can have 2 product items with the same URL.
To Reproduce
Expected behavior Some error message should be displayed to prevent saving a new product with existed URL