Example #1
0
   			<?php 
$totalPayments = $user->getTotalPayments();
$totalRefunds = $user->getTotalRefunds();
$totalLCV = $totalPayments - $totalRefunds;
$lcvDescription = "";
echo "<span style='margin-left: 5px; background-color:#fff; padding: 2px 5px 6px; border-radius: 3px; font-size: .9em; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);'>";
echo "<span style='color:#888'><abbr title=\"Lifetime Customer Value\">LCV</abbr></span> ";
if ($totalPayments > 0 && $totalRefunds > 0) {
    $lcvDescription .= _mmf($totalPayments) . " Paid";
    if ($totalRefunds > 0) {
        $lcvDescription .= " - ";
        $lcvDescription .= _mmf($totalRefunds) . " Refunded";
    }
    $lcvDescription .= " = " . _mmf($totalLCV) . " LCV";
}
echo "<span style='color:#9c3;'><abbr title=\"{$lcvDescription}\">" . _mmf($totalLCV) . "</abbr></span>";
echo "</span>";
?>
   		</h3>
   		<p>
   			<?php 
echo MM_Utils::getIcon('user', 'blue', '1.2em', '1px', "Membership Level", "margin-right:8px;");
if ($user->isImported()) {
    echo MM_Utils::getIcon('sign-in', 'blue', '1.2em', '1px', "Membership Level (Member Imported)", "margin-right:8px;");
}
echo $user->getMembershipName();
$appliedBundles = $user->getAppliedBundleNames();
if (!empty($appliedBundles)) {
    echo MM_Utils::getIcon('cubes', 'yellow', '1.2em', '1px', "Bundles", "margin-left:15px;");
    echo $appliedBundles;
}
Example #2
0
?>
	</div>
	
	<div style='margin:10px 0px 5px;'>
		<label>
			<input id="mm_postfix_iso_to_currency" name="mm_postfix_iso_to_currency" value='1' type="checkbox" <?php 
echo $postfixIsoToCurrency == "1" ? "checked" : "";
?>
 />
			Append the currency code after the amount (ie. $100.00 becomes $100.00 USD)
		</label>
	</div>
	
	<div style="margin-top:15px;">
		Sample format: <span style="font-family:courier; font-size:14px; margin-right:5px;"><?php 
echo _mmf(12345.67);
?>
</span>
		
		<a href="#" onclick="showCurrencyFormat()" style="font-size:11px;">incorrect format?</a>
	</div>
	<div id="mm-currency-format" style="display:none;" title="Currency Format">
		<p style="font-size:14px; line-height:20px;">
		We do our best to ensure that every currency uses the most accepted format. If you find that your currency isn't formatted 
		in the most accepted way, please let us know and we'll update it. 
		</p>
		
		<p style="font-size:14px; line-height:20px;">
		Just <strong><a href="http://membermouse.uservoice.com/knowledgebase/articles/417246" target="_blank">send us an email</a></strong> and 
		let us know the <strong>name of your currency</strong> and how your currency should be formatted by sending us a <strong>sample formatted 
		number</strong> (i.e. $12,345.67 or &pound;12,345.67).
Example #3
0
 */
$view = new MM_ShippingMethodsView();
$dataGrid = new MM_DataGrid($_REQUEST, "id", "asc", 10);
$data = $view->getViewData($dataGrid);
$dataGrid->setTotalRecords($data);
$dataGrid->width = "500px;";
$dataGrid->recordName = "shipping method";
$rows = array();
$headers = array('name' => array('content' => 'Name'), 'rate' => array('content' => 'Rate'), 'actions' => array('content' => 'Actions'));
foreach ($data as $key => $item) {
    // Actions
    $editActionUrl = 'onclick="mmjs.edit(\'mm-shipping-dialog\', {id:' . $item->id . ',mm_setting_type:\'shipping\'}, 300,195)"';
    $deleteActionUrl = 'onclick="mmjs.remove(\'' . $item->id . '\')"';
    $actions = MM_Utils::getEditIcon("Edit Shipping Method", '', $editActionUrl);
    $actions .= MM_Utils::getDeleteIcon("Delete Shipping Method", 'margin-left:5px;', $deleteActionUrl);
    $rate = floatval($item->rate) >= 0 ? _mmf($item->rate, $item->currency) : MM_NO_DATA;
    $rows[] = array(array('content' => MM_Utils::getIcon('key', 'yellow', '1.2em', '1px', MM_ShippingMethod::$FLATRATE_SHIPPING . "-{$item->id}", "margin-right:2px;") . " <span title='ID [" . $item->id . "]'>" . $item->option_name . "</span>"), array('content' => $rate), array('content' => $actions));
}
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No shipping methods.</i></p>";
}
?>
<div class="mm-wrap">
	<div class="mm-button-container">
		<a onclick="mmjs.create('mm-shipping-dialog', 300,195)" class="mm-ui-button green"><?php 
echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
?>
 Create Shipping Method</a>
    $affiliateId = MM_NO_DATA;
    $subAffiliateId = MM_NO_DATA;
    if (!empty($item->affiliate_id)) {
        $affiliateId = $item->affiliate_id;
    }
    if (!empty($item->sub_affiliate_id)) {
        $subAffiliateId = $item->sub_affiliate_id;
    }
    if ($item->is_test) {
        $transactionTypeIcons .= MM_Utils::getIcon('flask', 'grey', '1.3em', '2px', "Test Transaction", "padding-left:4px;");
    }
    // build datagrid row
    $row = array();
    $row[] = array('content' => $transactionTypeIcons);
    $row[] = array('content' => MM_Utils::dateToLocal($item->transaction_date));
    $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_TRANSACTION_HISTORY) . "&user_id={$item->user_id}'>{$item->order_number}</a>");
    $row[] = array('content' => _mmf($item->transaction_amount, $item->currency));
    $row[] = array('content' => $fullName);
    $row[] = array('content' => "<a href='" . MM_ModuleUtils::getUrl(MM_MODULE_MANAGE_MEMBERS, MM_MODULE_MEMBER_DETAILS_GENERAL) . "&user_id={$item->user_id}'>" . MM_Utils::abbrevString($item->user_email, 30) . "</a>");
    $row[] = array('content' => "<span style='font-family:courier; font-size:11px;'>" . MM_Utils::abbrevString($affiliateId, 15) . "</span>");
    $row[] = array('content' => "<span style='font-family:courier; font-size:11px;'>" . MM_Utils::abbrevString($subAffiliateId, 15) . "</span>");
    $row[] = array('content' => MM_Utils::abbrevString($item->description, 30));
    $datagridRows[] = $row;
}
$dataGrid->setHeaders($headers);
$dataGrid->setRows($datagridRows);
$dgHtml = $dataGrid->generateHtml();
if (empty($dgHtml)) {
    $dgHtml = "<p><i>No transactions found.</i></p>";
}
echo $dgHtml;
Example #5
0
                            case MM_Event::$PAYMENT_RECEIVED:
                            case MM_Event::$PAYMENT_REBILL:
                                $discountDescription = "DISCOUNTS APPLIED\n";
                                if ($hasCoupon) {
                                    $couponAmount = abs($params[MM_ActivityLog::$PARAM_BILLING_ORDER_DISCOUNT]);
                                    if ($hasProration) {
                                        $couponAmount -= $prorationAmount;
                                    }
                                    $discountDescription .= "Coupon: " . _mmf($couponAmount) . " ({$couponName})\n";
                                }
                                if ($hasProration) {
                                    $discountDescription .= "Proration: " . _mmf($prorationAmount) . "\n";
                                }
                                if ($hasCoupon && $hasProration) {
                                    $discountDescription .= "---------------------\n";
                                    $discountDescription .= "Total Discount: " . _mmf($params[MM_ActivityLog::$PARAM_BILLING_ORDER_DISCOUNT]);
                                }
                                $details .= MM_Utils::getDiscountIcon($discountDescription, "margin-left:5px;");
                                break;
                        }
                    }
                }
                break;
            case MM_ActivityLog::$EVENT_TYPE_EMAIL:
                $eventType = MM_Utils::getIcon('paper-plane-o', 'green', '1.2em', '1px', 'Email sent');
                if (!is_null($params)) {
                    if (isset($params[MM_ActivityLog::$PARAM_EMAIL_SUBJECT]) && isset($params[MM_ActivityLog::$PARAM_EMAIL_TO_ADDRESS])) {
                        $details = "Email sent to <span style='font-family:courier;'>{$params[MM_ActivityLog::$PARAM_EMAIL_TO_ADDRESS]}</span>";
                        if (isset($params[MM_ActivityLog::$PARAM_EMAIL_BODY]) && isset($params[MM_ActivityLog::$PARAM_EMAIL_FROM_ADDRESS])) {
                            ?>
	<div id="mm-view-info-<?php