function uc_recurring_order_form_uc_recurring_admin_edit_form_alter in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 modules/uc_recurring_order/uc_recurring_order.module \uc_recurring_order_form_uc_recurring_admin_edit_form_alter()
Alter the Edit screen to show the products in the order.
File
- modules/
uc_recurring_order/ uc_recurring_order.module, line 339 - Provides a way to duplicate entire orders.
Code
function uc_recurring_order_form_uc_recurring_admin_edit_form_alter(&$form, $form_state) {
$rfid = $form['#parameters'][2];
$fee = uc_recurring_fee_user_load($rfid);
if ($fee->data['uc_recurring_order']) {
foreach ($fee->data['uc_recurring_order']['products'] as $product) {
$row = array(
'title' => $product->title,
'qty' => $product->qty,
'price' => $product->price,
);
$rows[] = $row;
}
$form['products'] = array(
'#type' => 'fieldset',
'#title' => t('Products'),
'#description' => theme('table', array(
'Product',
'Quantity',
'Price',
), $rows),
'#weight' => -10,
);
}
}