[Skip to main content](#vessel-content)

#   How to show order history in frontend?

##

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44184](#44184) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  *[How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44184 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")* was created by *[arnask](/forum/user/6752-arnask "View arnask's Profile")*

now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history:
When order status changed, what was the name of order status and even what was the Modification reason for that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 7 months ago -  14 years 7 months ago [\#44347](#44347) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44347 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Hi arnask,

You can display these different informations, you have to edit:
yourSite\components\com_hikashop\views\order\view.html.php &gt; function listing().

Add: Code:

foreach($rows as $k =&gt; $hist){ $database-&gt;setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT max(history_id) FROM '.hikashop_table('history').' WHERE &#96;history_order_id&#96; = '.$rows[$k]-&gt;order_id.' AND history_type = "modification" )'); $rows[$k]-&gt;history = $database-&gt;loadObjectList(); }

Before: Code:

$this-&gt;assignRef('rows',$rows);

And in :
yourSite\components\com_hikashop\views\order\tmpl\listing.php

Add: Code:

&lt;?php echo '&lt;br/&gt;'.hikashop_getDate($row-&gt;order_modified,'%Y-%m-%d %H:%M').' / '; echo $row-&gt;history[0]-&gt;history_new_status.' / '; echo $row-&gt;history[0]-&gt;history_reason; ?&gt;

In the listing table, after the line:
&lt;?php echo $row-&gt;order_number; ?&gt;

Last edit: 14 years 7 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44408](#44408) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44408 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Parse error: syntax error, unexpected T_VARIABLE in .../components/com_hikashop/views/order/tmpl/listing.php on line 123

where exactly is "In the listing table, between &lt;tr&gt;&lt;td&gt; tags for each elements" can you provide line numbers?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44410](#44410) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44410 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

I've fixed the code in the previous message, please try with that new code.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago -  14 years 7 months ago [\#44418](#44418) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44418 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

no good:

[ ![orderslisting.jpg](/forum/attachment/3195) ](/forum/attachment/3195 "orderslisting.jpg")

- [ ![orderslisting.jpg](/forum/attachment/3195) ](/forum/attachment/3195 "orderslisting.jpg") [ ](/forum/attachment/3195?download=1 "orderslisting.jpg")

Last edit: 14 years 7 months ago by [arnask](/forum/user/6752-arnask "View arnask's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44420](#44420) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44420 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Make sure that you also add the first modification in your view.html.php file

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44426](#44426) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44426 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

yes i've done that. Now it loks like: Code:

$this-&gt;assignRef('params',$params); foreach($rows as $k =&gt; $hist){ $database-&gt;setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT max(history_id) FROM '.hikashop_table('history').' WHERE &#96;history_order_id&#96; = '.$rows[$k]-&gt;order_id.' AND history_type = "modification" )'); $rows[$k]-&gt;history = $database-&gt;loadObjectList(); } $this-&gt;assignRef('rows',$rows);

[ ![orderslisting2.jpg](/forum/attachment/3196) ](/forum/attachment/3196 "...rslisting2.jpg")

- [ ![orderslisting2.jpg](/forum/attachment/3196) ](/forum/attachment/3196 "...rslisting2.jpg") [ ](/forum/attachment/3196?download=1 "...rslisting2.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44436](#44436) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44436 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

So that means that there was no reason given in the last modification of the order.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44442](#44442) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44442 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

yes, but i still can not see all the history of order. Only the last change.
What if there was 5 order changes with different reasons in different time. I can not see that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44445](#44445) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44445 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

You would have to use that code then:
Code:

&lt;?php foreach($row-&gt;history as $hist){ echo '&lt;br/&gt;'.hikashop_getDate($row-&gt;order_modified,'%Y-%m-%d %H:%M').' / '; echo $hist-&gt;history_new_status.' / '; echo $hist-&gt;history_reason; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44446](#44446) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44446 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

still the last one. No history.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44447](#44447) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44447 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Change also the line:
$database-&gt;setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT max(history_id) FROM '.hikashop_table('history').' WHERE &#96;history_order_id&#96; = '.$rows[$k]-&gt;order_id.' AND history_type = "modification" )');

to:
$database-&gt;setQuery('SELECT * FROM '.hikashop_table('history').' WHERE history_id IN(SELECT history_id FROM '.hikashop_table('history').' WHERE &#96;history_order_id&#96; = '.$rows[$k]-&gt;order_id.' AND history_type = "modification" )');

in the other file (the view.html.php)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44474](#44474) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44474 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

now it ok, onnly we need to handle dates, because everything is in the same last modification date.
And of course we need to handle languages of order statuses to disply correctly with Falang.

But already thank you nicolas!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 7 months ago -  14 years 7 months ago [\#44484](#44484) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44484 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Hi arnask,

For the dates, you can use : Code:

$hist-&gt;history_created;

Last edit: 14 years 7 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#44678](#44678) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44678 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

still it shows the last modification date for all modifications.
Date is in some numbers format.
Order statuses are not in correct language.

now code in listing.php looks: Code:

&lt;?php foreach($row-&gt;history as $hist){ echo '&lt;br/&gt;'.hikashop_getDate($row-&gt;order_modified,'%Y-%m-%d %H:%M').' / '; echo $hist-&gt;history_new_status.' / '; echo $hist-&gt;history_reason; echo $hist-&gt;history_created; } ?&gt;

and in website it looks like:

[ ![orderslisting4.jpg](/forum/attachment/3228) ](/forum/attachment/3228 "...rslisting4.jpg")

- [ ![orderslisting4.jpg](/forum/attachment/3228) ](/forum/attachment/3228 "...rslisting4.jpg") [ ](/forum/attachment/3228?download=1 "...rslisting4.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#44860](#44860) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#44860 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Do like that instead: Code:

&lt;?php foreach($row-&gt;history as $hist){ echo '&lt;br/&gt;'.hikashop_getDate($hist-&gt;history_created,'%Y-%m-%d %H:%M').' / '; echo $hist-&gt;history_new_status.' / '; echo $hist-&gt;history_reason; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 7 months ago [\#45008](#45008) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#45008 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

Thanks, it works now. But there is still language issue. How to make "history_new_status" display correct language?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 7 months ago [\#45167](#45167) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#45167 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

You can replace:
$hist-&gt;history_new_status
by:
$this-&gt;order_statuses-&gt;trans($hist-&gt;history_new_status)

in the previous code.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[arnask](/forum/user/6752-arnask "View arnask's Profile")**
- [![arnask's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6752-arnask "View arnask's Profile") Topic Author
- [ Offline](/forum/user/6752-arnask)

Less More

- Posts: 198
- Thank you received: 4
-
-

14 years 2 months ago -  14 years 2 months ago [\#62200](#62200) by [arnask](/forum/user/6752-arnask "View arnask's Profile")  Replied by *[arnask](/forum/user/6752-arnask "View arnask's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#62200 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

after updating hikashop, everything has gone, and now i need to do it all again. Is there a chance that it will be implemented in future hikashop?
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.

Last edit: 14 years 2 months ago by [arnask](/forum/user/6752-arnask "View arnask's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14277
-
-

14 years 2 months ago [\#62262](#62262) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend#62262 "now i'm only can show list of orders and here user can see last updated order status. But what if i want to show for user all his order history: When order status changed, what was the name of order status and even what was the Modification reason for that.")*

If you do your modifications via the menu Display-&gt;Views you won't loose them when you update.

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.152 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
