how to create report with total discount prices?

  • Posts: 170
  • Thank you received: 7
2 years 3 months ago #338761

hi
i want create a report with total prices that get to all users via each Copoun or Discount.(i can create a report with number of discount uses by users but i need sum of price for each discount code) is it possible with report system?
i can use query in PHPmyAdmin but i want to implement in joomla back-end. if you want say not possible please advise me to how to write php code to do it. is it need create massaction ar need write a custom plugin. thank you
(tip: i can not set avatar for my profile. every time i upload my avatar in kunena profile it is not any action after upload)

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 3 months ago #338763

Hi,

I don't see a way to do these in the backend.
A custom plugin would be needed.
If you can write the MySQL query to get the data in PHPMyAdmin, then it's just a matter of implementing a plugin similar to the email history plugin, which adds the menu Customers>Emails history to HikaShop's backend, but instead of displaying a listing of the entries in the email_log table which it fills automatically when an email is sent, it would run your MySQL query to get the data, and then in the view file, you would just have to display the data in an HTML table.
You can check the code of the email history plugin in the folder plugins/hikashop/email_history on your website.

The following user(s) said Thank You: sadaf3d

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

  • Posts: 170
  • Thank you received: 7
2 years 3 months ago #338900

thank you nicolas
how can i see what query generated by your report system? (because my query result is different with report result and i want understand am i in right way or not)

Last edit: 2 years 3 months ago by sadaf3d.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
2 years 3 months ago #338915

Hi,

If you activate the "debug system" setting in the Joomla configuration, you'll see all the MySQL queries run on the current page on each page of your backend and frontend.
Just unfold the MySQL queries area and look for hikashop_order when you're looking at the page where the report is displayed and you'll get the MySQL query the report uses.

The following user(s) said Thank You: sadaf3d

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

Time to create page: 0.062 seconds
Powered by Kunena Forum