?> ' /> </p> </div> </td> </tr> <tr> <td colspan="2"> <div style="width: 540px; margin-top: 5px; margin-bottom:4px;" class="mm-divider"></div> </td> </tr> <tr> <td>Requires Shipping</td> <td> <input type='checkbox' id='mm-is_shippable' <?php echo $product->isShippable() ? 'checked' : ''; ?> onchange="mmjs.changeOption('mm-is_shippable');" /> <input type='hidden' id='mm-is_shippable_val' value='<?php echo $product->isShippable() ? '1' : '0'; ?> ' /> </td> </tr> <tr> <td colspan="2"> <div style="width: 540px; margin-top: 5px; margin-bottom:4px;" class="mm-divider"></div> </td> </tr> <tr>
$attributes = ""; if ($product->hasTrial()) { $attributes .= MM_Utils::getIcon('clock-o', 'beige', '1.3em', '0px', 'Has Trial', 'margin-right:5px;'); } else { $attributes .= "<img title='No Trial' style='margin-right:5px;' src='" . MM_Utils::getImageUrl("clear") . "' />"; } if ($product->isRecurring()) { if ($product->doLimitPayments()) { $attributes .= MM_Utils::getIcon('calendar-o', 'beige', '1.3em', '0px', 'Payment Plan', 'margin-right:5px;'); } else { $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();