Пример #1
0
			<td colspan="2">
			<div style="width: 600px; margin-top: 8px;" class="mm-divider"></div>
			</td>
		</tr>
		
		<tr>
			<td>Commission Options</td>
			<td>	
				<input type='checkbox' id='mm-enable-initial-commission-checkbox' name='mm-enable-initial-commission-checkbox' <?php 
echo $initialPaymentChecked;
?>
 /> Enable commission on initial payment
				
				<p>
					<input type="checkbox" name="mm-enable-rebill-commissions-checkbox" id="mm-enable-rebill-commissions-checkbox" onclick="mmjs.renderRebillOptions()" <?php 
echo $profile->rebillCommissionsEnabled() ? "checked" : "";
?>
  /> Enable Rebill Commissions
				</p>
				
				<div style="margin-top:5px; margin-left:20px; display: none;" id='rebill_commission_options'>
					<?php 
$activeAffiliateProvider = MM_AffiliateProviderFactory::getActiveProvider();
if ($activeAffiliateProvider->supportsFeature(MM_AffiliateProviderFeatures::CUSTOM_REBILL_COMMISSIONS)) {
    ?>
					<p style="line-height:30px;" id="rebill_commission_type_selection">
						<input id="rebill_commission_selector" name="rebill_commission_selector" value='default' type="radio" <?php 
    echo $defaultCommissionSelected;
    ?>
 />
						Use same commission as initial payment 
Пример #2
0
$rows = array();
foreach ($data as $key => $item) {
    $profile = new MM_CommissionProfile($item->id);
    // Default Flag
    $defaultDescription = "Any commission profile can be marked as the default commission profile. The default commission profile is used when a customer purchases any product in MemberMouse. The default profile can be overridden by editing a product, going to the Commissions section and selecting another commission profile from the drop down.";
    if ($profile->isDefault()) {
        $defaultFlag = MM_Utils::getDefaultFlag("Default Commission Profile\n\n{$defaultDescription}", "", true, 'margin-right:5px;');
    } else {
        $defaultFlag = MM_Utils::getDefaultFlag("Set as Default Commission Profile\n\n{$defaultDescription}", "onclick='mmjs.setDefault(\"" . $item->id . "\")'", false, 'margin-right:5px;');
    }
    if ($profile->initialCommissionEnabled()) {
        $initialCommission = MM_Utils::getCheckIcon();
    } else {
        $initialCommission = MM_Utils::getCrossIcon();
    }
    if ($profile->rebillCommissionsEnabled()) {
        $rebillCommissions = MM_Utils::getCheckIcon() . " ";
        $rebillCommissions .= "<span style='font-family:courier;'>{$profile->getRebillConfigDescription()}</span>";
    } else {
        $rebillCommissions = MM_Utils::getCrossIcon();
    }
    if ($profile->doReverseCommissions()) {
        $doReverseCommissions = MM_Utils::getCheckIcon();
    } else {
        $doReverseCommissions = MM_Utils::getCrossIcon();
    }
    // Actions
    $editActionUrl = 'onclick="mmjs.edit(\'mm-commission-profiles-dialog\', \'' . $item->id . '\')"';
    $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"';
    $actions = MM_Utils::getEditIcon("Edit Commission Profile", '', $editActionUrl);
    if (!$profile->hasAssociations()) {