<th>Products</th> <th>Violated Products</th> <th>Last Tracked</th> </tr> </thead> <tbody> <?php foreach ($retailers as $data) { ?> <tr> <td> <a href="<?php echo base_url() . 'whois/report_merchant/' . $data['marketplace'] . '/' . $data['id']; ?> "><span class="squareKey" style="background-color: #<?php echo marketplace_graph_color($data['marketplace']); ?> "></span><?php echo $data['display_name']; ?> </a> </td> <td> <?php echo number_format($data['total_products']); ?> </td> <td> <?php echo number_format($data['violated_products']); ?>
?> <span style="display:none"> <input type="checkbox" name="series[]" checked="checked" id="series_check_box_<?php echo $key; ?> " value="<?php echo $key; ?> " onclick="hideShowSeries(this, <?php echo $marektPlaceListCount; ?> )" class="mt27 mr5"> </span> <span class="mt27 mr5 bar-gar-options" style="display: inline-block; margin-left: 2px;"> <span class="squareKey" style="background-color:#<?php echo marketplace_graph_color($val); ?> "></span> <a href="javascript:;" class="chart_filter" rel="<?php echo $key; ?> "><?php echo marketplace_display_name($val); ?> </a> </span><br /><?php } } } else { $search_product_ids = $this->input->post("products"); $search_product_names = $this->input->post("product_name");
/** * * function whoIsSellingMyProductDefault * * @param array $gData * * */ public static function whoIsSellingMyProductDefault($gData) { $series = $includedCols = $includedColors = array(); foreach ($gData as $val) { $series[] = array('name' => marketplace_display_name($val['marketplace']), 'data' => array((int) $val['total_products']), 'dashStyle' => 'Dot', 'color' => '#' . marketplace_graph_color($val['marketplace']), 'id' => 'merchant_count'); array_push($includedCols, $val['marketplace']); array_push($includedColors, '#' . marketplace_graph_color($val['marketplace'])); } /* For Google Charts */ $googleDataArray = array(array_merge(array('Date'), array_map('marketplace_display_name', $includedCols))); $maxValue = 0; $cat = array(date('Y-m-d')); foreach ($cat as $keyCat => $vCat) { $googleDataArray[$keyCat + 1][] = $vCat; foreach ($series as $seriesData) { $valueForDisplay = isset($seriesData['data'][$keyCat]) ? $seriesData['data'][$keyCat] : 0; $googleDataArray[$keyCat + 1][] = $valueForDisplay; if ($valueForDisplay > $maxValue) { $maxValue = $valueForDisplay; } } } $graph_data = array('data' => $series, 'y_title' => 'Products', 'x_title' => 'Date', 'cat' => $cat, 'type' => 'column', 'googleData' => $googleDataArray, 'googleDataColors' => array_values($includedColors), 'maxValue' => $maxValue); /* END FOR Google Charts */ return $graph_data; }