ID); else $user = null; $manager_data = $manager_id != 0?get_user_by('ID', $manager_id):null; $commission_type = 'order_level'; if($manager_data){ $commission_type = $manager_data->zacctmgr_commission_type?$manager_data->zacctmgr_commission_type:'order_level'; } $customer_commission_type = 'order_level'; if($user){ $customer_commission_type = $user->zacctmgr_commission_type?$user->zacctmgr_commission_type:'order_level'; } ?>
/>
/>
/>
zacctmgr_commission_order_count) && (int)$user->zacctmgr_commission_order_count > 1)?(int)$user->zacctmgr_commission_order_count:1; $order1 = ''; $value1 = ''; $value2 = ''; $type1 = ''; $type1 .= ''; $type2 = ''; $type2 .= ''; $style_fixed = 'style="display: block;"'; $style_percentage = 'style="display: none;"'; if(isset($user->zacctmgr_commission_new_type) && $user->zacctmgr_commission_new_type == 'percentage'){ $style_fixed = 'style="display: none;"'; $style_percentage = 'style="display: block;"'; } $apply1 = ''; $apply1 .= '
'; $apply1 .= '

Order Total

'; $zacctmgr_commission_new_exclude_options = isset($user->zacctmgr_commission_new_exclude_options)?$user->zacctmgr_commission_new_exclude_options:[]; $apply1 .= '
'; foreach(ZACCTMGR_EXCLUDE_OPTIONS as $key => $label){ $extra = in_array($key, $zacctmgr_commission_new_exclude_options)?'checked="checked"':''; $apply1 .= '
'; $apply1 .= ''; $apply1 .= ''; $apply1 .= '
'; } $apply1 .= '
'; $apply1 .= '
'; $apply1 .= '
'; $apply1 .= '

Fixed Value Amount

'; $apply1 .= '
'; $style_fixed = 'style="display: block;"'; $style_percentage = 'style="display: none;"'; if(isset($user->zacctmgr_commission_existing_type) && $user->zacctmgr_commission_existing_type == 'percentage'){ $style_fixed = 'style="display: none;"'; $style_percentage = 'style="display: block;"'; } $apply2 = ''; $apply2 .= '
'; $apply2 .= '

Order Total

'; $zacctmgr_commission_existing_exclude_options = isset($user->zacctmgr_commission_existing_exclude_options)?$user->zacctmgr_commission_existing_exclude_options:[]; $apply2 .= '
'; foreach(ZACCTMGR_EXCLUDE_OPTIONS as $key => $label){ $extra = in_array($key, $zacctmgr_commission_existing_exclude_options)?'checked="checked"':''; $apply2 .= '
'; $apply2 .= ''; $apply2 .= ''; $apply2 .= '
'; } $apply2 .= '
'; $apply2 .= '
'; $apply2 .= '
'; $apply2 .= '

Fixed Value Amount

'; $apply2 .= '
'; ?>
Commission Rates Apply to Value Type Calculate By
New Orders
Existing Orders
Commission Rates Apply to Value Type Calculate By
New Orders zacctmgr_commission_order_count) && (int)$manager_data->zacctmgr_commission_order_count > 0)?(int)$manager_data->zacctmgr_commission_order_count:1; ?> zacctmgr_commission_new_value?$manager_data->zacctmgr_commission_new_value:''; ?> zacctmgr_commission_new_type?ucfirst($manager_data->zacctmgr_commission_new_type):''; ?> zacctmgr_commission_new_type) && $manager_data->zacctmgr_commission_new_type == 'percentage'){ if($manager_data->zacctmgr_commission_new_exclude_options){ foreach($manager_data->zacctmgr_commission_new_exclude_options as $key){ echo ZACCTMGR_EXCLUDE_OPTIONS[$key].'
'; } }else{ echo 'Order Total'; } }else{ echo 'Fixed Value Amount'; } ?>
Existing Orders zacctmgr_commission_existing_value?$manager_data->zacctmgr_commission_existing_value:''; ?> zacctmgr_commission_existing_type?ucfirst($manager_data->zacctmgr_commission_existing_type):''; ?> zacctmgr_commission_existing_type) && $manager_data->zacctmgr_commission_existing_type == 'percentage'){ if($manager_data->zacctmgr_commission_existing_exclude_options){ foreach($manager_data->zacctmgr_commission_existing_exclude_options as $key){ echo ZACCTMGR_EXCLUDE_OPTIONS[$key].'
'; } }else{ echo 'Order Total'; } }else{ echo 'Fixed Value Amount'; } ?>