Esempio n. 1
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>
Esempio n. 2
0
 * MemberMouse(TM) (http://www.membermouse.com)
 * (c) MemberMouse, LLC. All rights reserved.
 */
$view = new MM_LimeLightProductsView();
$dataGrid = new MM_DataGrid($_REQUEST, "limelight_campaign_name", "asc", 10);
$data = $view->getViewData($dataGrid);
$dataGrid->setTotalRecords($data);
$dataGrid->recordName = "product mapping";
$rows = array();
foreach ($data as $key => $item) {
    $mmProductName = MM_NO_DATA;
    $mmProductDescription = MM_NO_DATA;
    $product = new MM_Product($item->membermouse_product_id);
    if ($product->isValid()) {
        $mmProductName = $product->getName();
        $mmProductDescription = $product->getBillingDescription() . " ";
        if ($product->hasTrial()) {
            $mmProductDescription .= MM_Utils::getIcon('clock-o', 'beige', '1.3em', '2px', 'Has Trial', 'margin-right:5px;');
        }
        if ($product->isRecurring()) {
            if ($product->doLimitPayments()) {
                $mmProductDescription .= MM_Utils::getIcon('calendar-o', 'beige', '1.3em', '2px', 'Payment Plan', 'margin-right:5px;');
            } else {
                $mmProductDescription .= MM_Utils::getIcon('refresh', 'beige', '1.3em', '2px', 'Subscription', 'margin-right:5px;');
            }
        }
        if ($product->isShippable()) {
            $mmProductDescription .= MM_Utils::getIcon('truck', 'beige', '1.3em', '2px', 'Requires Shipping', 'margin-right:5px;');
        }
        if ($product->getSku() != "") {
            $mmProductDescription .= MM_Utils::getIcon('barcode', 'beige', '1.3em', '2px', "SKU [" . $product->getSku() . "]", 'margin-right:5px;');