- Posts: 42
- Thank you received: 2
Include Invoice Number in Order Listing
12 years 11 months ago #130660
by GSW00d
Include Invoice Number in Order Listing was created 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!
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.
12 years 11 months ago #130675
by nicolas
Replied by nicolas on topic Include Invoice Number in Order Listing
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; ?>
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.
12 years 11 months ago #130725
by GSW00d
Replied by GSW00d on topic Include Invoice Number in Order Listing
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,
Many thanks,
Please Log in or Create an account to join the conversation.
12 years 11 months ago #130732
by nicolas
Replied by nicolas on topic Include Invoice Number in Order Listing
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.
12 years 11 months ago #130753
by GSW00d
Replied by GSW00d on topic Include Invoice Number in Order Listing
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
<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.
12 years 11 months ago #130764
by nicolas
Replied by nicolas on topic Include Invoice Number in Order Listing
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.
$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.
12 years 11 months ago #130807
by GSW00d
Replied by GSW00d on topic Include Invoice Number in Order Listing
Thank you! Working like a dream!
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds