This module provides way to display progress towards a fundraising goal for donations and products sold with Drupal Commerce. When configured for a specific content type, editors will be able to enter a goal total amount and select which Drupal Commerce products contribute towards that goal. A field formatter is provided to display a progress bar of donations towards the goal.
While this module was developed for use with the Commerce Donate module, it does not require that products be donations. Any Commerce Product type will work.
Drupal Commerce - http://drupal.org/project/commerce
Installation and Configuration
Installation Screencast: http://www.youtube.com/watch?v=5AHJi8J88uQ
- Install the module as usual.
- Go to Structure > Content Types, and click Manage Fields next to the content type you want to display goals on. This will probably be the same one you are using as a Product Display. ("Product" or "Donation", for example)
- Add a new field of type "Price". This will be used to hold the goal total.
- If you don't already have a field of Product Reference type on the content type, add a field of that type, as well. This will be used to store references to the products that contribute towards the goal. (If this content type is set up as a Product Display, you should already have a Product Reference type field here, so you can skip this step.)
- Go the Manage Display tab for this content type, make sure that your Goal field is not hidden, and then set the Format for it to "Commerce Goal Progress Bar".
- Click the gear icon on the right to set the Product Reference Field to the field from step 4. Click Update, then Save.
- At this point, you can add a goal amount to nodes of this type, select the products in the product reference, and a progress bar will be displayed in the node view that shows the total of all orders of the linked products.
- To change which order statuses are considered "complete" and should contribute towards the goal: Go to Store > Configuration > Goals.
- To change the design of the progress bar:
- You can override the CSS in a custom theme, or by using a module like CSS Injector. (http://drupal.org/project/css_injector)
- To change the HTML output, you can override the template file: