}
/**
+ * Get line item purchase information.
+ *
+ * This function takes the input parameters and interprets out of it what has been purchased.
+ *
* @param $fields
+ * This is the output of the function CRM_Price_BAO_PriceSet::getSetDetail($priceSetID, FALSE, FALSE);
+ * And, it would make sense to introduce caching into that function and call it from here rather than
+ * require the $fields array which is passed from pillar to post around the form in order to pass it in here.
* @param array $params
+ * Params reflecting form input e.g with fields 'price_5' => 7, 'price_8' => array(7, 8)
* @param $lineItem
+ * Line item array to be altered.
* @param string $component
+ * This parameter appears to only be relevant to determining whether memberships should be auto-renewed.
+ * (and is effectively a boolean for 'is_membership' which could be calculated from the line items.)
*/
- public static function processAmount(&$fields, &$params, &$lineItem, $component = '') {
+ public static function processAmount($fields, &$params, &$lineItem, $component = '') {
// using price set
$totalPrice = $totalTax = 0;
$radioLevel = $checkboxLevel = $selectLevel = $textLevel = array();