Ejemplo n.º 1
0
<?php

/**
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
$profile = new MM_CommissionProfile($p->id);
$initialPaymentChecked = $profile->initialCommissionEnabled() ? "checked" : "";
$reverseCommissionsChecked = $profile->doReverseCommissions() ? "checked" : "";
$defaultCommissionSelected = $profile->getRebillCommissionType() == MM_CommissionProfile::$COMMISSION_TYPE_DEFAULT ? "checked" : "";
$customCommissionSelected = $profile->getRebillCommissionType() == MM_CommissionProfile::$COMMISSION_TYPE_DEFAULT ? "" : "checked";
$flatrateSelected = $profile->getRebillCommissionType() == MM_CommissionProfile::$COMMISSION_TYPE_FLATRATE ? "selected" : "";
$percentSelected = $profile->getRebillCommissionType() == MM_CommissionProfile::$COMMISSION_TYPE_PERCENT ? "selected" : "";
$limitRebillsChecked = $profile->doLimitRebills() ? "checked" : "";
?>
<div id="mm-form-container">
	<input id='id' type='hidden' value='<?php 
if ($profile->getId() != 0) {
    echo $profile->getId();
}
?>
' />
	<input id='mm-enable-initial-commission' type='hidden' />
	<input id='mm-enable-rebill-commissions' type='hidden' />
	<input id='mm-limit-rebill-commissions' type='hidden' />
	<input id='mm-enable-reverse-commissions' type='hidden' />
	<input id='mm-rebill-commission-type' type='hidden' />
				
	<table cellspacing="10">
		<tr>
Ejemplo n.º 2
0
<?php

/**
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
$view = new MM_CommissionProfilesView();
$dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10);
$data = $view->getData($dataGrid);
$dataGrid->setTotalRecords($data);
$dataGrid->recordName = "commission profile";
$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 {