Modifying Order View

  • Posts: 109
  • Thank you received: 5
10 years 7 months ago #187391

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

Hello, there.

Good morning!

I have made the following changes to the order/view.html.php file and would like to suggest for these to be incorporated. Apologies if there is a Joomla! override that I can use instead. Please let me know how I can implement the override if there is one.

The changes are:

1) retrieve the history of an order (as per forum discussion #44184)
Add the following code.

/* Modification - Retrieve order history */
		foreach($rows as $k => $hist)
		{
			$query = 'SELECT * FROM '.hikashop_table('history').
				 ' WHERE `history_order_id` = '.$rows[$k]->order_id;
			$database->setQuery($query);
			$rows[$k]->history = $database->loadObjectList();
		}
Note that the SELECT statement is slightly different from the forum discussion in that the IN clause (in the discussion) is not used.

2) call the image helper
The following code is added in the &_order and listing functions.
/* Modification - Get image helper */
		$image = hikashop_get('helper.image');
		$this->assignRef('image',$image);

This will allow for the thumbnails to be displayed in the order page (to be in sync with the order email, which shows the thumbnail).

Thanks.

Take care!

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 7 months ago #187393

Hi,

You can add both modifications at the beginning of the file "listing" of the view "order" via the menu Display>Views.
For the first code snippet, just use $this->rows instead of $rows and add the line below to initialize the $database variable:
$database = JFactory::getDBO();

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

Time to create page: 0.052 seconds
Powered by Kunena Forum