- Posts: 190
- Thank you received: 0
Invoice printing in frontend
- codewarrior
-
Topic Author
- Offline
Less
More
14 years 5 months ago - 14 years 5 months ago #46876
by codewarrior
Invoice printing in frontend was created by codewarrior
Hi,
maybe I missed something, but is there a way for customers to print their invoices on confirmed payments, like in the backend ?
In Customers / Informations / Backend, there is no print button (for a simplified page without templating)
Thanks
Regards
Edit : I found the "Allow users to print invoices in the frontend" option in configurations :blink:
maybe I missed something, but is there a way for customers to print their invoices on confirmed payments, like in the backend ?
In Customers / Informations / Backend, there is no print button (for a simplified page without templating)
Thanks
Regards
Edit : I found the "Allow users to print invoices in the frontend" option in configurations :blink:
Last edit: 14 years 5 months ago by codewarrior.
Please Log in or Create an account to join the conversation.
14 years 5 months ago #46997
by nicolas
Replied by nicolas on topic Re: Invoice printing in frontend
That's indeed the option.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 5 months ago #47078
by codewarrior
Replied by codewarrior on topic Re: Invoice printing in frontend
I have now an additional question.
How to restrict invoice printing to Confirmed and Shipped commands ?
No print of Created and Invalid commands !
Thanks
How to restrict invoice printing to Confirmed and Shipped commands ?
No print of Created and Invalid commands !
Thanks
Please Log in or Create an account to join the conversation.
14 years 5 months ago #47086
by nicolas
Replied by nicolas on topic Re: Invoice printing in frontend
Invalid orders cannot be printed if you use the latest version.
Created orders can be printed though. If you don't want that, you can edit the file "show" of the view "order" via the menu Display->Views and change the line:
<?php if(hikashop_level(1) && $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled'))){ ?>
to:
<?php if(hikashop_level(1) && $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled','created'))){ ?>
Created orders can be printed though. If you don't want that, you can edit the file "show" of the view "order" via the menu Display->Views and change the line:
<?php if(hikashop_level(1) && $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled'))){ ?>
to:
<?php if(hikashop_level(1) && $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled','created'))){ ?>
The following user(s) said Thank You: codewarrior
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 5 months ago - 14 years 5 months ago #47155
by codewarrior
Replied by codewarrior on topic Re: Invoice printing in frontend
Thanks Nicolas,
I understand that the in_array() should be filled with non-desired status.
Would it be done that way by default in Hikashop (only for confirmed orders) ?
Regards
I understand that the in_array() should be filled with non-desired status.
Would it be done that way by default in Hikashop (only for confirmed orders) ?
Regards
Last edit: 14 years 5 months ago by codewarrior.
Please Log in or Create an account to join the conversation.
- codewarrior
-
Topic Author
- Offline
Less
More
- Posts: 190
- Thank you received: 0
14 years 5 months ago #47234
by codewarrior
Replied by codewarrior on topic Re: Invoice printing in frontend
Because Invalid orders are allowed to be printed (Last Essential version), I had to add the following code
Many thanks
Code:
<?php if(hikashop_level(1) && $this->config->get('print_invoice_frontend') && !in_array($this->element->order_status,array('refunded','cancelled','created','invalid','pending'))){ ?>
Many thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds