No invoice page header shows on frontend.

  • Posts: 50
  • Thank you received: 1
11 years 9 months ago #89800

Hi.

First, thx for a great component.

Two things:

1. In backend, when looking at invoices, it shows "INVOICE" as the page header. But on frontend invoices no page header shows at all. How to make that work?

2. How to add additional text that also shows on frontend invoices? When editing the order/invoice view changes only appears in backend.


/Mathias

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89850

Hi,

The view to edit to display more things on fronted invoices is "order / show".

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

  • Posts: 50
  • Thank you received: 1
11 years 9 months ago #89908

Okey, found it.

How to make the changes only to appear in the invoice, not in the order? The invoice number is like that. It only shows in the invoice (popup) and not in the order.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89970

You can use the if condition like that:

if($this->invoice_type!='order'){
  ...
}
The code between the if will only be displayed in the invoice.

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

  • Posts: 50
  • Thank you received: 1
11 years 9 months ago #90018

Thanks Xavier that works great :) Perfect for adding text/stuff on the printable invoice.


However the thing about the non showing title on invoice. I got an idea about that:

The original code:

<?php if($this->invoice_type=='order'){?>
<div class="header hikashop_header_title">
<h1>
<?php if($this->invoice_type=='order'){
echo JText::_('HIKASHOP_ORDER').':'.$this->element->order_number;
}else{
echo JText::_('INVOICE').':'.$this->element->order_invoice_number;
} ?>
</h1>
</div> ...

The above code is for placing title+ordernumber on order and title+invoicenumber on invoice I guess. But it only shows correctly on the order. Nothing at all in invoice. Why is that? My theory is that when starting the popup-display (pressing the print icon) it does not start reading from top of the document, it reads from where it is called and the rest of the code that follows.

So to make this work I pasted parts of the above code and made some changes. Placed it after the call to popup-display (before _right_part). Like this:

<table width="100%">
<tr>
<td><?php if($this->invoice_type!='order'){
echo '<h1 style="text-align:center;">'.JText::_('INVOICE').'</h1>';
} ?>
<div id="hikashop_order_right_part" class="hikashop_order_right_part"> ...


(Another way would perhaps be to move the popup-display code so that it starts before the title-stuff. Have not tried that.)


Bug? Well, it works now!


/Mathias

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #90055

Thanks to have reported a solution.

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

Time to create page: 0.043 seconds
Powered by Kunena Forum