Skip to main content

Modifying Order View

More
11 years 8 months ago #187391 by Ed_Hika
Modifying Order View was created by Ed_Hika
-- 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.
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.
Code:
/* 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.

More
11 years 8 months ago #187393 by nicolas
Replied by nicolas on topic Modifying Order View
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.148 seconds
Powered by Kunena Forum