Custom report

  • Posts: 228
  • Thank you received: 4
  • Hikashop Business
7 years 2 months ago #260118

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5

Hello,
I'd like to setup a custom report that includes, both the order and customer details. I can't see how to create a report that will export both the order details and the customer details in one CSV file. i have looked at the Mass Actions, and they work to a point, but I cannot seem to figure out how to order the fields being exported.

I have found the export.php file which I can see does the clever stuff of exporting the data you select via the Reports menu option.

Is it possible to modify this to include both the order details and the customer details in one CSV file.

Thanks

Lee

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
7 years 2 months ago #260194

Hi,

The mass action system can indeed export the order data together with the user data in a CSV file and you can choose the columns you want to export.
However, there is no system to choose the order of the columns.

The "export" button of the orders listing can also do such export but there is no option to choose which column to export.

So the only solution to get exactly what you want will be to modify the code.

For the mass action export, you would have to edit the function _exportCSV in the file administrator/components/com_hikashop/classes/massaction.php
By changing the order of the fields in $params->action, you'll be able to do that.

For the orders export button, you can edit the file "export" of the view "order" via the menu Display>Views.

The first solution is easier to implement but you'll loose it each time you update HikaShop. The second will be a bit more complex but you'll keep the changes when you update your HikaShop.

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

  • Posts: 228
  • Thank you received: 4
  • Hikashop Business
7 years 2 months ago #260220

Nicolas,
Thanks for the reply. I would much prefer the editing of the export.php override, all be it I'm probably not going to upgrade past 2.6.4 because of the changes to the template views.

Is there any documentation on how to customise the export.php to select the fields I require? I have found this thread:

www.hikashop.com/forum/import-export-csv...r-export.html#239067

But not sure I understand it! could you give a better example?

Thanks

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
7 years 2 months ago #260273

Hi,

I'm not sure what more I can say. There is even an example provided there with the code you can use to remove a column from the CSV:
www.hikashop.com/forum/import-export-csv...r-export.html#239282

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

Time to create page: 0.062 seconds
Powered by Kunena Forum