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

Unable to update a product's SKU if that product has variants #2874

Closed
jacobherrington opened this issue Sep 27, 2018 · 5 comments
Closed

Unable to update a product's SKU if that product has variants #2874

jacobherrington opened this issue Sep 27, 2018 · 5 comments

Comments

@jacobherrington
Copy link
Contributor

jacobherrington commented Sep 27, 2018

Steps to reproduce

  1. Create a product with a SKU
  2. Create variants for that product

Expected behavior

There should be UI elements that allow the admin to change the Spree::Product's SKU.

Actual behavior

There is no way for an admin to change the sku attribute on the Spree::Product model.

System configuration

Solidus Version: 2.7.0

Extensions in use: solidus_auth_devise

Additional Context: I have come across a third party tool that stores reviews based on a product SKU. In this case it is important that an admin can assign a product's SKU, because variants may come and go. If a store ties it's reviews to the variant, they would lose the reviews for a product from their site if they discontinued a variant. Therefore the admin needs the ability to modify the "master" SKU. I felt that this might have other applications in Solidus than just the third party tool I was interacting with, as in many cases a product is more permanent than a variant and it's convenient to be able to refer to the product with a SKU (that might need to change) rather than just a variant.

@jacobherrington jacobherrington changed the title Unable to update a product with variants SKU. Unable to update a product's SKU if that product has variants Sep 27, 2018
@ccarruitero
Copy link
Contributor

When you have a product with variants, the master sku becomes unused. So I think is correct the current behaviour in solidus.

I understand that is necessary for your use case, but you can add this functionality with an extension instead.

@jacobherrington
Copy link
Contributor Author

@ccarruitero It feels to me like a hostile UX to hide a previously existing UI element for no real reason. I would have kept this change in a private fork if I didn't think it had more application in Solidus.

Building this as an extension would likely require a Deface, which is far from ideal (and honestly overkill).

While the product SKU may become less important for the developer when multiple variants exist, I would contend that it could provide significant value to an end user (which is who the admin UI should be built around).

Finally, I think it's extremely important that a SKU has a sense of permanence. A SKU tied to a variant may cease to exist much more easily than a SKU tied to a product. This is not to say that variant SKUs aren't important because they obviously, are and Solidus is correct in using them in most cases, but rather than it's valuable to be able to refer to a product versus a variant of that product. In some cases, the ability to change that value might also be necessary.

Again, these are thoughts with the user in mind, not the developer.

@tvdeyen
Copy link
Member

tvdeyen commented Oct 1, 2018

Building this as an extension would likely require a Deface, which is far from ideal (and honestly overkill).

Agree 👍

@jacobherrington
Copy link
Contributor Author

@tvdeyen any thoughts on #2875?

@kennyadsl
Copy link
Member

Closed since #2875 has been merged

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

4 participants