Exemple #1
0
 } else {
     $availableDates = "After " . $coupon->getStartDate(true);
 }
 switch ($coupon->getQuantity()) {
     case "-1":
     case "":
         $quantityDescription = number_format($item->quantity_used) . " used";
         break;
     default:
         $quantityDescription = number_format($item->quantity_used) . " of " . number_format($coupon->getQuantity()) . " used ";
         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";
     }
 }
Exemple #2
0
echo $editable;
?>
  type="text" value='<?php 
echo strtoupper($coupon->getCouponCode());
?>
' />
			</td>
		</tr>
		<tr>
			<td width="140">Discount*</td>
			<td>
				<input id="mm_coupon_value" <?php 
echo $editable;
?>
 type="text" value='<?php 
echo $coupon->getCouponValue();
?>
' style="width:85px;" />
				<select id="mm_coupon_type" <?php 
echo $editable;
?>
 onchange="mmjs.typeChangeHandler();">
					<option value='<?php 
echo MM_Coupon::$TYPE_PERCENTAGE;
?>
' <?php 
echo $coupon->getCouponType() == MM_Coupon::$TYPE_PERCENTAGE ? "selected" : "";
?>
>% Off</option>	
					<option value='<?php 
echo MM_Coupon::$TYPE_DOLLAR;