$prod = new MM_Product(); $selectedProds = array(); $id = 0; if (isset($p->id)) { $id = $p->id; } $coupon = new MM_Coupon($id); $prods = $coupon->getProducts(); if (!$coupon->isValid()) { $coupon->setStartDate(Date("m/d/Y")); } $editable = ""; if (MM_Coupon::isBeingUsed($coupon->getId())) { $editable = "disabled='disabled'"; } $products = MM_HtmlUtils::createCheckboxGroup(MM_Product::getAll(), "mm_products", $prods); ?> <div id="mm-coupons-container"> <table cellspacing="10"> <tr> <td width="140">Name*</td> <td><input type='hidden' id='id' value='<?php echo $coupon->getId(); ?> ' /> <input id="mm_coupon_name" type="text" value='<?php echo $coupon->getCouponName(); ?> ' style='width:300px;' /> </td> </tr>
$obj->id = "at_" . $id; $obj->value = $name; $obj->image = MM_Utils::getAccessIcon(MM_OrderItemAccess::$ACCESS_TYPE_BUNDLE, '', 'float:left; padding-right: 5px; padding-left: 5px;'); $options[$obj->id] = $obj; $rows[] = $obj; if (isset($selectedTypes[$obj->id])) { $showRows[] = $obj; } } $maxCheckboxLength = 18; $maxHeaderLength = 14; $maxPostLength = 25; $maxPostLengthPlus = $maxPostLength + 20; $viewDeliveryAccessTypes = MM_HtmlUtils::createCheckboxGroup($options, "view_schedules[]", $selectedTypes, null, "", null, $maxCheckboxLength); $copyAccessTypesFrom = MM_HtmlUtils::createCheckboxGroup($options, "copy_schedules_from", $selectedFromCopy, "", null, "", $maxCheckboxLength, true); $copyAccessTypesTo = MM_HtmlUtils::createCheckboxGroup($options, "copy_schedules_to", $selectedToCopy, "", null, "", $maxCheckboxLength, true); //style $color = "#666"; $headerBackgroundColor = "#D8D8D8"; $bodyBackgroundColor = ""; $bodyBorderColor = "#BBB"; $bodyColor = '#666'; $headerHeight = "20px"; $alternateColumnColor = "#C0DFFF"; $headerBorderColor = "#666"; $cellMarginInt = 2; $cellMargin = $cellMarginInt . "px;"; $col1Width = 50; $col2Width = 180; $spaceForTypes = 400; $tableWidth = $spaceForTypes + $col1Width + $col2Width;