[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 2 months ago [\#62264](#62264) 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?start=20#62264 "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.")*

nicolas, can you write exactly what needs to be done to achieve this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

14 years 2 months ago [\#62377](#62377) 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?start=20#62377 "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.")*

Go in the menu Display&gt;Custom fields. Create a new custom field of the table "order" and of the type "file" which is unpublished for the front end and save.
That's all.

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

- **[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")**
- [![aminweb's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38602.png)](/forum/user/38602-aminweb "View aminweb's Profile")
- [ Offline](/forum/user/38602-aminweb)
- Amin

Less More

- Posts: 138
- Thank you received: 4
-
-
-

8 years 9 months ago [\#287219](#287219) by [aminweb](/forum/user/38602-aminweb "View aminweb's Profile")  Replied by *[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend?start=20#287219 "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,
I do it in hikashop 3.2 , but error.
please update code .thanks

---

Joomla Developer \| am.ebrahimzadeh\[at\]gmail.com

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

8 years 9 months ago [\#287220](#287220) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend?start=20#287220 "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,

I don't know what code you're talking about exactly but for what I can see in page 1, it's still some valid code.

Regards

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")**
- [![aminweb's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38602.png)](/forum/user/38602-aminweb "View aminweb's Profile")
- [ Offline](/forum/user/38602-aminweb)
- Amin

Less More

- Posts: 138
- Thank you received: 4
-
-
-

8 years 9 months ago [\#287263](#287263) by [aminweb](/forum/user/38602-aminweb "View aminweb's Profile")  Replied by *[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend?start=20#287263 "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 use this code for display history reason in front-end order list :
echo JText::_( 'REASON_HISTORY' ), ' ',$row-&gt;history[0]-&gt;history_reason;

but dont show value.

---

Joomla Developer \| am.ebrahimzadeh\[at\]gmail.com

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

8 years 9 months ago [\#287267](#287267) 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?start=20#287267 "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,

Where exactly in the listing file are you adding that code ?

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

- **[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")**
- [![aminweb's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar38602.png)](/forum/user/38602-aminweb "View aminweb's Profile")
- [ Offline](/forum/user/38602-aminweb)
- Amin

Less More

- Posts: 138
- Thank you received: 4
-
-
-

8 years 9 months ago [\#287343](#287343) by [aminweb](/forum/user/38602-aminweb "View aminweb's Profile")  Replied by *[aminweb](/forum/user/38602-aminweb "View aminweb's Profile")* on topic *[Re: How to show order history in frontend?](/forum/4-how-to/44184-how-to-show-order-history-in-frontend?start=20#287343 "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.")*

component/com_hikashop/veiw/order/tmpl/listing.php

&lt;td class="hikashop_order_date_value"&gt;
&lt;?php
echo JText::_( 'DATA_HISTORY_YOOL' ), ' '.hikashop_getDate($row-&gt;order_modified,'%Y-%m-%d %H:%M').' ';
echo JText::_( 'STAT_HISTORY_YOOL' ), ' ',$this-&gt;order_statuses-&gt;trans($row-&gt;order_status). ' ',JText::_( 'STAT2_HISTORY_YOOL' );
echo JText::_( 'REASON_HISTORY_YOOL' ), ' ',$row-&gt;history[0]-&gt;history_reason; ?&gt;
&lt;/td&gt;

---

Joomla Developer \| am.ebrahimzadeh\[at\]gmail.com

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

8 years 9 months ago [\#287346](#287346) 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?start=20#287346 "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,

The history is not loaded for each order on the listing.
This code was for displaying the history in the "show" file of the "order" view.
In the listing, you would have to do something like that: Code:

&lt;?php $database = JFactory::getDBO(); $query='SELECT * FROM '.hikashop_table('history').' WHERE history_order_id='.$row-&gt;order_id.' ORDER BY history_created DESC'; $database-&gt;setQuery($query); $row-&gt;history = $database-&gt;loadObjectList(); ?&gt;

so that you can then use $row-&gt;history

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzQ0MTg0LWhvdy10by1zaG93LW9yZGVyLWhpc3RvcnktaW4tZnJvbnRlbmQ/c3RhcnQ9MjAmdG1wbD1tYXJrZG93bg==) 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.063 seconds

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