Exemplo n.º 1
0
    $rows[] = array(array('content' => $llShippingMethod), array('content' => $mmShippingMethodName), array('content' => $actions));
}
$headers = array('limelight_shipping_method_name' => array('content' => '<a onclick="mmjs.sort(\'limelight_shipping_method_name\');" href="#">Lime Light Shipping Method</a>'), 'membermouse_shipping_method_id' => array('content' => 'MemberMouse Shipping Method'), 'actions' => array('content' => 'Actions', 'attr' => 'style="width:50px;"'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><em>No shipping method mappings.</em></p>";
}
?>
<div class="mm-wrap">
	<?php 
if (MM_MemberMouseService::hasPermission(MM_MemberMouseService::$PYMT_SERVICE_LIMELIGHT)) {
    $shippingMethods = MM_ShippingMethod::getAvailableShippingOptions();
    if (count($shippingMethods) > 0) {
        $unmappedShippingMethods = MM_LimeLightShippingMethod::getUnmappedShippingMethods();
        if (count($unmappedShippingMethods) > 0) {
            ?>
				<div class="mm-button-container">
					<a onclick="mmjs.create('mm-limelight-shipping-methods-dialog', 550, 235)" class="mm-ui-button green"><?php 
            echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
            ?>
 Create Shipping Method Mapping</a>
				</div>
				<?php 
        }
        ?>
			
				<div class="clear"></div>
				
				<div style="width:65%;">
<?php

/**
 * 
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
$limeLightShippingMethod = new MM_LimeLightShippingMethod($p->id);
$limeLightService = MM_PaymentServiceFactory::getPaymentService(MM_PaymentService::$LIMELIGHT_SERVICE_TOKEN);
?>
<div id="mm-form-container">
	<table cellspacing="10">
		<tr>
			<td width="200">MemberMouse Shipping Method</td>
			<td>
				<select name='mm_option_key' id='mm_option_key'>
				<?php 
$unmappedShippingMethods = MM_LimeLightShippingMethod::getUnmappedShippingMethods($limeLightShippingMethod->getMMOptionKey());
echo MM_HtmlUtils::generateSelectionsList($unmappedShippingMethods, $limeLightShippingMethod->getMMOptionKey());
?>
				</select>
			</td>
		</tr>
		
		<tr>
			<td colspan="2">
			<div style="width: 98%; margin-top: 8px;" class="mm-divider"></div>
			</td>
		</tr>
		
		<tr>