Beispiel #1
0
    $llProduct = "{$item->limelight_product_name} [{$item->limelight_product_id}]";
    $llProduct .= '<a href="javascript:mmjs.getLimeLightProductDescription(\'' . $item->limelight_product_id . '\');" style="margin-left: 5px; cursor:pointer;" title="View Lime Light Product Info">' . MM_Utils::getIcon("info-circle", "blue", "1.3em", "2px;") . '</a>';
    $rows[] = array(array('content' => "{$item->limelight_campaign_name} [{$item->limelight_campaign_id}]"), array('content' => $llProduct), array('content' => $mmProductName), array('content' => $mmProductDescription), array('content' => $actions));
}
$headers = array('limelight_campaign_name' => array('content' => '<a onclick="mmjs.sort(\'limelight_campaign_name\');" href="#">Lime Light Campaign</a>'), 'limelight_product_name' => array('content' => '<a onclick="mmjs.sort(\'limelight_product_name\');" href="#">Lime Light Product</a>'), 'membermouse_product_id' => array('content' => 'MemberMouse Product'), 'membermouse_product_desc' => array('content' => 'Product Description'), 'actions' => array('content' => 'Actions', 'attr' => 'style="width:50px;"'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><em>No product mappings.</em></p>";
}
?>
<div class="mm-wrap">
	<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$PYMT_SERVICE_LIMELIGHT)) {
    $products = MM_Product::getAll();
    if (count($products) > 0) {
        $unmappedProducts = MM_LimeLightProduct::getUnmappedProducts();
        if (count($unmappedProducts) > 0) {
            ?>
				<div class="mm-button-container">
					<a onclick="mmjs.create('mm-limelight-products-dialog', 550, 335)" class="mm-ui-button green"><?php 
            echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
            ?>
 Create Product Mapping</a>
				</div>
			
				<div class="clear"></div>
				<?php 
        }
        ?>
Beispiel #2
0
$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>