Ejemplo n.º 1
0
     foreach ($nslist as $nse) {
         $e = new element($nse['elements_id']);
         $rowcount++;
         if ($rowcount == 1) {
             $result2 .= '<div class="draw-table" style="float:left;margin-right:20px;">';
             $result2 .= '<table class="proman sticky-tablehead" border="0" cellpadding="0" cellspacing="0">';
             $result2 .= '<thead><tr>';
             $result2 .= '<th>Image</th>';
             $result2 .= '<th>ID</th>';
             $result2 .= '<th>Qty</th>';
             $result2 .= '</tr></thead>';
             $result2 .= '<tbody>';
         }
         $rowclass = $rowcount % 2 == 0 ? 'e' : 'o';
         $result2 .= '<tr class="' . $rowclass . '">';
         $result2 .= '<td class="img">' . webImageWithDetailLinkStars($e->image, IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, "Element {$e->id}", 'img-border img-padding', 'Click to view larger image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $e->stars) . '</td>';
         $result2 .= '<td class="id"><a href="?open=elements-sourcing-overview&amp;eid=' . $e->id . '&amp;hidemenu=true" class="view_webpage">' . $e->id . '</a></td>';
         $result2 .= '<td class="qty"><a href="?open=elements-stock-update&id=' . $e->id . '&amp;hidemenu=true" class="view_webpage">' . $nse['total_qty'] . '</a></td>';
         $result2 .= '</tr>';
         if ($rowcount == $rows_no) {
             $result2 .= '</tbody></table></div>';
             $rowcount = 0;
         }
         $eid_collection[] = $e->id;
     }
     if ($rowcount < $rows_no) {
         $result2 .= '</table></div>';
     }
     $result2 .= '<div style="clear:both;">&nbsp;</div>';
     $result2 = '<h3 class="red" style="clear:both;padding-top:20px;">List of Today NS Elements (Top ' . $total_elements_to_list . ') <a href="?open=elements-sourcing-overview&amp;eid=' . implode(',', $eid_collection) . '&amp;hidemenu=true" class="view_webpage">&raquo; View in Elements Sourcing Overview</a></h3>' . $result2;
 }
