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.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
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.