I have a Drupal site using the Drupal Commerce module.

I want to add a checkbox to the checkout form, some thing like this

= Donate by 5$

If it is checked, then "5$" will added to the selected product price.

Any suggestions?


Have a look at the Commerce Donate module. From its project page:

This module provides a donation line item type along with a donation product and product display. This is partially based on Randy Fay's excellent screencast at http://commerceguys.com/blog/using-custom-line-items-provide-donation-fe...

It uses the Select or Other module to provide the donation amount form field. If you need to modify the default donation option values, the install the Commerce Customizable Products module in order to modify the line item type form settings.

In addition to being able to create a donation product, this module also provides a donation checkout pane, allowing customers to add a donation to their order as part of the checkout process.

Especially the last paragraph seems pretty close to what you're looking for.

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.