Pull data from hikashop_history table

  • Posts: 99
  • Thank you received: 5
1 year 6 months ago #351834

-- HikaShop version -- : 4.7.2
-- Joomla version -- : 3.10.11
-- PHP version -- : 8.0.28

Hello,
We are wishing to search the hikashop_history table to get some information from multiple orders.
The hikashop_history is shown per order on the order details page. We would like to query this table.
Is there a method to do this using REPORTS and/or MASS ACTIONS?

The issue we face is the order is tagged with the last action change and so if an order is paid after it is shipped then that order will not be shown in a list of shipped orders - as the last moficiation was set to 'paid'.

We would like to get a list of all shipped orders even if the last modification is something else after the order has been shipped.
Currently we are unable / do not know how to achieve this.

I cannot seem to locate the table in the Hikashop Admin UI in Mass Action or Reports
I can see the table in phpMyAdmin however I do not understand how to get the date of modification.

Please advise.

Attachments:

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 6 months ago #351839

Hello,

Did you look the HikaShop MassAction system?
You can learn more thanks to this documentation .

In order to target order table, and especially the order statuses look my red bordered part, and to display or process on your order data have a look on the Action part, in the green bordered part, and select your required action among, if I understand you correctly you will use either "Export a CSV file" or "Update the value".



Regards

Last edit: 1 year 6 months ago by Philip.

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

  • Posts: 99
  • Thank you received: 5
1 year 6 months ago #351855

Hello Philip,
Thank you for your reply.

Did you look at the HikaShop MassAction system?
>> Yes, I have used MassAction and I understand (basically) how to use it.

Thank you for the detailed instruction to get the current order status - unfortunately this is not what we are wanting to achieve.
We do not need to make changes to the status. We want to get the information from the hikashop_history table that is found in the ORDER DETAILS screen. We need to get the date for previously shipped statuses.

However, the table hikashop_history is not available in MassActions - is there a way to add this table?

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 6 months ago #351857

Hi,

You won't be able to do that with a mass action.
You'll have to do that in your PHPMyAdmin with a MySQL query:

SELECT DISTINCT order.order_number, FROM_UNIXTIME(history.history_created) FROM #__hikashop_history as history INNER JOIN #__hikashop_order as order ON history.history_order_id = order.order_id WHERE history.history_new_status = 'shipped';
where #__ needs to be replaced by the table prefix of your Joomla configuration.

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

  • Posts: 99
  • Thank you received: 5
1 year 6 months ago #351871

Hi Nicolas,
Thank you for your directions, I have used them as start to get the data.
I appreciate your help.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum