- Posts: 198
- Thank you received: 4
How to show order history in frontend?
When order status changed, what was the name of order status and even what was the Modification reason for that.
Please Log in or Create an account to join the conversation.
You can display these different informations, you have to edit:
yourSite\components\com_hikashop\views\order\view.html.php > function listing().
Add:
Before:
And in :
yourSite\components\com_hikashop\views\order\tmpl\listing.php
Add:
In the listing table, after the line:
<?php echo $row->order_number; ?>
Please Log in or Create an account to join the conversation.
where exactly is "In the listing table, between <tr><td> tags for each elements" can you provide line numbers?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
What if there was 5 order changes with different reasons in different time. I can not see that.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
$database->setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT max(history_id) FROM '.hikashop_table('history').' WHERE `history_order_id` = '.$rows[$k]->order_id.' AND history_type = "modification" )');
to:
$database->setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT history_id FROM '.hikashop_table('history').' WHERE `history_order_id` = '.$rows[$k]->order_id.' AND history_type = "modification" )');
in the other file (the view.html.php)
Please Log in or Create an account to join the conversation.
And of course we need to handle languages of order statuses to disply correctly with Falang.
But already thank you nicolas!
Please Log in or Create an account to join the conversation.
For the dates, you can use :
Please Log in or Create an account to join the conversation.
Date is in some numbers format.
Order statuses are not in correct language.
now code in listing.php looks:
and in website it looks like:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
$hist->history_new_status
by:
$this->order_statuses->trans($hist->history_new_status)
in the previous code.
Please Log in or Create an account to join the conversation.
I think this feature is very useful, and VM is a big competitor in this field.
Is there a possibility to attache file in frontend near all users orders? I need to give a special reports for my customers about theirs orders.
For example when i'm changing order status, i'm putting a modification reason and need to attache a file to it. So that this file could be in email and in frontend "My orders" section.
Please Log in or Create an account to join the conversation.
If you create a custom field of the table "order" and of the type "file" which is unpublished for the front end, you can have such upload possibility. The file will be in the email and in the order details page automatically.
Please Log in or Create an account to join the conversation.