- Posts: 298
- Thank you received: 7
Stats not showing in control panel
11 years 11 months ago #174295
by a2zcs
Stats not showing in control panel was created by a2zcs
-- url of the page with the problem -- :
northeastcoffeeco.com/index.php/control-panel
-- HikaShop version -- : 3.3.3
-- HikaMarket version -- : 1.4.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Firefox 32.0.3
We've had order this month, but for some reason the Total Orders, Average Order Price, Orders this month, Orders and products sale comparions stats are all blank. The Total products and last orders seem to be fine.
Any ideas?
-- HikaShop version -- : 3.3.3
-- HikaMarket version -- : 1.4.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Firefox 32.0.3
We've had order this month, but for some reason the Total Orders, Average Order Price, Orders this month, Orders and products sale comparions stats are all blank. The Total products and last orders seem to be fine.
Any ideas?
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174306
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Stats not showing in control panel
Hi,
What are the statuses of these orders ?
HikaMarket will only count the orders with a "valid" status (the confirmed orders).
Regards,
What are the statuses of these orders ?
HikaMarket will only count the orders with a "valid" status (the confirmed orders).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174337
by a2zcs
Replied by a2zcs on topic Stats not showing in control panel
Ok, probably the problem. the client needed an additional/custom status of "Processed". Is there a way to have Hikashop include the orders with that status in the reporting?
Please Log in or Create an account to join the conversation.
11 years 11 months ago - 11 years 11 months ago #174338
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Stats not showing in control panel
Hi,
Right, the option "valid order statuses" is in the "market" tab.
The best is to add a new configuration option (that I will add also in the next release).
In the file "administrator/components/com_hikamarket/views/config/tmpl/main.php", you can replace
By
And in the file "administrator/components/com_hikamarket/classes/statistics.php" you can replace
By
So you will be able to change the configuration option "valid order status" in the "statistics" section in order to choose which order statuses will be used in the statistic processing.
Regards,
Right, the option "valid order statuses" is in the "market" tab.
The best is to add a new configuration option (that I will add also in the next release).
In the file "administrator/components/com_hikamarket/views/config/tmpl/main.php", you can replace
Code:
<tr>
<td class="key"><?php echo JText::_('HIKAM_DISPLAY_ORDER_STATISTICS'); ?></td>
Code:
<tr>
<td class="key"><?php echo JText::_('HIKAM_VALID_ORDER_STATUSES'); ?></td>
<td>
<input id="stats_valid_order_statuses" type="text" name="config[stats_valid_order_statuses]" value="<?php echo $this->escape( @$this->config->get('stats_valid_order_statuses', 'confirmed,shipped') ); ?>" />
<?php
echo $this->popup->display(
'<img style="vertical-align:middle;" src="'.HIKAMARKET_IMAGES.'icon-16/edit.png" alt="'.JText::_('EDIT').'"/>',
'EDIT',
hikamarket::completeLink('shop.category&task=selectstatus&control=valid_order_statuses&values='. $this->escape( @$this->config->get('stats_valid_order_statuses', 'confirmed,shipped') ), true),
'link_valid_order_statuses',
760, 480, '', '', 'link'
);
?>
</td>
</tr>
<tr>
<td class="key"><?php echo JText::_('HIKAM_DISPLAY_ORDER_STATISTICS'); ?></td>
And in the file "administrator/components/com_hikamarket/classes/statistics.php" you can replace
Code:
$valid_order_statuses = explode(',', $this->config->get('valid_order_statuses', 'confirmed,shipped'));
Code:
$valid_order_statuses = explode(',', $this->config->get('stats_valid_order_statuses', 'confirmed,shipped'));
So you will be able to change the configuration option "valid order status" in the "statistics" section in order to choose which order statuses will be used in the statistic processing.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 11 years 11 months ago by Jerome.
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174653
by a2zcs
Replied by a2zcs on topic Stats not showing in control panel
I thought this had fixed the problem, but on closer inspection the Orders graph is only showing the first sale of each day instead of a total sales for the day.
Thoughts?
Thoughts?
Please Log in or Create an account to join the conversation.
11 years 11 months ago #174673
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Stats not showing in control panel
Hi,
Right ! I've totally missed it
(The "sales_sum" one have the code, I really don't know why I did not update this one).
Please edit the file "administrator/components/com_hikamarket/classes/statistics.php" and replace
By
It should fix the issue.
Regards,
Right ! I've totally missed it
(The "sales_sum" one have the code, I really don't know why I did not update this one).
Please edit the file "administrator/components/com_hikamarket/classes/statistics.php" and replace
Code:
'value' => (($vendor_id == 0) ? 'hk_order.order_full_price as value' : 'CASE WHEN hk_order.order_vendor_price >= 0 THEN hk_order.order_vendor_price ELSE (hk_order.order_full_price + hk_order.order_vendor_price) END as value'),
Code:
'value' => (($vendor_id == 0) ? 'SUM(hk_order.order_full_price) as value' : 'SUM( CASE WHEN hk_order.order_vendor_price >= 0 THEN hk_order.order_vendor_price ELSE (hk_order.order_full_price + hk_order.order_vendor_price) END ) as value'),
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.190 seconds