Beispiel #1
0
		<td width="140">Name*</td>
		<td><input type='text' id='mm-name' value='<?php 
echo $product->getName();
?>
' class="long-text"/></td>
	</tr>
	
	<tr>
		<td>Status<?php 
echo MM_Utils::getInfoIcon("Inactive products cannot be purchased. Changing the status of a product has no impact on members who have already purchased the product.");
?>
</td>
		<td>
			<div id="mm-status-container">
				<input type="radio" name="status" value="active" onclick="mmjs.processForm()" <?php 
echo $product->getStatus() == "1" ? "checked" : "";
?>
 /> Active &nbsp;
				<input type="radio" name="status" value="inactive" onclick="mmjs.processForm()" <?php 
echo $product->getStatus() == "0" ? "checked" : "";
?>
 /> Inactive
			</div>
			
			<input id="mm-status" type="hidden" />
		</td>
	</tr>
	
	<tr>
		<td>SKU</td>
		<td><input type='text' id='mm-sku' value='<?php 
Beispiel #2
0
            $attributes .= MM_Utils::getIcon('refresh', 'beige', '1.3em', '0px', 'Subscription', 'margin-right:5px;');
        }
    } else {
        $attributes .= "<img title='No Recurring' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    if ($product->isShippable()) {
        $attributes .= MM_Utils::getIcon('truck', 'beige', '1.3em', '0px', 'Requires Shipping', 'margin-right:5px;');
    } else {
        $attributes .= "<img title='No Shipping Required' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    if ($product->getSku() != "") {
        $attributes .= MM_Utils::getIcon('barcode', 'beige', '1.3em', '0px', "SKU [" . $product->getSku() . "]", 'margin-right:5px;');
    } else {
        $attributes .= "<img title='No SKU' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />";
    }
    $rows[] = array(array('content' => "<span title='ID [" . $product->getId() . "]'>" . $product->getName() . "</span>"), array('content' => $product->getBillingDescription()), array('content' => $attributes), array('content' => $accessGranted), array('content' => $purchaseLinks), array('content' => MM_Utils::getStatusImage($product->getStatus())), array('content' => $actions));
}
$headers = array('name' => array('content' => '<a onclick="mmjs.sort(\'name\');" href="#">Name</a>'), 'billing' => array('content' => 'Billing Description'), 'attributes' => array('content' => 'Attributes'), 'access' => array('content' => 'Associated Access'), 'links' => array('content' => 'Purchase Links'), 'status' => array('content' => '<a onclick="mmjs.sort(\'status\');" href="#">Status</a>'), 'actions' => array('content' => 'Actions'));
$dataGrid->setHeaders($headers);
$dataGrid->setRows($rows);
$dgHtml = $dataGrid->generateHtml();
if ($dgHtml == "") {
    $dgHtml = "<p><i>No products found.</i></p>";
}
?>
<div class="mm-wrap">
	<div class="mm-button-container">
		<a onclick="mmjs.create('mm-products-dialog', 580, 600)" class="mm-ui-button green"><?php 
echo MM_Utils::getIcon('plus-circle', '', '1.2em', '1px');
?>
 Create Product</a>