Select Multiple Products: PC <code>ctrl + click</code> 
					Mac <code><img width="9" height="9" src="http://km.support.apple.com/library/APPLE/APPLECARE_ALLGEOS/HT1343/ks_command.gif" alt="Command key icon" data-hires="true">
(Command key) + click</code>
					</span>
					
					<br/><br/>
					<span style="font-size:11px;">
					Default Product<?php 
    echo MM_Utils::getInfoIcon("Customers can purchase any of the products above to sign up for this membership level. It's also possible for customers to sign up for the membership directly in which case they'll end up purchasing the default product. You can specify the default product below.");
    ?>
 
					</span>
					<br/>
						<select id='mm-default-product-id'  >
							<?php 
    if ($product->isValid() && $product->getId() > 0) {
        $products = $membership->getProductIds();
        $productsArr = array();
        if (is_array($products)) {
            foreach ($products as $pid) {
                $p = new MM_Product($pid);
                $productsArr[$pid] = $p->getName();
            }
            $selections = MM_HtmlUtils::generateSelectionsList($productsArr, $product->getId());
            if (empty($selections)) {
                echo "<option value=''>Select a product</option>";
            } else {
                echo $selections;
            }
        } else {
            echo "<option value=''>Select a product</option>";
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
?>
<style>
    #mm-dialog-container { height:100%; width:100%; border-collapse:collapse; }
    .mm-dialog-button-bar { width:100%; height:40px; text-align:right; }
</style>

<table id="mm-dialog-container">
<tr><td valign="top">
<div>
<?php 
$product = new MM_Product($p->productId);
if ($product->isValid()) {
    $context = new MM_Context();
    $context->setProduct($product);
    echo MM_SmartTagUtil::processContent($product->getPurchaseConfirmationMessage(), $context);
} else {
    echo "Invalid product ID '{$p->productId}'";
}
?>
</div>
</td></tr>

<tr><td valign="bottom" class="mm-dialog-button-bar">
	<a href="javascript:pymtutils_js.placeOrderCardOnFile(<?php 
echo $p->userId;
?>
, <?php 
示例#3
0
global $current_user;
$memberTypeId = $p->member_type_id;
$user = new MM_User($current_user->ID);
$userMemberType = new MM_MembershipLevel($user->getMembershipId());
$memberType = new MM_MembershipLevel($memberTypeId);
$costOfNewMemberType = "Free";
if (!$memberType->isFree()) {
    $product = new MM_Product($memberType->getDefaultProduct());
    $costOfNewMemberType = "\$" . $product->getPrice(true);
}
$refund = "N/A";
$refundFloat = 0;
$currentMembershipPrice = "Free";
if (!$userMemberType->isFree()) {
    $existingProduct = new MM_Product($userMemberType->getDefaultProduct());
    if ($existingProduct->isValid()) {
        $currentMembershipPrice = "\$" . $existingProduct->getPrice(true);
    }
}
?>
<input type='hidden' id='mm-member-type-id' value='<?php 
echo $memberTypeId;
?>
' />
<table style='font-size: 14px;'> 
<tr>
	<td style='font-size: 14px;'> 
		Are you sure you'd like to change your membership level from <?php 
echo $user->getMembershipName();
?>
 to  <?php