Skip to main content

Show "history" wich contains PayPal transactions

More
12 years 11 months ago #131660 by TheCoreStylerz
-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.2
-- Joomla version -- : latest 2.5.x

Hi.
I want to add some history data inside the user order page, like the transaction ID made with paypal.
What rows and where i need to change?

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

More
12 years 11 months ago #131664 by TheCoreStylerz
Better in that way, adding the history below the order page:



This will be reallyt cool.

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

More
12 years 11 months ago #131678 by TheCoreStylerz
Also, if possible to attach the transaction ID to the "confirmation" email?

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

More
12 years 11 months ago #131712 by nicolas
There's no easy way to do that.
You'll have to edit the file "show" of the view "order" via the menu Display>Views and add such code:
Code:
<?php $this->database = JFactory::getDBO(); $query='SELECT * FROM '.hikashop_table('history').' WHERE history_order_id='.$this->element->order_id.' ORDER BY history_created DESC'; $this->database->setQuery($query); $this->element->history = $this->database->loadObjectList(); $this->order =& $this->element; ?> <legend><?php echo JText::_('HISTORY'); ?></legend> <div class="hikashop_history_container"> <table id="hikashop_order_history_listing" class="hika_listing hika_table table table-striped table-hover"> <thead> <tr> <th class="title"><?php echo JText::_('HIKA_TYPE'); ?></th> <th class="title"><?php echo JText::_('ORDER_STATUS'); ?></th> <th class="title"><?php echo JText::_('REASON'); ?></th> <th class="title"><?php echo JText::_('HIKA_USER').' / '.JText::_('IP'); ?></th> <th class="title"><?php echo JText::_('DATE'); ?></th> <th class="title"><?php echo JText::_('INFORMATION'); ?></th> </tr> </thead> <tbody> <?php $userClass = hikashop_get('class.user'); foreach($this->order->history as $k => $history) { ?> <tr> <td><?php $val = preg_replace('#[^a-z0-9]#i','_',strtoupper($history->history_type)); $trans = JText::_($val); if($val != $trans) $history->history_type = $trans; echo $history->history_type; ?></td> <td><?php echo hikashop_orderStatus($history->history_new_status); ?></td> <td><?php echo $history->history_reason; ?></td> <td><?php if(!empty($history->history_user_id)){ $user = $userClass->get($history->history_user_id); echo $user->username.' / '; } echo $history->history_ip; ?></td> <td><?php echo hikashop_getDate($history->history_created,'%Y-%m-%d %H:%M'); ?></td> <td><?php echo $history->history_data; ?></td> </tr> <?php } ?> </tbody> </table> </div>

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

Time to create page: 0.083 seconds
Powered by Kunena Forum