Skip to main content

How to show order history in frontend?

More
14 years 1 month ago #62264 by arnask
nicolas, can you write exactly what needs to be done to achieve this?

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

More
14 years 1 month ago #62377 by nicolas
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.

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

More
8 years 8 months ago #287219 by aminweb
hi,
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.

More
8 years 8 months ago #287220 by Jerome
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 & HikaSerial developer / HikaShop core dev team.

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

More
8 years 8 months ago #287263 by aminweb
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.

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

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

More
8 years 7 months ago #287267 by nicolas
Hi,

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

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

More
8 years 7 months ago #287343 by aminweb
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>

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

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

More
8 years 7 months ago #287346 by nicolas
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:
<?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(); ?>
so that you can then use $row->history

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

Time to create page: 0.191 seconds
Powered by Kunena Forum