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.
Typo on line 21. The price array should have 'currency_code' instead of 'currency'. This slowed me down a bit until I realized why.
Comment | File | Size | Author |
---|---|---|---|
#3 | issue-2861384.patch | 376 bytes | sonoutlaw |
Comments
Comment #2
sonoutlaw CreditAttribution: sonoutlaw commentedComment #3
sonoutlaw CreditAttribution: sonoutlaw commentedComment #4
gcbComment #5
fonant CreditAttribution: fonant commentedI discovered this too :)
As well as building an array, you can return the value of a Price field.
For example I configured the Event node to have two Price fields for members and non-members, and configured the Registration to have a "member/non-member" radiobutton. This code uses the radiobutton value to apply the correct price to the line item:
Comment #7
gcbThanks! Committed.