* @package ActivityRez * @subpackage Web Booking Engine */ global $wb; function getChildDisplayPrice( $child ){ if(isset($child['display_price']) && !empty($child['display_price']) ){ return __("Prices starting at ",'arez').currencyFormat($child['display_price']); } if(isset($child['prices']) && is_array( $child['prices']) && count($child['prices'])){ $low = null; foreach( $child['prices'] as $price ){ //empty price continue if(!isset($price['amount']) || $price['amount'] < 1 ) continue; if(isset($price['guest_type']) && preg_match('/adult/i',$price['guest_type']) > 0 ) return currencyFormat($price['amount']); if(!$low || $price['amount'] < $low) $low = $price['amount']; } return currencyFormat($low); } return __("Click for prices",'arez'); } function currencyFormat( $amount ){ global $wb; //for now just hard code this return 'US$'.number_format($amount); } function getChildURL( $child ){ global $wb; return $wb['wb_url'] .'/'. $child['slug']; } $activityDefault = array( 'title'=>'', 'activityID'=>'', 'duration'=>'', 'description'=>'', 'destination'=>'', 'children'=>'', 'instructions'=>'', 'address'=>'' ); if(!isset($wb['activity'])){ $wb['activity'] = array(); } $wb['activity'] = array_merge($activityDefault,$wb['activity']); /* */ ?>