[solved] Hikamarket Statistic module: Total vendors, Total products, Total Order

  • Posts: 136
  • Thank you received: 7
6 years 1 month ago #289580

-- HikaShop version -- : 3.3.0
-- HikaMarket version -- : 2.1.0
-- Joomla version -- : 3.8.6
-- PHP version -- : 7.0.25

Hi

I would like to add a Hikamarket statistics modul on my frontpage that shows: Total vendors, Total products, Total Orders.
Something like what you see in back-end of Hikamarket Dashboard, with "Numbers of vendors" and "Orders unpaid".

Is there a module/plugin for that?

If not. I will try to develop one.

Regards,
Henrik


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 6 years 1 month ago by flexsus.

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
6 years 1 month ago #289588

Hello,

You're talking about the statistics blocks which are displayed in the front-end vendor dashboard ?

There is no existing module to display these elements but it is possible to perform the display using a bit of PHP.
So you can create a custom module and call the HikaMarket statistics.
But you should be sure to only display the module for logged vendors because these statistics blocks are made for the vendors.
If you want to display other kind of element and also for guest users, it would require custom development for the custom queries.
You could still use a part of the HikaMarket statistic class for processing and display ; but the "block configuration" would need to be coded for your requirements.

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: 136
  • Thank you received: 7
6 years 1 month ago #289674

You're talking about the statistics blocks which are displayed in the front-end vendor dashboard ?

Yes, and no.
Yes, it is some of the data shown to a vendor in his Dashboard. But no, not for his data only, but for all shop/market.

I'm already doing a custom module that builds on module \administrator\moduels\mod_status\ to get "Online right now" on my site.
And then I found SQL in \administrator\components\com_hikamarket\classes\statistics.php on how to get "Total vendors".
And then I looked at databse to get SQL for "Total products".
And then putting it together in a module called \mod_hikamarket_stats.

Already working :-)

Would it be OK to share here?

It is not something I will support, but maybe others can use it and build on it or maybe you could consider making it at Hikamarket Module?

Best regards,
Henrik


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Attachments:

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
6 years 1 month ago #289681

Hello,

Sure you can share it.
If you don't want to support it for the long term ; maybe we could make a github folder like some other third party plugins.

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: 136
  • Thank you received: 7
6 years 1 month ago #289793

Hi Jerome

I'm not a developer and don't want to support it. And it is not that I need to get credit for doing this module. If you would like, you can use it and maybe make it a standard part of Hikamarket modules? Feel free to change all code and make it better.

It is working the way I would like in my site. I will soon go online with my site that I have been building on for years! :-)

Anyways.. I have attached the module and you can view it on my site.

Best regards,
Henrik

File Attachment:

File Name: mod_hikama...tats.zip
File Size:9 KB


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Attachments:
Last edit: 6 years 1 month ago by flexsus.
The following user(s) said Thank You: n00bster

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
6 years 1 month ago #289805

Hello,

See : github.com/HikaShop/mod_hikamarket_storestats

I just cleaned a bit some PHP files (to remove the HikaMarket parts in the header) and I also change the way that the queries are made to use the Joomla 3 query system.

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: 136
  • Thank you received: 7
6 years 1 month ago #289856

Hi Jerome

Thank you for cleaning up the code and putting it on Github ;)

I have added "Total shipped orders" to the module. Fixed a bug in how to get module suffix. Added CSS for mobile device. And added option to set Show/Hide on the different statistics in the module, so that you can decide what to show in frontend.

I committed it all local, but cannot push to repository. I'm kind of new to Github (I use Bitbucket). Should you invite me? And will you do so? Or should I just attach here again?

I'm 'quercusdk' on Github.

Best regards,
Henrik


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 6 years 1 month ago by flexsus.

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

  • Posts: 136
  • Thank you received: 7
6 years 1 month ago #289858

Nevermind! :whistle:
I found out why :unsure:
I had to change my URL to: github.com/quercusdk/mod_hikamarket_storestats

Regards,
Henrik


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
6 years 1 month ago #289860

Hello,

In your repostiroy fork you will find a button "new pull request" which will allow you to submit your commits into the parent repository.
Then I would just have to accept your pull request and it will be merged into the HikaShop repository.

Bitbucket and Github are similar, they are all based on "git" and allow everybody to create forks and make pull requests for improvements.

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: 136
  • Thank you received: 7
6 years 1 month ago #289864

Nice! :-)
Done! Made a Pull Request.


.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

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