function discounted_price_handler::render in Ubercart Discounts (Alternative) 6.2
Same name and namespace in other branches
- 7.2 product_price_alterer_field/includes/discounted_price_handler.inc \discounted_price_handler::render()
File
- product_price_alterer_field/
includes/ discounted_price_handler.inc, line 15
Class
- discounted_price_handler
- Renders a discounted price field.
Code
function render($values) {
$node = node_load($values->{$this->aliases['nid']});
$discounted_price = uc_discounts_get_discounted_price_for_product($node);
if (is_null($discounted_price)) {
return NULL;
}
$output = theme('product_discounted_price', $node, uc_currency_format($discounted_price));
add_product_price_altering_css($node);
add_product_price_altering_javascript($node);
return check_plain($output);
}