$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 } ?> <div style="width:95%;">
<?php /** * * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $limeLightProduct = new MM_LimeLightProduct($p->id); $limeLightService = MM_PaymentServiceFactory::getPaymentService(MM_PaymentService::$LIMELIGHT_SERVICE_TOKEN); ?> <div id="mm-form-container"> <table cellspacing="10"> <tr> <td width="150">MemberMouse Product</td> <td> <select name='mm_product_id' id='mm_product_id' onchange="mmjs.getMMProductDescription();"> <?php $unmappedProducts = MM_LimeLightProduct::getUnmappedProducts(); // add currently selected product if ($limeLightProduct->isValid()) { $product = new MM_Product($limeLightProduct->getMMProductId()); if ($product->isValid()) { $unmappedProducts[$limeLightProduct->getMMProductId()] = $product->getName(); } } echo MM_HtmlUtils::generateSelectionsList($unmappedProducts, $limeLightProduct->getMMProductId()); ?> </select> <div id="mm_product_description" style="margin-top:10px;"></div> </td>