Skip to main content

Invoice printing in frontend

More
14 years 5 months ago - 14 years 5 months ago #46876 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:
Last edit: 14 years 5 months ago by codewarrior.

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

More
14 years 5 months ago #46997 by nicolas
That's indeed the option.

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

More
14 years 5 months ago #47078 by codewarrior
I have now an additional question.
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.

More
14 years 5 months ago #47086 by nicolas
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'))){ ?>
The following user(s) said Thank You: codewarrior

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

More
14 years 5 months ago - 14 years 5 months ago #47155 by codewarrior
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
Last edit: 14 years 5 months ago by codewarrior.

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

More
14 years 5 months ago #47234 by codewarrior
Because Invalid orders are allowed to be printed (Last Essential version), I had to add the following code
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.168 seconds
Powered by Kunena Forum