-
Notifications
You must be signed in to change notification settings - Fork 170
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
Hide SKU field if it's being dynamically generated #217
Comments
Alternatively, I'd also support making the SKU field non-required when generated values are available so that it can be overwritten for whatever reason, with helper text explaining that entering a value will overwrite the generated SKU value |
|
I thought it was a bug that the SKU field still appears as required when it's supposed to be dynamically generated! Please fix this bug/add this feature (delete as appropriate). (-: |
…there is an automatic sku format #217
SKU fields now no longer show for new products or variants if the SKU will be automatically generated. This code has been pushed and should be included in the |
Thanks a lot. But now my workaround doesn't work anymore. My SKU consists of the product ID and the variant ID. So far I had assigned a temporary SKU first, deleted it in a second step and saved the product again. However, this is no longer possible and I can't create new products anymore. |
Hi @spacemanup In theory, this kind of process will still be possible. How were you assigning your temporary SKU? |
Hi @nfourtythree,
I just type random numbers into the input field :)
I guess the hook for the sku fires before the id for the variant is created. Is this correct? I've a plugin that extends commerce, so if you could point me to the right direction, I could probably add a new function to get the sku set correctly.
|
You could definitely get this working. If you use the Also listening on that same event you could check if the element is a variant, Hope that makes sense |
That definitively makes sense! Thank you so much for this fast and very helpful answer! |
It's awesome that we can dynamically generate an SKU! This is (obviously) reminiscent of dynamically generated titles on Entries.
However, the SKU field still appears, with a red asterisk denoting it as "required". It would be great if it followed the pattern of Entry titles, and the field were simply hidden if it's going to be dynamically generated.
Thanks! :)
The text was updated successfully, but these errors were encountered: