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

Same sku can be saved #509

Closed
JamiePattison opened this issue May 21, 2024 · 1 comment
Closed

Same sku can be saved #509

JamiePattison opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JamiePattison
Copy link

I cant tell if there is a way to achieve this from the Commerce package or whether its a bug. If i add a product ID (or a SKU) into Umbraco with the field set with the alias sku, then i can add another product with the same SKU which allows to be saved.

I dont believe the same SKU should be allowed as it would be difficult to write/compare a report of what product was purchased if the SKU is the same?

@JamiePattison JamiePattison added the bug Something isn't working label May 21, 2024
@mattbrailsford
Copy link
Contributor

Yea, I don't think we enforce this as the main unique element we use is the productReference. If you do want to enforce this you could add a validation handler for the ValidateOrderProductAdd validation event and fail the action if a product with that SKU but a different productRefernce already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants