Using Drupal commerce I want to change checkout functionality to allow the user to choose the amount for product type 'donation' on the user details page. See here:

enter image description here

The user should be able set "the price". How would I go about this?

You may also see that I want to add a custom input for choosing allocation of the donation. Would I do this using a hook to alter the form? How? And would it capture the data within commerce store admin?


Did you try Commerce Donate module ?! I think it should solve the issue you are looking for !

Check the Screenshot below.

enter image description here

  • Awesome will give it a shot – Scott Lawrence Oct 5 '12 at 6:44
  • I want to display this Donation checkout pane for only for Product 'Donation'. How would I go about enabling the donation checkout pane just on one product? – Scott Lawrence Oct 5 '12 at 7:39
  • Also the module breaks when you use a text field instead of the radio buttons. Further it doesn't seem to carry the right donation amount through to my payment provider. It just always sends the default 5.00 :S – Scott Lawrence Oct 5 '12 at 12:12

Rather than paraphrasing, and potentially creating confusion, I'll just point you to Randy Fay's blog post and video that describes exactly how to do this. (Randy works for Commerce Guys, the developers of Drupal Commerce). I've tried it and it works like a charm :-)

Using Custom Line Items To Provide a Donation Feature to Drupal Commerce

  • Hey @jmarkel seems that this attaches the field to a page that displays the product? Whereas I want to show the field as a checkout pane alongside user details. Do you think I can easily deviate from the tutorial to achieve this? – Scott Lawrence Oct 10 '12 at 21:42
  • I suppose so, though I haven't tried it. It would take some tweaking of Views, I guess... – jmarkel Oct 11 '12 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.