function drawProductInfo($pid, $aid)
{
    global $product_categories_name, $class_pm, $class_pa;
    $product = $class_pm->retrieveDetail($pid, 'p,pnc,cat');
    $result = '<div style="float:left;">';
    $result .= '<div>' . webImageWithDetailLinkStars($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, 'Product ' . $product['p']['products_id'], '', '', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $product['p']['stars']) . '</div>';
    $result .= '</div>';
    $result .= '<div style="margin-left:' . (intval(IMAGE_SIZE_THUMBNAIL_1) + 20) . 'px;">';
    $result .= '<h2>' . $product_categories_name[$product['categories_id']] . '</h2>';
    $result .= '<h3>' . $product['p']['products_id'] . ' / ' . $product['p']['products_model'] . '</h3>';
    if (is_array($aid)) {
        $a_option = array();
        $a_option[$product['p']['products_ean']] = textLength($product['pnc']['products_length']);
        foreach ($aid as $a) {
            $a_option[$a['products_ean']] = textLength($a['length']);
        }
        $result .= '<select id="choose-article" class="input"><option value="X">please select a length...</option>' . loadComboListFromArray($a_option) . '</select>';
    } else {
        $article = $aid > 0 ? $class_pa->retrieveDetail($aid) : null;
        $ean = is_null($article) ? $product['p']['products_ean'] : $article['products_ean'];
        $length = is_null($article) ? $product['pnc']['products_length'] : $article['length'];
        $length_text = $length > 0 ? textLength($length) : '';
        if ($length_text != '') {
            $result .= '<h3>Length ' . $length_text . '</h3>';
        }
        $result .= '<h3>EAN ' . $ean . '</h3>';
    }
    $result .= '</div>';
    return $result;
}
Ejemplo n.º 3
0
 $content .= '</tr></thead>';
 $content .= '<tbody>';
 if ($suplist_exist) {
     $rowcount = 0;
     foreach ($suppliers_list[$supid] as $eid => $eqty) {
         $rowcount++;
         $rowid = 'eid-' . $eid;
         $rowclass = $rowcount % 2 == 0 ? 'e' : 'o';
         $stock = $class_es->retrieveOne(WAREHOUSE_ID_ELEMENTS, $eid);
         $qty_to_qtytype_raw = $stock['pieces_per_qty_type'] > 0 ? $eqty / $stock['pieces_per_qty_type'] : 0;
         $qty_to_qtytype = ceil($qty_to_qtytype_raw);
         $current_stock = intval($stock['stock']);
         $show_qty_detail = $stock['pieces_per_qty_type'] > 1 ? '' : 'display:none;';
         $sdt = $stock['pieces_per_qty_type'] == 1 ? '' : '<br /><br /><span title="Safety Delivery Time">(SDT: ' . $elements[$eid]->displaySafetyDT($stock['stock'], $elements[$eid]->suppliers[$supid]['resourcing_day']) . ')</span>';
         $content .= '<tr id="' . $rowid . '" class="eid ' . $rowclass . '">';
         $content .= '<td class="img">' . webImageWithDetailLinkStars($elements[$eid]->image, IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, "Element {$eid}", '', 'View Larger Image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $elements[$eid]->stars) . '</td>';
         $content .= '<td class="w200 tac"><a href="?open=element&amp;id=' . $eid . '&amp;hidemenu=true" class="view_webpage">' . $eid . '</a>' . $elements[$eid]->displayStockInfoTable($current_stock) . '</td>';
         $content .= '<td class="w150 tac">';
         $content .= '<div id="e' . $eid . 'qtydet" class="notice" style="' . $show_qty_detail . '"><span class="red"><span id="e' . $eid . 'defqty">' . $eqty . '</span> qty</span> &asymp; <span id="e' . $eid . 'unitqtyraw">' . number_format($qty_to_qtytype_raw, 2) . '</span> <span class="e' . $eid . 'unit">' . $stock['qty_type'] . '</span></div>';
         $content .= '<div class="smallText notice" style="margin-bottom:10px;' . $show_qty_detail . '"><span id="e' . $eid . 'uqpp">' . $stock['pieces_per_qty_type'] . '</span> qty = 1 <span class="e' . $eid . 'unit">' . $stock['qty_type'] . '</span></div>';
         $content .= '<input type="text" id="e' . $eid . 'order" class="w080 tac" value="' . $qty_to_qtytype . '" />';
         $content .= '<br />' . $stock['qty_type'];
         $content .= '</td>';
         $content .= '<td class="w150 tac">' . $elements[$eid]->displayDIOH($current_stock) . $sdt . '</td>';
         $content .= '<td class="w200 tac"><select id="e' . $eid . 'supchange" name="supchange" class="input"><option value="0">Source to...</option>' . loadComboListFromArray($suppliers_options[$eid]) . '</select></td>';
         $content .= '</tr>';
     }
 }
 $content .= '</tbody>';
 $content .= '</table></div>';
 $content .= '</div>';
Ejemplo n.º 4
0
     $eo = new elements_order($oid);
     $eo->updateStatus('2', $session_userinfo['username']);
     $result = array();
     $result['oid'] = $oid;
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'ADDMANLOADEID') {
     $eid = tep_db_prepare_input($_POST['eid']);
     $qtytoadd = '';
     $element = new element($eid);
     if (is_null($element->id)) {
         $found = '0';
         $preview = '<h3 class="red">Element Not Found</h3>';
     } else {
         //$img = webImage($element->image, '80', '80', $eid);
         $img = webImageWithDetailLinkStars($element->image, '80', '80', $eid, '', '', '500', '500', $element->stars);
         $stock = $class_es->retrieveOne($whid, $eid);
         $preview = '<div style="float:left;">' . $img . '</div>';
         $preview .= '<div style="margin-left:100px;">';
         $preview .= '<div style="margin-bottom:5px;">';
         $preview .= $element->detail['supplier'];
         $preview .= ' / 1 ' . $stock['qty_type'] . ' = ' . displayCurrency('EUR', $element->detail['price']);
         //$preview .= ' <span class="smallText notice">('.$stock['pieces_per_qty_type'].' qty = 1 '.$stock['qty_type'].')</span>';
         $preview .= '</div>';
         $found = '1';
         $epo_status_0 = new elements_preorder($eid, '0');
         $epo_status_1 = new elements_preorder($eid, '1');
         $qty_to_qtytype_raw = $qty / $stock['pieces_per_qty_type'];
         $qty_to_qtytype = ceil($qty_to_qtytype_raw);
         $r = $element->displaySafetyDT($stock['stock'], $element->suppliers[$suppliers_id]['resourcing_day']);
         $l = '<span class="' . ($element->calcRefillQuantity($stock['stock'], $current_orders, 1) > 0 ? 'green">ON' : 'red">OFF') . '<span>';
     $search_result .= '<th>' . $h . '</th>';
 }
 $search_result .= '</tr></thead><tbody>';
 $rowcount = 0;
 foreach ($products as $pid => $p) {
     $rowcount++;
     $rowclass = $rowcount % 2 == 0 ? 'e' : 'o';
     $search_result .= '<tr class="' . $rowclass . '">';
     foreach ($header as $class_raw => $h) {
         $class_raw_exp = explode(' ', $class_raw);
         $class = $class_raw_exp[0];
         $alist = array();
         $value = '&nbsp;';
         switch ($class) {
             case 'img':
                 $value = webImageWithDetailLinkStars($p['image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, "Product {$pid}", '', '', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $p['stars']);
                 break;
             case 'name':
                 $value = '<a href="?open=product-detail&amp;products_id=' . $pid . '&amp;hidemenu=true" class="view_webpage_full">' . $pid . ' / ' . $p['code'] . '</a>';
                 //$value .= '<br />'.$p['name'];
                 break;
             case 'a':
                 //EAN
                 foreach ($articles[$pid] as $a) {
                     $alist[] = $a['products_ean'];
                 }
                 break;
             case 'b':
                 //Ordered
                 foreach ($articles[$pid] as $a) {
                     $order_qty = intval($a['order_total']);
 foreach ($header as $h) {
     $search_result .= '<th>' . $h . '</th>';
 }
 $search_result .= '</tr>';
 $search_result .= '</thead>';
 $search_result .= '<tbody>';
 $rowcount = 0;
 foreach ($elements as $elid => $e) {
     $rowcount++;
     $rowclass = $rowcount % 2 == 0 ? 'e' : 'o';
     $search_result .= '<tr class="' . $rowclass . '">';
     foreach ($header as $class => $h) {
         $value = '&nbsp;';
         switch ($class) {
             case 'img':
                 $value = webImageWithDetailLinkStars($e['elements_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, 'Element ' . $e['elements_id'], '', 'View Larger Image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $e['stars']);
                 break;
             case 'name':
                 $value = '<a href="?open=element&amp;id=' . $elid . '&amp;hidemenu=true" class="view_webpage">' . $elid . '</a><br/>' . $e['elements_name'];
                 break;
             case 'a':
                 $value = $e['sold_monthly_1'] . '<br/>qty';
                 break;
             case 'a2':
                 $value = $e['used_monthly_1'] . '<br />qty';
                 break;
             case 'b':
                 $value = '<a href="?open=elements-stock-update&amp;id=' . $elid . '&amp;hidemenu=true" class="view_webpage">' . $e['stock_actual'] . '<br/>qty</a>';
                 break;
             case 'c':
                 $value = $e['dioh_text'];
function getElementStock($jng_warehouses_id, $elements_id)
{
    global $history_options, $history_options_2, $reduce_reason;
    $element_query = "SELECT es.qty_type, pieces_per_qty_type, es.stock";
    $element_query .= ", e.elements_id, e.elements_image AS image, e.elements_name AS name, e.stars, e.elements_description";
    $element_query .= " FROM element e";
    //  $element_query .= " LEFT JOIN elements_description ed ON ed.elements_id=e.elements_id AND ed.languages_id=1";
    $element_query .= " LEFT JOIN elements_stock es ON es.elements_id=e.elements_id AND es.jng_warehouses_id={$jng_warehouses_id}";
    $msg_filter_type = 'ID';
    $element_query .= " WHERE e.elements_id='{$elements_id}'";
    $element_result = tep_db_query($element_query);
    if (tep_db_num_rows($element_result) > 0) {
        $element = tep_db_fetch_array($element_result);
        if ($element['qty_type'] == '') {
            $defstock_query = "SELECT price_quantity_type, pieces_per_qty_type FROM elements_to_elements_suppliers";
            $defstock_query .= " WHERE elements_id={$element['elements_id']} AND is_default='1'";
            $defstock_result = tep_db_query($defstock_query);
            $defstock = tep_db_fetch_array($defstock_result);
            $element_qty_type = $defstock['price_quantity_type'];
            $element_ppqt = $defstock['pieces_per_qty_type'];
        } else {
            $element_qty_type = $element['qty_type'];
            $element_ppqt = $element['pieces_per_qty_type'];
        }
        $qty_unit = 'qty';
        if ($element_qty_type == 'meter') {
            $qty_unit = 'cm';
        }
        //if($element_qty_type=='bottle') $qty_unit = 'gr';
        $eqto = array();
        //HIDE option to update by unit, must use qty
        //$eqto['unit'] = $element_qty_type;
        //if($eqto['unit']!='pieces') $eqto['qty'] = $qty_unit;
        $eqto['qty'] = $qty_unit;
        $element_qty_type_options = '<select name="eqt">';
        $element_qty_type_options .= loadComboListFromArray($eqto, null, null, false);
        $element_qty_type_options .= '</select>';
        if ($element_ppqt == 0) {
            $element_ppqt = 1;
            global $messagebox;
            $messagebox->add('<strong>Qty/Unit</strong> for default supplier is unset, please <a href="?open=elements-suppliers&amp;id=' . $elements_id . '&amp;hidemenu=true" class="view_webpage">click here to update</a>.');
        }
        $element_stock = $element['stock'] == '' ? '0' : round($element['stock'] / $element_ppqt, 2);
        $result = '';
        if ($messagebox->counter > 0) {
            $result .= $messagebox->build();
        }
        $stock_booked = elements_minierp::elementsBookedCount($jng_warehouses_id, $elements_id);
        $stock_booked_unit = round($stock_booked / $element_ppqt, 2);
        $stock_total = $element['stock'] + $stock_booked;
        $stock_total_unit = $element_stock + $stock_booked_unit;
        $orders_in_sourcing = elements_preorder::totalNeededForSourcingTab($elements_id);
        $orders_in_sourcing_unit = round($orders_in_sourcing / $element_ppqt, 2);
        $elname = 'Element ' . $element['elements_id'] . ($element['elements_description'] != '' ? ' &sdot; ' . $element['elements_description'] : '');
        $result .= '<h2>' . $elname . '</h2>';
        $result .= '<div style="float:left;">' . webImageWithDetailLinkStars($element['image'], IMAGE_SIZE_THUMBNAIL_2, IMAGE_SIZE_THUMBNAIL_2, "Element {$element['elements_id']}", 'img-border img-padding', 'Click to view larger image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $element['stars']) . '</div>';
        $result .= '<div class="form" style="margin-left:170px;">';
        //$result .= '<form name="element-stock-update" action="?open=elements-stock-update" method="post">';
        //$result .= '<input type="hidden" name="me_action" value="UPDATEELEMENTSTOCK" />';
        $result .= '<input type="hidden" id="elements_id" name="elements_id" value="' . $element['elements_id'] . '" />';
        $result .= '<input type="hidden" id="jng_warehouses_id" name="jng_warehouses_id" value="' . $jng_warehouses_id . '" />';
        $result .= '<input type="hidden" id="stock" value="' . $element_stock . '" />';
        $result .= '<input type="hidden" id="qty_type" value="' . $element_qty_type . '" />';
        $result .= '<input type="hidden" id="qty_unit" value="' . $qty_unit . '" />';
        $result .= '<input type="hidden" id="pieces_per_qty_type" value="' . $element_ppqt . '" />';
        $result .= '<table border="0" cellpadding="0" cellspacing="0">';
        //$result .= '<tr><td>Pieces per Unit Type</td><td><input type="text" readonly="readonly" class="disabled" value="'.$ppqt_text.'" /></td></tr>';
        $result .= '<tr><td>Pieces per Unit Type</td><td><input type="text" value="' . "1 {$element_qty_type}" . '" class="esi readonly" /></td><td class="notice">=</td><td><input type="text" value="' . "{$element_ppqt} {$qty_unit}" . '" class="esi readonly" /></td></tr>';
        //$result .= '<tr><td width="150">Stock Available</td><td><input type="text" readonly="readonly" class="disabled" value="'."$element_stock $element_qty_type".' &asymp; '."$element[stock] $qty_unit".'" /></td></tr>';
        $result .= '<tr><td>Stock Total</td><td><input type="text" value="' . "{$stock_total_unit} {$element_qty_type}" . '" class="esi" style="color:#000;" /></td><td>&asymp;</td><td><input type="text" value="' . "{$stock_total} {$qty_unit}" . '" class="esi" style="color:#000;" /></td></tr>';
        $result .= '<tr><td>Stock Booked</td><td><input type="text" value="' . "{$stock_booked_unit} {$element_qty_type}" . '" class="esi" style="color:#000;" /></td><td>&asymp;</td><td><input type="text" value="' . "{$stock_booked} {$qty_unit}" . '" class="esi" style="color:#000;" /></td></tr>';
        $result .= '<tr><td width="150" class="bold">Stock Available</td><td><input id="cs-unit" type="text" value="' . "{$element_stock} {$element_qty_type}" . '" class="esi bold" style="color:#000;" /></td><td>&asymp;</td><td><input id="cs-qty" type="text" value="' . "{$element['stock']} {$qty_unit}" . '" class="esi bold" style="color:#000;" /></td></tr>';
        $result .= '<tr><td width="150" class="notice">Orders in Sourcing Tab</td><td><input type="text" value="' . "{$orders_in_sourcing_unit} {$element_qty_type}" . '" class="esi" /></td><td>&asymp;</td><td><input type="text" value="' . "{$orders_in_sourcing} {$qty_unit}" . '" class="esi" /></td></tr>';
        $result .= '<tr><td colspan="4">';
        $result .= '<div id="stock-buttons">';
        $result .= '<input type="button" id="stock-add" value="Add" class="button" />';
        $result .= '<input type="button" id="stock-adj" value="Adjust" class="button" />';
        $result .= '<input type="button" id="stock-red" value="Reduce" class="red button" />';
        $result .= '</div>';
        $result .= '<div id="stock-forms" style="margin-top:10px;">';
        $result .= '<div id="form-add" class="float-box ui-corner-all" style="display:none;">';
        $result .= '<input type="text" id="stock-add-value" value="" style="width:50px" />';
        $result .= ' ' . $element_qty_type_options . ' &nbsp; ';
        $result .= ' <input type="button" value="Add" class="action-btn" id="action-add" />';
        $result .= ' <input type="button" name="cancel" value="Cancel" />';
        $result .= '</div>';
        $result .= '<div id="form-adj" class="float-box ui-corner-all" style="display:none;">';
        $result .= '<input type="text" id="stock-adj-value" value="' . $element_stock . '" style="width:50px" />';
        $result .= ' ' . str_replace('<select', '<select id="eqt-adj"', $element_qty_type_options) . ' &nbsp; ';
        $result .= ' <input type="button" value="Update" class="action-btn" id="action-adj" />';
        $result .= ' <input type="button" name="cancel" value="Cancel" />';
        $result .= '</div>';
        $result .= '<div id="form-red" class="float-box ui-corner-all" style="display:none;">';
        $result .= '<strong>Reduce Reason</strong><br /><select id="reduce_reason" class="input">' . loadComboListFromArray($reduce_reason) . '</select><br /><br />';
        $result .= '<input type="text" id="stock-red-value" value="" style="width:50px" />';
        $result .= ' ' . $element_qty_type_options . ' &nbsp; ';
        $result .= ' <input type="button" value="Reduce" class="red action-btn" id="action-red" />';
        $result .= ' <input type="button" name="cancel" value="Cancel" />';
        $result .= '</div>';
        $result .= '</div>';
        $result .= '</td></tr>';
        $result .= '</table>';
        //$result .= '</form>';
        $result .= '</div>';
        $result .= '<h2 style="margin:20px 0;">Show Historical data for &nbsp;';
        $result .= '<select id="euhperiod">' . loadComboListFromArray($history_options, null, null, false) . '</select>';
        $result .= '<select id="euhdaisum">' . loadComboListFromArray($history_options_2, null, null, false) . '</select>';
        $result .= '</h2>';
        $result .= '<div id="euhdata">';
        $result .= getElementStockHistory($jng_warehouses_id, $elements_id, 0, 0, $element['stock']);
        $result .= '</div>';
    } else {
        $result = '<span class="red">Can not find Element ' . $msg_filter_type . ' <strong>' . $elements_id . '</strong> in database.</red>';
    }
    return $result;
}
 $total_qty_tobe_created = 0;
 foreach ($articles as $a) {
     $rowcounter++;
     if (!in_array($a['products_id'], $products)) {
         $products[] = $a['products_id'];
     }
     if (!in_array($a['family_id'], $families)) {
         $families[] = $a['family_id'];
     }
     if ($a['zalando_needed'] > 0) {
         $total_qty_tobe_created += $a['zalando_needed'];
     }
     if ($a['zalando_needed'] > 0 || $a['zalando_needed'] <= 0 && $show_zeroqty) {
         $row = array();
         $row['c1 w080 tac'] = $rowcounter;
         $row['c3 w080 tac'] = webImageWithDetailLinkStars($a['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, 'Product ' . $a['products_id'], '', 'View Larger Image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $a['stars']);
         $row['c4 w080 tac'] = $a['article_length'] == 0 ? '-' : textLength($a['article_length']);
         $row['c5 w080 tac'] = $a['products_ean'];
         $row['c6 w080 tac'] = $a['active_age'];
         $row['c7 w080 tac'] = $a['stock_available'] < 0 ? '0<br /><span class="smallText notice" title="Open book is total qty of missing booked products, means new bin ins upto this amount will not increase the stock available">Open Book = ' . abs($a['stock_available']) . '</span>' : strval($a['stock_available']);
         $row['c8 w080 tac'] = strval($a['current_refill']);
         $row['c9 w080 tac'] = $a['zalando_needed'] < 0 ? '0' : strval($a['zalando_needed']);
         $table[] = $row;
     }
 }
 $total = count($families) . ' Families / ';
 $total .= count($products) . ' Products / ';
 $total .= count($articles) . ' Articles';
 $result = '<h2>List of Articles based on Settings (' . $total . ')</h2>';
 $result .= '<h3>Total Qty of Depot Refill will be created: ' . $total_qty_tobe_created . '</h3>';
 $result .= tep_draw_table('sticky-tablehead', $table);
 $alist = array();
 $alist[0] = $product['p']['products_ean'] . ($product['pnc']['products_length'] > 0 ? ' &sdot; ' . textLength($product['pnc']['products_length']) : '');
 foreach ($articles as $a) {
     $alist[$a['products_articles_id']] = $a['products_ean'] . ' &sdot; ' . textLength($a['length']);
 }
 $stocks = array();
 foreach ($alist as $aid => $length) {
     $stocks[$aid] = $class_pm->stockRetrieveDetail(WAREHOUSE_ID_PRODUCTS_HAMBURG, $pid, $aid);
 }
 $result = '<tr id="temp-' . $pid . '">';
 foreach ($product_table_header as $k => $v) {
     $result .= '<td class="' . $k . '">';
     switch ($v) {
         case $hn_product:
             //$value  = webImage($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, 'Product '.$pid);
             $value = webImageWithDetailLinkStars($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, 'Product ' . $pid, '', 'View larger image', IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $product['p']['stars']);
             $value .= '<div>' . $pid . '</div>';
             break;
         case $hn_article:
             $value = implode('<br />', $alist);
             break;
         case $hn_custock:
             $tempvalue = array();
             foreach ($alist as $aid => $length) {
                 $tempvalue[] = $stocks[$aid]['stock'];
             }
             $value = implode('<br />', $tempvalue);
             break;
         case $hn_cbooked:
             $tempvalue = array();
             foreach ($alist as $aid => $length) {
Ejemplo n.º 10
0
 /**
  * Standard Display of Image Thumb with icons
  * @param int $width
  * @param int $height
  * @param string $additional_title
  * @param boolean $border
  * @param string $class
  * @param const $link_to IMAGE_LINKTO_BIGGER_IMAGE or IMAGE_LINKTO_PRODUCT_DETAIL
  * @return type
  */
 function displayImage($width, $height, $additional_title = '', $border = true, $class = '', $link_to = self::IMAGE_LINKTO_BIGGER_IMAGE)
 {
     $title = "Product {$this->id}";
     if ($additional_title != '') {
         $title .= " {$additional_title}";
     }
     $popup_title = 'View Larger Image (' . $this->id . '/' . $this->code . ')';
     if ($additional_title != '') {
         $popup_title .= " {$additional_title}";
     }
     $border_class = $border ? 'img-border' : '';
     if ($border_class != $class) {
         $class .= ($class != '' ? ' ' : '') . $border_class;
     }
     $link_to_class = '';
     if ($link_to == self::IMAGE_LINKTO_BIGGER_IMAGE) {
         $link_to = '';
     } else {
         $link_to .= $this->id;
         $link_to_class = 'view_webpage';
     }
     return webImageWithDetailLinkStars($this->image, $width, $height, $title, $class, $popup_title, IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $this->stars, 3, $link_to, $link_to_class, '', $this);
 }
Ejemplo n.º 11
0
        $p_bins = array();
        foreach ($articles[$pid] as $aid => $a) {
            $length = $a['length'] > 0 ? textLength($a['length']) : '<span class="notice">None</span>';
            $stocks = $a['stock'] > 0 ? $a['stock'] : '<span class="notice">0</span>';
            $bins = $a['bin_code'] != '' ? $class_bin->getCleanBinCode($a['bin_code']) : '<span class="notice">-</span>';
            if ($aid == 0 && $a['length'] > 0) {
                $length = '<span class="bold">' . $length . ' [def]</span>';
                $stocks = '<span class="bold">' . $stocks . '</span>';
                $bins = '<span class="bold">' . $bins . '</span>';
            }
            $p_length[] = $length;
            $p_stocks[] = $stocks;
            $p_bins[] = '<a href="?open=bin-info&amp;id=' . $a['bins_id'] . '&amp;hidemenu=true" class="view_webpage">' . $bins . '</a>';
        }
        $fgl = array();
        $fgl['img'] = webImageWithDetailLinkStars($p['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1, "Product {$pid}", "", "", IMAGE_SIZE_BIG_1, IMAGE_SIZE_BIG_1, $p['stars'], '3', '', '', $p['products_brand_id']);
        $fgl['name'] = $idhid . $info;
        $fgl['pri'] = implode('<br />', $p_length);
        $fgl['pri2'] = implode('<br />', $p_stocks);
        $fgl['info'] = implode('<br />', $p_bins);
        $fgl['info2'] = $p['sellings'];
        $fglist[] = $fgl;
    }
    $fgtable .= tep_draw_table('proman', $fglist);
    $fgtable .= '<div>&nbsp;</div>';
    $fgtable .= $pagelink;
}
$sort_combo = ' <select id="sortby" name="sortby" class="input iwbutton">';
foreach ($sort_options as $val => $opt) {
    $sel = $sort_option == $val ? ' selected="selected"' : '';
    $sort_combo .= '<option value="' . $val . '"' . $sel . '>' . $opt . '</option>';