- Posts: 35
- Thank you received: 0
Change content of invoice
I have done a quick search but cannot find the right answer to my question (or I didn't understand it!!
I have the free edition of the excellent Hikashop.
What I would like to do is have the ability to alter the text within the invoice to add a greeting or latest news/offers. Plus, how would I go about adding the order number to the invoice as my customers will only have an invoice number once they've paid and the invoice does not include the order number
Thanks in advance for your help
Cheers
LT
Please Log in or Create an account to join the conversation.
To change the text of the invoice, you can edit the view "order / show".
In this view, you should be able to see that it's used for the order and for the invoice, only some variables are in only one.
So you can use the order number to put it in the invoice part.
Please Log in or Create an account to join the conversation.
Thanks for the reply. I have found the file you refer to. I'm not good with php, however, I notice a line at the top of the page that refers to the invoice and order number. However, it has an else statement so my understanding is that as it stands, it will show either, not both.
Would you be kind enough to advise how I would go about changing this to show both by default please
and
Thanks again Xavier
Please Log in or Create an account to join the conversation.
To always have both, you have to remove the if / else statement like:
Please Log in or Create an account to join the conversation.
Edited the lines as per above in my templates, but when I added a new order, the invoice still only gave me the invoice number.
I don't have to edit the other templates as well do I?
Thanks for all your support over the months, it has been invaluable
Please Log in or Create an account to join the conversation.
You probably have to edit too the view "order / invoice" to add the order number.
And be sure that you are editing in the good template.
Please Log in or Create an account to join the conversation.
Thanks for the reply again
The only invoice files I have are for the back end in the pre-installed templates, not the ones I'm working from.
Cheers
LT
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That was the file I changed originally, but when I go to view/print an invoice, the order number is not displayed. I copied and pasted the code from above, but this hasn't changed the output
Please Log in or Create an account to join the conversation.
You have to cut/paste the code:
Please Log in or Create an account to join the conversation.
In my frontend template, I have added/edited the following code:
<div id="hikashop_order_main">
<fieldset><div class="header hikashop_header_title">
<h1>
<?php
echo JText::_('HIKASHOP_ORDER').':'.@$this->element->order_number;
echo JText::_('INVOICE').':'.@$this->element->order_invoice_number;
?>
</h1>
</div>
<?php if($this->invoice_type=='order'){?>
and:
<div id="hikashop_order_right_part" class="hikashop_order_right_part">
<?php echo JText::_('DATE').': '.hikashop_getDate($this->element->order_created,'%d %B %Y ');?><br/>
<?php if(isset($this->element->order_number){
echo JText::_('HIKASHOP_ORDER');
echo ': '.@$this->element->order_number;
}elseif(isset($this->element->order_invoice_number)){
echo JText::_(strtoupper($this->invoice_type));
echo ': '.@$this->element->order_invoice_number;
}
?> </div>
to no avail.
Xavier/Nicolas, thanks heaps for the time you've spent with this. Any ideas where I'm going wrong?
Template is A4Joomla-twighlight free, Joomla version is 2.5.9
Cheers
LT
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
When the order is created, the order number is the invoice number. However, when the order is shipped, the invoice number is different and the order number is not on the invoice.
I would like the order number to be rather the invoice number as well, or, the order number to appear on the invoice.
Although you have helped a lot, this last edit hasn't worked.
Thanks for all your time
LT
Please Log in or Create an account to join the conversation.
The code given should do the job, it display the order number on the invoice.
In case of order display, only the order number is present, and if invoice, the both numbers are present.
You can try to edit a little the code to have what you need, it require some php knowledge.
Try to make this modification in the view "order / invoice" (backend template) too.
Please Log in or Create an account to join the conversation.