Skip to content

Commit

Permalink
add orders stat
Browse files Browse the repository at this point in the history
  • Loading branch information
CB9TOIIIA committed Sep 11, 2016
1 parent 0ef4e8f commit 39510e4
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 37 deletions.
10 changes: 10 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
<option value="yes">Да</option>
<option value="no">Нет</option>
</field>
<field
name="enablecommerce"
type="radio"
label="Это интернет-магазин?"
description="Нужны вкладки магазина?"
class="btn-group btn-group-yesno"
default="yes">
<option value="yes">Да</option>
<option value="no">Нет</option>
</field>
<field
name="threshold"
type="text"
Expand Down
1 change: 1 addition & 0 deletions elements/paramsetc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$namecomponent = $mainframe->scope;
$params = json_decode($component->params);
$comcontent = $params->comcontent;
$enablecommerce = $params->enablecommerce;
$csshack = $params->csshack;
$georegions = $params->georegions;
$rus = $params->rus;
Expand Down
2 changes: 1 addition & 1 deletion myjbzoostat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<authorUrl>http://cb9t.ru</authorUrl>
<copyright></copyright>
<license></license>
<version>1.8</version>
<version>1.9</version>
<description>MyJBZooStat - это компонент статистики и менеджер системы комментирования Disqus.</description>
<creationDate>28 June 2016</creationDate>
<administration>
Expand Down
4 changes: 3 additions & 1 deletion views/articles/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}
Expand Down Expand Up @@ -61,7 +63,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
4 changes: 3 additions & 1 deletion views/auhorsprofile/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -62,7 +64,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
4 changes: 3 additions & 1 deletion views/autors/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -59,7 +61,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
4 changes: 3 additions & 1 deletion views/disqus/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -58,7 +60,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
3 changes: 2 additions & 1 deletion views/index/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;

if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}
Expand Down Expand Up @@ -61,7 +62,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
94 changes: 66 additions & 28 deletions views/orders/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
echo '
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#myTable").DataTable({language:{url:"/administrator/components/com_myjbzoostat/assets/js/Russian.json"}});
$("#myTable").DataTable({language:{url:"/administrator/components/com_myjbzoostat/assets/js/Russian.json"}});
});
</script>';

echo '
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#myTable2").DataTable({language:{url:"/administrator/components/com_myjbzoostat/assets/js/Russian.json"}});
});
</script>';

Expand Down Expand Up @@ -144,18 +151,11 @@ function rdate($param, $time=0) {
$datearraydatemonth = array_count_values($itemIdsdatemonth);


// dump($datearraydatemonth,0,'Статей за месяц1');
// dump($itemIdsdatemonth,0,'Статей за месяц2');

//$imdatenum = implode(', ',$datearraydatemonth);

$itemmonth1 = array();
$itemmonth2 = array();

foreach ($datearraydatemonth as $datenum => $valuearticles) {

// $itemmonth1[] = implode(', ',$datenum);
// $itemmonth2[] = implode(', ',$valuearticles);
$datenum = date("d", strtotime($datenum));
$itemmonth1[] = '"'.$datenum.'"';
$itemmonth2[] = $valuearticles;
Expand Down Expand Up @@ -193,15 +193,6 @@ function rdate($param, $time=0) {
echo "<div class='ct-chart'></div>";


// $articleorderssql = "SELECT id"
// ." FROM " . ZOO_TABLE_MY_ORDERS
// ." WHERE created BETWEEN '".$year."-".$month."-01' AND '".$year."-".$month."-31'";
//
// $articleorders = array($app->table->tag->database->queryResultArray($articleorderssql));
//
// dump($articleorders,0,'$articleorders');


echo "</div>";

$Myplus = '';
Expand All @@ -215,25 +206,41 @@ function rdate($param, $time=0) {
echo "<td>№ <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>Дата заказа <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>ID заказа<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>Кол-во товаров <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>Сумма <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "</tr>";
echo "</thead>";

foreach ($Arrayarticlesmonth as $idOrderinMonth) {
$Myplus++;

$orderModel = JBModelOrder::model();
$order = $orderModel->getById($idOrderinMonth);
$myCreatedorder = $order->created;
$myCreatedorder = date('d.m.y - H:i',strtotime($myCreatedorder));
$MyOrderTotal = $order->getTotalSum()->val();
$MyDataorder = $idOrderinMonth;

$nameitemorder = array();
foreach ($Arrayarticlesmonth as $idOrderinMonth) {
$Myplus++;

$orderModel = JBModelOrder::model();
$order = $orderModel->getById($idOrderinMonth);
$myCreatedorder = $order->created;
$myCreatedorder = date('d.m.y - H:i',strtotime($myCreatedorder));
$MyOrderTotal = $order->getTotalSum()->val();
$MyDataorder = $idOrderinMonth;


$orderId = $MyDataorder;
$orderModel = JBModelOrder::model();
$orderItem = $orderModel->getById($orderId); // материал заказа
$orderItemas = $orderItem->getItems(true); // материал заказа
$OrderSku = $orderItem->getTotalCountSku(); // кол-во товаров
$OrderURL = $orderItem->getUrl(); // url to order

foreach ($orderItemas as $orderITEM) {
$nameitemorder[] = $orderITEM->get('item_name');
}

echo "<tr>";
echo "<td>{$Myplus}</td>";
echo "<td>{$myCreatedorder}</td>";
echo "<td>{$MyDataorder}</td>";
echo "<td><a target='_blank' href='{$OrderURL}'>{$MyDataorder}</a></td>";
echo "<td>{$OrderSku}</td>";
echo "<td>{$MyOrderTotal}</td>";
echo "</tr>";

Expand All @@ -252,10 +259,41 @@ function rdate($param, $time=0) {
$totalsuminMymonthzero += $totalsuminMymonth;
}
echo "<div class='clrboth'></div>";
echo "<h3>Итого: {$countarticleinmonth} шт. заказов на сумму {$totalsuminMymonthzero} руб. </h3>";
echo "<h3 align='right'>Итого: {$countarticleinmonth} шт. заказов на сумму {$totalsuminMymonthzero} руб. </h3>";

?>

$toptovarodMonth = array_count_values($nameitemorder);

echo "<h2>Популярные товары в этом месяце: </h2>";


echo "<div class='clrboth'></div>";
echo "<table id='myTable2' class='zebratable'>";

echo "<thead>";
echo "<tr class='upper'>";
echo "<td>№ <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>Название товара<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "<td>Кол-во заказов<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABmUlEQVQ4T6WTPUgcURDHZ2bX7w+0VLCwFPQu4e27AxvPpLIQrQWtBFNoZ2NiJxj7NFGsBC2vsNFC9JLO213Wvc7OQrRUBA3q2xlZYWEjZj3M697Mm9/M/OcNwn8eTMeXSiX76ub2lxCu17zqVto3WCzmLJHFsFqdSdv/AiilGgzSgyB8rbnu9+ShUqrnUeAUiToIaS1wj5cS35uAONggHYJwPyA1AYAIwrckQSbgOVjoiIF7iHAHAL8A8zYQTQnIcs3zVjMBecfZY5Zhy6IxBhhBgdXb66vm9q6uDQGcJoTRTMCg1n3E3Fvz/eOc1ksxwBZu9H0/yms9Gbpu+U0NErFeAB7rFrEuwAfHmTjxvF2llJ0eY95xChRF50EQXPyzgpzWn1HgAAA2zJ+7Bbul9T7+BxZixZhonyz6HbrueGYLea1XQGBZIthEC2YB5CezTBHQJYn5lFlB0mMCie8ifI9CZ0lwbKtLxI+Fwg9mmWfhG5t5IM5cl4jp5RhSqkzGrIRhGKTtOacwgyxz3Z1tI5VKxbw6xvds9hPRaxT6nhWaoAAAAABJRU5ErkJggg=='></td>";
echo "</tr>";
echo "</thead>";

$Myplusa = '';

foreach ($toptovarodMonth as $keyitemname => $valuecount) {
$Myplusa++;

echo "<tr>";
echo "<td>{$Myplusa}</td>";
echo "<td>{$keyitemname}</td>";
echo "<td>{$valuecount}</td>";
echo "</tr>";

}

echo "</table>";

?>


</div>
4 changes: 3 additions & 1 deletion views/orders/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -62,7 +64,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
4 changes: 3 additions & 1 deletion views/reportauthors/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -62,7 +64,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down
4 changes: 3 additions & 1 deletion views/tags/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ protected function _setToolBar()
$component = JComponentHelper::getComponent('com_myjbzoostat');
$params = json_decode($component->params);
$StatOrProduct = $params->statorproduct;
$enablecommerce = $params->enablecommerce;


if ($StatOrProduct == 'stat') { $StatOrProduct = 'Статьи';}
if ($StatOrProduct == 'product') { $StatOrProduct = 'Товары';}

Expand Down Expand Up @@ -62,7 +64,7 @@ protected function _setToolBar()
$bar = JToolBar::getInstance('toolbar');
$title = JText::_('Заказы');
$dhtml = "<a href=\"/administrator/index.php?option=com_myjbzoostat&view=orders\" class=\"btn btn-small\"><i class=\"icon-basket\" title=\"$title\"></i>$title</a>";
if (JComponentHelper::isEnabled('com_zoo') == '1') { $bar->appendButton('Custom', $dhtml, 'list'); }
if (JComponentHelper::isEnabled('com_zoo') == '1' && $enablecommerce == 'yes') { $bar->appendButton('Custom', $dhtml, 'list'); }

JToolBarHelper::divider();

Expand Down

0 comments on commit 39510e4

Please sign in to comment.