function uc_discounts_get_discount_amount_for_order in Ubercart Discounts (Alternative) 7.2
Same name and namespace in other branches
- 6.2 uc_discounts/uc_discounts.module \uc_discounts_get_discount_amount_for_order()
Get total discount amount for an order.
Parameters
object $order: Loaded ubercart order object.
Return value
float Total amount of discount for order.
2 calls to uc_discounts_get_discount_amount_for_order()
- uc_discounts_form_uc_cart_view_form_alter in uc_discounts/
uc_discounts.module - Implements hook_form_FORM_ID_alter().
- uc_discounts_uc_checkout_pane_cart in uc_discounts/
uc_discounts.module - Callback that replaces the stock ubercart checkout cart pane.
File
- uc_discounts/
uc_discounts.module, line 2013
Code
function uc_discounts_get_discount_amount_for_order($order) {
$results = uc_discounts_get_discounts_for_order($order);
return $results['total_discount_amount'];
}