Exemplo n.º 1
0
if (isset($_GET['limit']) && $_GET['limit'] != 'all' || !isset($_GET['limit'])) {
    if (isset($_POST['page_nbr']) && is_numeric($_POST['page_nbr'])) {
        $_GET['page_id'] = $_POST['page_nbr'];
    }
    $cnt = $Products->GetProductsCntSupCab($arr, $params);
    $tpl->Assign('cnt', $cnt);
    $GLOBALS['paginator_html'] = G::NeedfulPages($cnt);
    $limit = ' LIMIT ' . $GLOBALS['Start'] . ',' . $GLOBALS['Limit_db'];
} else {
    $GLOBALS['Limit_db'] = 0;
    $limit = '';
}
// ---------Информация о поставщике
$Supplier->fields['active_products_cnt'] = $Products->GetProductsCntSupCab(array('a.id_supplier' => $id_supplier, 'a.active' => 1, 'p.visible' => 1), ' AND a.product_limit > 0 AND (a.price_mopt_otpusk > 0 OR a.price_opt_otpusk > 0)');
$Supplier->fields['all_products_cnt'] = $Products->GetProductsCntSupCab($arr);
$Supplier->fields['moderation_products_cnt'] = count($Products->GetProductsOnModeration($id_supplier));
$check_sum = $Supplier->GetCheckSumSupplierProducts($id_supplier);
$tpl->Assign('check_sum', $check_sum);
$tpl->Assign('supplier', $Supplier->fields);
$Products->SetProductsList1($id_supplier, $order, $limit, $arr, $params);
$products = $Products->list;
if ($products) {
    foreach ($products as &$p) {
        $p['images'] = $Products->GetPhotoById($p['id_product']);
    }
}
$tpl->Assign('list', $products);
$parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'cp_assortment.tpl'));
if ($parsed_res['issuccess'] === true) {
    $tpl_center .= $parsed_res['html'];
}
Exemplo n.º 2
0
<?php

$GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/assortment/');
$Products = new Products();
$Supplier = new Suppliers();
$Order = new Orders();
$Unit = new Unit();
$supplier = $Supplier->SetFieldsById($_SESSION['member']['id_user']);
$check_sum = $Supplier->GetCheckSumSupplierProducts($Supplier->fields['id_user']);
$tpl->Assign("check_sum", $check_sum);
$tpl->Assign("supplier", $Supplier->fields);
//*********************************Заполнение рабочих дней
if (isset($GLOBALS['Rewrite'])) {
    $cabinet_page = $GLOBALS['Rewrite'];
    $tpl->Assign('cabinet_page', $cabinet_page);
} else {
    header('Location: ' . _base_url . '/cabinet/assortment/');
}
if (isset($cabinet_page) && $cabinet_page == "productsonmoderation") {
    $header = "Товары на модерации";
    $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/productsonmoderation/');
    $list = $Products->GetProductsOnModeration($_SESSION['member']['id_user']);
    $tpl->Assign('list', $list);
    $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'products_on_moderation.tpl'));
} elseif (isset($cabinet_page) && $cabinet_page == "promo_orders") {
    $header = "Заказы с промо-кодом";
    $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/promo_orders/');
    $orders = $Order->GetOrdersByPromoSupplier($_SESSION['member']['id_user']);
    $tpl->Assign('orders', $orders);
    $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'promo_orders.tpl'));
} elseif (isset($cabinet_page) && $cabinet_page == "promo_codes") {