- π©πͺGermany Anybody Porta Westfalica
@DiDebru could you turn this into a MR please?
- Merge request !17Issue #3181826 by didebru, anybody: Autofill code when adding a single gift card β (Open) created by Anybody
- πΊπΈUnited States rhovland Oregon
For some reason the MR removed the required attribute for the code field on the giftcard entity. This has been reversed.
Also fixed a phpcs error. - πΊπΈUnited States rhovland Oregon
Tested MR and can confirm it works. Seems ready to commit.
- π©πͺGermany Anybody Porta Westfalica
I have no objections to merge this, if you say it's fine @rhovland!
- π©πͺGermany Anybody Porta Westfalica
@rhovland thought about this again. Should we make this a setting maybe? There might be different use-cases. Of course that could also be done later, if it's an edge-case... I'm unsure.
Next we should focus on fixing the tests in π Fix tests Active . Hope to find some more time soon...
- πΊπΈUnited States rhovland Oregon
Providing a default value following the rules for the giftcard type seems pretty straight forward to me. If someone wants to enter a custom code they replace the default value in the text box.
If this was a setting, where would it be configured?
- π©πͺGermany Anybody Porta Westfalica
@rhovland thanks. Yeah I'm just not totally sure if the default value doesn't potentially confuse users, but I'm not against it. Then perhaps add a short sentence to the description like:
"The field was prefilled with an auto-generated code, that can be adjusted, if needed." (Please improve, I'm not a native speaker)If you disagree, feel free to merge this, and we'll see what happens in the future, but I think a short explanation wouldn't do any harm?
If it was a setting, it should go into global settings page of commerce_giftcard, I think. But yeah might be too much.