- Posts: 198
- Thank you received: 4
How to show order history in frontend?
14 years 1 month ago #62264
by arnask
Replied by arnask on topic Re: How to show order history in frontend?
nicolas, can you write exactly what needs to be done to achieve this?
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62377
by nicolas
Replied by nicolas on topic Re: How to show order history in frontend?
Go in the menu Display>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.
That's all.
Please Log in or Create an account to join the conversation.
8 years 8 months ago #287219
by aminweb
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Replied by aminweb on topic Re: How to show order history in frontend?
hi,
I do it in hikashop 3.2 , but error.
please update code .thanks
I do it in hikashop 3.2 , but error.
please update code .thanks
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
8 years 8 months ago #287220
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Re: How to show order history in frontend?
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
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 & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
8 years 8 months ago #287263
by aminweb
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Replied by aminweb on topic Re: How to show order history in frontend?
I use this code for display history reason in front-end order list :
echo JText::_( 'REASON_HISTORY' ), ' ',$row->history[0]->history_reason;
but dont show value.
echo JText::_( 'REASON_HISTORY' ), ' ',$row->history[0]->history_reason;
but dont show value.
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
8 years 7 months ago #287267
by nicolas
Replied by nicolas on topic Re: How to show order history in frontend?
Hi,
Where exactly in the listing file are you adding that code ?
Where exactly in the listing file are you adding that code ?
Please Log in or Create an account to join the conversation.
8 years 7 months ago #287343
by aminweb
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Replied by aminweb on topic Re: How to show order history in frontend?
component/com_hikashop/veiw/order/tmpl/listing.php
<td class="hikashop_order_date_value">
<?php
echo JText::_( 'DATA_HISTORY_YOOL' ), ' '.hikashop_getDate($row->order_modified,'%Y-%m-%d %H:%M').' ';
echo JText::_( 'STAT_HISTORY_YOOL' ), ' ',$this->order_statuses->trans($row->order_status). ' ',JText::_( 'STAT2_HISTORY_YOOL' );
echo JText::_( 'REASON_HISTORY_YOOL' ), ' ',$row->history[0]->history_reason; ?>
</td>
<td class="hikashop_order_date_value">
<?php
echo JText::_( 'DATA_HISTORY_YOOL' ), ' '.hikashop_getDate($row->order_modified,'%Y-%m-%d %H:%M').' ';
echo JText::_( 'STAT_HISTORY_YOOL' ), ' ',$this->order_statuses->trans($row->order_status). ' ',JText::_( 'STAT2_HISTORY_YOOL' );
echo JText::_( 'REASON_HISTORY_YOOL' ), ' ',$row->history[0]->history_reason; ?>
</td>
Joomla Developer | am.ebrahimzadeh[at]gmail.com
Please Log in or Create an account to join the conversation.
8 years 7 months ago #287346
by nicolas
Replied by nicolas on topic Re: How to show order history in frontend?
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:
so that you can then use $row->history
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:
<?php $database = JFactory::getDBO();
$query='SELECT * FROM '.hikashop_table('history').' WHERE history_order_id='.$row->order_id.' ORDER BY history_created DESC';
$database->setQuery($query);
$row->history = $database->loadObjectList();
?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.191 seconds