Creating Customised Report

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
2 months 4 weeks ago #363426

-- HikaShop version -- : 5.1.1 [2409180854]
-- Joomla version -- : 4.4.8
-- PHP version -- : 8.2.23

Our install is selling products some of which have tax applied and some which don't.

We need to generate a quarterly report detailing the items, their price and tax collected, so when lodging with the taxation authority we have that report to provide

Is there any documentation, that my searching hasn't uncovered, that you can point me to about creating a custom report?

I've tried a few times and my logic is flawed as I constantly get an error saying that report cannot be exported.
Looking to begin again with a different optic.

Thanks

Last edit: 2 months 3 weeks ago by yerg55. Reason: Problem solved

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
2 months 4 weeks ago #363433

Hi,

So if I understand correctly, you want a report with one row per product and for each row, the total amount of taxes.
There is indeed no such report in HikaShop.
You can configure a listing with the "listing" type, for "products", with the "Displayed Information" setting set to "orders".
This will display a listing of the products, with 3 columns:
- the name of the product
- the total number of sales of that product over the selected period
- the total amount sold
If you need to add extra columns to it, it would require some custom coding of the dashdoard / product view file via the menu Display>Views.
Another option you have is to create a mass action with the type "order" action "export CSV file". In it, you can check the checkbox "One product per row" and select the order_product_name, order_product_price, order_product_quantity and order_product_tax columns.
This mass action will give you a CSV with one row for each product of each order. So if a product was bought by 6 different users, you'll get 6 rows for it.
Then, in Excel, you can group the product rows together to get one row per product:
support.microsoft.com/en-us/office/group...bf-a6e8-ef928240adf1

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

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
2 months 4 weeks ago #363458

Apologies my poor choice of words.

Back to square one

The default Export of Orders as a csv file I get 146 columns.
That's understandable

I'm seeking to use just four of those columns (ideally) .... order_created, order_invoice_number, order_full_price, order_full_tax

I go to Custom > Orders > Reports > New Report
There are 11 default reports there
Tried modifying them and either the save crashes with "go back to the dashboard" or it can't be exported

Modify Existing Report Formats.

I cannot in any manner modify any report including the following column details .... order_created, order_invoice_number, order_full_price, order_full_tax

So I figure lets Create A New Report

I add ... row of total sales and a second one of tax paid.
Report Saved
Click Export ...... This type of report cannot be exported.

So finally found this document buried here in the forum
www.hikashop.com/support/documentation/1...hop-report-form.html

No matter what generated the minimum columns generated is 75

So am I seeking to create an impossible report? :(

I would have, may be wrongly assuming, that a report with Total Value of Sales and Total Tax Paid/Collected would be a standard report or be able to be simply created.

So my question is .... am I looking for chooks teeth here?

Aussie saying ... chooks (poultry) have no teeth so they are impossible to find :blink:

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
2 months 3 weeks ago #363468

Hi,

The default Export of Orders as a csv file I get 146 columns.
That's understandable

I'm seeking to use just four of those columns (ideally) .... order_created, order_invoice_number, order_full_price, order_full_tax

If that's what you want to do, then these are not chooks teeth.
I think you just went with a wrong path. Instead of trying to do this with reports, you want to do this with a mass action.
Go in the menu System>Mass actions, create a new mass action of the type "order", and add an action "export CSV file". There, select these columns order_created, order_invoice_number, order_full_price, order_full_tax.
Then, when you click on the "process" button of the mass action, you'll get a CSV file with only these columns.
Note that by default, it will export all the orders.
If you want to filter based on the date of the orders, you'll want to add filters to your mass action on the order_created column. You can use unix timestamps, or use operations on the {time} tag.
For example, you could have a filter on the order_created column with the operation >= and the value: {time}-2592000
2592000 is the number of seconds in 30 days, so that means it will only export orders of the past 30 days.

Last edit: 2 months 3 weeks ago by nicolas.

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

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
2 months 3 weeks ago #363497

:woohoo: :woohoo: :woohoo:

Chasing snakes down rabbit holes leads to unintended outcomes

How simple was that

Thank you so much and my apologies for wasting your time

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

Time to create page: 0.065 seconds
Powered by Kunena Forum