Index: branches/5.1.x/units/orders/orders_event_handler.php =================================================================== diff -u -r14362 -r14507 --- branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 14362) +++ branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 14507) @@ -1,6 +1,6 @@ Application->getUnitOption('pr', 'TableName'); $pricing_idfield = $this->Application->getUnitOption('pr', 'IDField'); - + /* TODO check on implementation $sql = 'SELECT AccessDuration, AccessUnit, DurationType, AccessExpiration FROM %s WHERE %s = %s'; */ @@ -930,7 +930,7 @@ /* TODO check on implementation (code from customization healtheconomics.org) $item_data['DurationType'] = $pricing_info['DurationType']; - $item_data['AccessExpiration'] = $pricing_info['AccessExpiration']; + $item_data['AccessExpiration'] = $pricing_info['AccessExpiration']; */ $item_data['Duration'] = $pricing_info['AccessDuration'] * $unit_secs[ $pricing_info['AccessUnit'] ]; @@ -1803,12 +1803,12 @@ /* @var $quote_engine_collector ShippingQuoteCollector */ $shipping_info = unserialize($shipping_info); - $shipping_quote_engine = $quote_engine_collector->GetClassByType($shipping_info, 1); + $sqe_class_name = $quote_engine_collector->GetClassByType($shipping_info, 1); } // try to create usps order - if (($object->GetDBField('ShippingType') == 0) && ($shipping_quote_engine !== false)) { - $shipping_quote_engine =& $this->Application->recallObject($shipping_quote_engine); + if (($object->GetDBField('ShippingType') == 0) && ($sqe_class_name !== false)) { + $shipping_quote_engine =& $this->Application->recallObject($sqe_class_name); /* @var $shipping_quote_engine ShippingQuoteEngine */ $ret = $shipping_quote_engine->MakeOrder($object); @@ -3539,14 +3539,14 @@ foreach ($shipping_ids as $package => $id) { // try to validate $shipping_types[$package] = $last_shippings[$package][$id]; - $shipping_quote_engine = $quote_engine_collector->GetClassByType($shipping_types, $package); + $sqe_class_name = $quote_engine_collector->GetClassByType($shipping_types, $package); - if (($object->GetDBField('ShippingType') == 0) && ($shipping_quote_engine !== false) && in_array($template, $shipping_templates)) { - $shipping_quote_engine =& $this->Application->recallObject($shipping_quote_engine); + if (($object->GetDBField('ShippingType') == 0) && ($sqe_class_name !== false) && in_array($template, $shipping_templates)) { + $shipping_quote_engine =& $this->Application->recallObject($sqe_class_name); /* @var $shipping_quote_engine ShippingQuoteEngine */ // USPS related part - // TODO: remove USPS condition from here + // TODO: remove USPS condition from here // set first of found shippings just to check if any errors are returned $current_usps_shipping_types = unserialize($this->Application->RecallVar('current_usps_shipping_types')); $object->SetDBField('ShippingInfo', serialize( Array($package => $current_usps_shipping_types[$id])) );