예제 #1
0
파일: coupons.php 프로젝트: huynp/Critical
         break;
 }
 $description = "";
 switch ($coupon->getCouponType()) {
     case MM_Coupon::$TYPE_PERCENTAGE:
         $description = "<span style='font-family:courier;'>" . $coupon->getCouponValue() . "%</span> off";
         break;
     case MM_Coupon::$TYPE_DOLLAR:
         $description = "<span style='font-family:courier;'>" . $coupon->getCouponValue(true) . "</span> off";
         break;
     case MM_Coupon::$TYPE_FREE:
         $description = "<span style='font-family:courier;'>FREE</span>";
         break;
 }
 if ($coupon->getCouponType() != MM_Coupon::$TYPE_FREE) {
     if ($coupon->getRecurringBillingSetting() == "all") {
         $description .= " all charges";
     } else {
         $description .= " the first charge";
     }
 }
 $editActionUrl = 'onclick="mmjs.edit(\'mm-coupons-dialog\', \'' . $coupon->getId() . '\', 620, 615)"';
 $deleteActionUrl = 'onclick="mmjs.remove(\'' . $coupon->getId() . '\')"';
 $archiveActionUrl = 'onclick="mmjs.archive(\'' . $coupon->getId() . '\')"';
 $unarchiveActionUrl = 'onclick="mmjs.unarchive(\'' . $coupon->getId() . '\')"';
 $actions = MM_Utils::getEditIcon("Edit Coupon", '', $editActionUrl);
 $archiveActions = "";
 if (!MM_Coupon::isBeingUsed($coupon->getId())) {
     $actions .= MM_Utils::getDeleteIcon("Delete Coupon", 'margin-left:5px;', $deleteActionUrl);
 } else {
     $actions .= MM_Utils::getDeleteIcon("This coupon is currently being used and cannot be deleted.", 'margin-left:5px;', '', true);
예제 #2
0
			</td>
		</tr>
		<tr>
			<td colspan="2">
			<div style="width: 98%; margin-top: 8px;" class="mm-divider"></div>
			</td>
		</tr>
		<tr>
			<td width="140" style="vertical-align:top;">Subscription Options</td>
			<td>
				<div id="mm_subscription_options_section">
					<p style="margin:0px 0px 5px 0px;"><input id="mm_recurring_setting_first" <?php 
echo $editable;
?>
 name="mm_recurring_setting" type="radio" value='first' <?php 
echo $coupon->getRecurringBillingSetting() == "first" ? "checked" : "";
?>
 /> Apply discount to the first charge only</p>
					<p style="margin:10px 0px 0px 0px;"><input id="mm_recurring_setting_all" <?php 
echo $editable;
?>
 name="mm_recurring_setting" type="radio" value='all' <?php 
echo $coupon->getRecurringBillingSetting() == "all" ? "checked" : "";
?>
 /> Apply discount to all charges</p>
				</div>
			</td>
		</tr>
		<tr>
			<td colspan="2">
			<div style="width: 98%; margin-top: 8px;" class="mm-divider"></div>