Sales report - products from shipped orders

  • Posts: 46
  • Thank you received: 3
7 years 11 months ago #257140

-- HikaShop version -- : 2.6.4 Business
-- Joomla version -- : 3.6.4

Hi,
I need to create report, which contains quantities of products from orders, which were shipped in certain period.
When I filter orders with status "shipped" and set date type "created", I get only those orders, which were created AND shipped in this time period (not those orders, which were created earlier).
When I filter shipped orders and set date type "last modified", I get also orders, which were shipped earlier, but were modified during the selected period (sometimes there is added information about payment date or some note later on).
Is it possibe to create report of products from orders SHIPPED in certain period - doesn´t matter if and where they were created or modified?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #257144

Hi,

The information of when an order was shipped is not stored with the order but with the corresponding entry of the order in the history table.
So it's not adapted to be used as a filter for a orders report.
There is no other option in the reports system than order created or order modified.

If you jsut want an export of the orders and that you're ok to get the ones that are "shipped" and that were confirmed (paid) during the period you want, then you can use a mass action with a filter on the order_status column, two filters on the order_invoice_created comparing it to the unix timestamp of the dates you want, and one action CSV export. You can do that via the menu System>Mass actions.

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

  • Posts: 46
  • Thank you received: 3
7 years 11 months ago #257293

Thank you, Nicolas. Mass actions are great, I know this possibility, but I need a sum of products - one product name and one number (total ordered during certain period) per row.
Is is possible to somehow add the filter from order history table to order reports?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #257315

Hi,

It sure is possible. You can develop a hikashop plugin and implement the necessary triggers in it to add the filter you want.
You can use the system hikashopmassaction plugin and the hikashop massactionorder plugin as examples of how to do it.
If you're a skilled developer, it sure is possible.

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

  • Posts: 46
  • Thank you received: 3
7 years 11 months ago #257716

Hi Nicolas,
and what about this solution: Mass action, Data - Order, used filters order_status and order_invoice_created. Export CSV with columns order_product_id and order_product_quantity.
Now I need to get sum of quantities per each product. I can use Excel like this www.extendoffice.com/documents/excel/163...-another-column.html
But CSV which I get has dynamic columns. Any ideas how to do that?
Thank you!

EDIT: I have just noticed, that order_product_id and product_id are not the same. So it´s not a good solution. But anyway, is it possible to use SUMIF formula to count sum of dynamic columns?

Last edit: 7 years 11 months ago by montemama.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #257718

Hi,

Well, possible but again, it would require the development of a mass action plugin.

Here is an alternative solution without coding.
You can use the standard export button of the orders listing and install and activate that plugin:
www.hikashop.com/component/updateme/ctrl...uickbooksexport.html
That will give you a CSV with one row per order per product.
And thanks to the filters at the top of the orders listing you can restrict the orders used for the CSV to a date range, an order status, etc.
So once you get the CSV, you can edit it with Excel and sum the data like you explained in your message.

The following user(s) said Thank You: montemama

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

  • Posts: 46
  • Thank you received: 3
7 years 11 months ago #257788

Thank you very very much, Nicolas! This is what I need. There is just one small step to perfection missing.
I have customised export.php (attached) to view only selected columns in desired array and when I apply this plugin, some columns are empty (order_created, order_product_code, order_product_quantity, order_product_name, order_product_price, order_payment_price, order_shipping_id, custom filed fa with custom invoice number, comment).
I have tried to use original export.php, but it didin´t work at all - I get syntax error, unexpected ',' when I try to export orders.
Could you, please, give me a hint what and where do I need to correct? Is there some conflict between this plugin and customised export.php or there is something missing in the code?

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #257792

Hi,

The plugin works fine with the standard HikaShop export file. So if you get an error, it means that you messed up something.
Download the install package on our website and get the content of the file back/views/order/tmpl/export.php and paste it to your order/export view file so that it will have the correct code that is in HikaShop by default.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum