Include Invoice Number in Order Listing

  • Posts: 42
  • Thank you received: 2
11 years 1 month ago #130660

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.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 month ago #130675

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.

  • Posts: 42
  • Thank you received: 2
11 years 1 month ago #130725

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.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 month ago #130732

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.

  • Posts: 42
  • Thank you received: 2
11 years 1 month ago #130753

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.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 month ago #130764

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.

  • Posts: 42
  • Thank you received: 2
11 years 1 month ago #130807

Thank you! Working like a dream! :)

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

Time to create page: 0.062 seconds
Powered by Kunena Forum