Stats not showing in control panel

  • Posts: 247
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
9 years 5 months ago #174295

-- 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?

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 5 months ago #174306

Hi,

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 247
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
9 years 5 months ago #174337

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.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 5 months ago #174338

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

<tr>
	<td class="key"><?php echo JText::_('HIKAM_DISPLAY_ORDER_STATISTICS'); ?></td>
By
<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
$valid_order_statuses = explode(',', $this->config->get('valid_order_statuses', 'confirmed,shipped'));
By
$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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 9 years 5 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 247
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
9 years 5 months ago #174653

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?

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 5 months ago #174673

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

'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'),
By
'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'),
It should fix the issue.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.067 seconds
Powered by Kunena Forum