Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not knowing the code and the internal structure, I needed to add some Commerce Discount conditions. To me the README was very terse, but good enough. I was confident that I'm looking in the right module, and saw which code to copy & modify.
Where I got stuck after copying code: I didn't know
- if I change an autocomplete element on the configure form, to a select element... then what else should I change?
- where does the data get stored and in what format?
- my rules condition is not OK (has an empty value). what to do about it?
- what does hook_inline_conditions_build_alter() do?
I guess I should be writing a HOWTO now, but I won't :)
The next best thing is documenting hook_inline_conditions_build_alter(). From there it's hopefully clear that the info is stored in 2 places, and flows from submitted configure-form values => inline-conditions field => the hook => rules condition.
Comment | File | Size | Author |
---|---|---|---|
inline_conditions-build-alter-api.patch | 2.44 KB | roderik | |
Comments
Comment #1
jkuma CreditAttribution: jkuma commentedThanks Roderik for you great work as usual, I've merged up your patch to dev branch.