Beispiel #1
0
        $lastAccessAssociationType = "bundle";
        $lastAccessAssociationId = $associatedBundle->getId();
    } else {
        $lastAccessAssociationType = "";
        $lastAccessAssociationId = "";
    }
}
$hasBeenPurchased = false;
if ($product->isValid()) {
    $hasBeenPurchased = MM_Product::hasBeenPurchased($product->getId());
}
$periodsArr = array('days' => 'days', 'weeks' => 'weeks', 'months' => 'months', 'years' => 'years');
$trialFrequencyList = MM_HtmlUtils::generateSelectionsList($periodsArr, $product->getTrialFrequency());
$rebillFrequencyList = MM_HtmlUtils::generateSelectionsList($periodsArr, $product->getRebillFrequency());
$membershipList = MM_HtmlUtils::getMemberships($associatedMembership->getId(), false, MM_MembershipLevel::$SUB_TYPE_PAID);
$bundleList = MM_HtmlUtils::getBundles($associatedBundle->getId(), false, MM_Bundle::$SUB_TYPE_PAID);
$commissionProfileList = MM_HtmlUtils::getCommissionProfilesList($product->getCommissionProfileId());
function renderFieldOption($optionId, $affiliateId, $profileId)
{
    ?>
	<div id="mm-partner-container-<?php 
    echo $optionId;
    ?>
">
	<input id="mm-partner-<?php 
    echo $optionId;
    ?>
" type="text" size="15" class="field-option" value="<?php 
    echo $affiliateId;
    ?>
" />
            ?>
		
		<?php 
            if ($user->getStatus() != MM_Status::$CANCELED) {
                ?>
		<div style='margin-top:15px;'>
			<input type="submit" name='membership_update_submit' class="mm-ui-button blue" value="Update Membership Properties" >	
		</div>
		<?php 
            }
            ?>
	</form>
	
	<!-- MANAGE BUNDLES -->
	<?php 
            $bundleOptions = MM_HtmlUtils::getBundles(null, true);
            if (!empty($bundleOptions)) {
                ?>
	<div style="width: 800px; margin-top: 15px;" class="mm-divider"></div>
	
	<p><span class="mm-section-header">Bundles</span></p>
			
	<div style="margin-bottom:20px;">
		<select id="bundle-selector" name="bundle-seletor">
		<?php 
                echo $bundleOptions;
                ?>
		</select>
		<a onclick="mmjs.applyBundle('<?php 
                echo $user->getId();
                ?>
    ?>
		<tr>
			<td colspan="2">
			<div style="width: 600px; margin-top: 8px;" class="mm-divider"></div>
			</td>
		</tr>
		
		<tr>
			<td>Bundles<?php 
    echo MM_Utils::getInfoIcon("Select the bundles that members with this membership level should automatically get access to.");
    ?>
</td>
			<td>
				<select id="mm-bundles[]" size="5" multiple="multiple" style="width:100%">
				<?php 
    echo MM_HtmlUtils::getBundles($membership->getBundles());
    ?>
				</select>
				
				<span style="font-size:11px">
					Select Multiple Bundles: 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>
			</td>
		</tr>
		<?php 
}
?>
		
		<tr>
?>
	</select>
	</p>
</div>

<div id="mm_bundles_status_change_attributes" style="display: none;">
	<p style="margin-left: 20px;">
	When bundle is...<br/>
	<select id="mm-bundle-selector">
		<option value="">Any Bundle</option>
	<?php 
$bundleId = "";
if (is_array($eventAttributes) && isset($eventAttributes["bundle_id"])) {
    $bundleId = $eventAttributes["bundle_id"];
}
echo MM_HtmlUtils::getBundles($bundleId);
?>
	</select>
	</p>
	
	<p style="margin-left: 20px;">
	When bundle status is...<br/>
	<select id="mm-bundle-status-selector">
		<option value="">Any Status</option>
	<?php 
$statusId = "";
if (is_array($eventAttributes) && isset($eventAttributes["status_id"])) {
    $statusId = $eventAttributes["status_id"];
}
echo MM_HtmlUtils::generateSelectionsList(MM_Status::getStatusTypesList(), $statusId);
?>
Beispiel #5
0
				<tr>
					<td>Membership Levels</td>
					<td>
						<select id="mm-memberships[]" size="6" multiple="multiple" style="width:300px;">
						<?php 
echo MM_HtmlUtils::getMemberships($selectedMembership);
?>
						</select>
					</td>
				</tr>
				<tr>
					<td>Bundles</td>
					<td>
						<select id="mm-bundles[]" size="6" multiple="multiple" style="width:300px;">
						<?php 
echo MM_HtmlUtils::getBundles($selectedBundle);
?>
						</select>
					</td>
				</tr>
			</table>
			</td>
			
			<!-- RIGHT COLUMN -->
			<td valign="top">
			<table cellspacing="5">
				<tr>
					<td>Membership Status</td>
					<td>
						<select id="mm-member-status-types[]" size="5" multiple="multiple" style="width:120px;">
						<?php 
Beispiel #6
0
 public function editPostsFilter()
 {
     global $post;
     $selectedMembership = isset($_GET["member_types"]) ? $_GET["member_types"] : "";
     $selectedBundle = isset($_GET["access_tags"]) ? $_GET["access_tags"] : "";
     $select = "<select name='member_types'>\n<option value=''>Show all Membership Levels</a>";
     $select .= MM_HtmlUtils::getMemberships($selectedMembership);
     $select .= "</select>";
     $select .= "<select name='access_tags'>\n<option value=''>Show all Bundles</a>";
     $select .= MM_HtmlUtils::getBundles($selectedBundle);
     $select .= "</select>";
     if (isset($post->post_type) && $post->post_type == 'page' || isset($_GET["post_type"]) && $_GET["post_type"] == 'page') {
         $cpt = isset($_GET["core_page_types"]) ? $_GET["core_page_types"] : "";
         $select .= "<select name='core_page_types'>\n <option value=''>Show all Pages</a>";
         $select .= "<option value='core_pages' " . ($cpt == "core_pages" ? "selected" : "") . ">Show only MM Core Pages</a>";
         $select .= "<option value='wp_pages' " . ($cpt == "wp_pages" ? "selected" : "") . ">Show only Standard Pages</a>";
         $select .= "</select>";
     }
     echo $select;
 }