Product Revenue Field

Categories

Component ID

1140766

Component name

Product Revenue Field

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

1079

Component created

Component changed

Component body

This module adds functionality to a "Number" CCK field attached to an Ubercart product. It calculates the total revenue generated by that product and saves it to the CCK number field every time a payment occurs in an order for that product.

The use case this was created for is a donation site where customers pick kids they want to donate the money for. The kids are "products", and we want to display the total revenue each kid has raised on the kids' product pages as well as in Views.

Dependencies:
Ubercart (uc_product, uc_order)
CCK (content, number)

Documentation:
Install and enable module like normal.
Go to the field settings form for your CCK number field.
Locate the "Product Revenue" fieldset.
Check the box.
Save the field setting form.
You may want to hide the CCK number field on the node edit page.