You are here

uc_coupon_handler_field_value.inc in Ubercart Discount Coupons 7.3

Views handler: Coupon value field.

File

views/uc_coupon_handler_field_value.inc
View source
<?php

/**
 * @file
 * Views handler: Coupon value field.
 */

/**
 * Return a coupon value as price or percentage.
 */
class uc_coupon_handler_field_value extends views_handler_field_numeric {
  function render($values) {
    $coupon = new stdClass();
    $coupon->value = $values->{$this->field_alias};
    $coupon->type = $values->{$this->aliases['type']};
    return theme('uc_coupon_discount', array(
      'coupon' => $coupon,
    ));
  }

}

Classes

Namesort descending Description
uc_coupon_handler_field_value Return a coupon value as price or percentage.