Skip to main content

Include Invoice Number in Order Listing

More
12 years 11 months ago #130660 by GSW00d
Hi Hika Team!

Wondering how to include the invoice numbers on the "administrator/index.php?option=com_hikashop&ctrl=order" page. Which view should I edit and with what?

Many thanks!

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

More
12 years 11 months ago #130675 by nicolas
Hi,

You should edit the file "listing" of the view "order" of the frontend and change the line:
<?php echo $row->order_number; ?>

For example you could have instead:
<?php echo $row->order_number; ?><br/>Invoice <?php echo $row->order_invoice_number; ?>

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

More
12 years 11 months ago #130725 by GSW00d
Thanks for that. :) I'm really interested in listing the invoice on the backend however (at administrator/index.php?option=com_hikashop&ctrl=order). Which backend view should be edited?

Many thanks,

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

More
12 years 11 months ago #130732 by nicolas
It's the same modification but for the listing view file of the order view of the backend.

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

More
12 years 11 months ago #130753 by GSW00d
Thanks, I've added this:

<th class="hikashop_order_number_title title">
<?php echo JHTML::_('grid.sort', JText::_('INVOICE'), 'b.order_invoice_number', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
</th>

and this

<td class="hikashop_order_number_value">
<?php if($this->manage){ ?>
<a href="<?php echo hikashop_completeLink('order&task=edit&cid[]='.$row->order_id.'&cancel_redirect='.urlencode(base64_encode(hikashop_completeLink('order')))).$target; ?>">
<?php } ?>
<?php echo $row->order_invoice_number; ?>
<?php if($this->manage){ ?>
</a>
<?php } ?>
</td>

How do I get the search function to include the invoice number?

Regards

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

More
12 years 11 months ago #130764 by nicolas
That will require to directly modify the code of the file administrator/components/com_hikashop/views/order/view.html.php :
$searchMap = array('c.id','c.username','c.name','a.user_email','b.order_user_id','b.order_number','b.order_id','b.order_full_price');
Unfortunately, it means that you will loose that change each time you update.
The following user(s) said Thank You: GSW00d

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

More
12 years 11 months ago #130807 by GSW00d
Thank you! Working like a dream! :)

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

Time to create page: 0.190 seconds
Powered by Kunena Forum