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.
In my project I am wanting to allow users to contribute any amount they want to publish, I have a field_donation_amount in the node, and would like to pass that integer * 100 to base price.
Comments
Comment #1
toastytheog CreditAttribution: toastytheog commentedOK, I did it. It was pretty simple, my issue was not fully understanding how rules inherits fields
ended up adding a rule
on price calculation
with
entity has fields commerce-line-item:commerce_node_checkout_node
and fields commerce-line-item:commerce_node_checkout_node:field_donation_amount
then was able to
calculate
fields commerce-line-item:commerce_node_checkout_node:field_donation_amount *100
and set the unit price to that variable
too tired to format the text for easier reading, maybe tomorrow
Comment #2
mstef CreditAttribution: mstef commentedLooks like this was resolve via a custom Rule.