Invoice printing in frontend

  • Posts: 190
  • Thank you received: 0
12 years 7 months ago #46876

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: 12 years 7 months ago by codewarrior.

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

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #46997

That's indeed the option.

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

  • Posts: 190
  • Thank you received: 0
12 years 7 months ago #47078

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.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #47086

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.

  • Posts: 190
  • Thank you received: 0
12 years 7 months ago #47155

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: 12 years 7 months ago by codewarrior.

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

  • Posts: 190
  • Thank you received: 0
12 years 7 months ago #47234

Because Invalid orders are allowed to be printed (Last Essential version), I had to add the following 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.061 seconds
Powered by Kunena Forum