Author Topic: Print Invoice on Order Confirmation Page  (Read 3913 times)

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Print Invoice on Order Confirmation Page
« on: July 25, 2013, 21:15:35 pm »
Hello Everyone.

Could I get some guidance in adding a print invoice button on the confirmation/thank you page? I did a search and I get a ton of results, mostly vm1.1, and for vm2 it seems only BE. However this would be a much better approach to customers than waiting on the email or having to do a manual print.

I looked at the admin section and see where the invoice print information there but something tells me that it is not as simple as using that code.

Thank you in advance.
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #1 on: August 13, 2013, 23:18:57 pm »
Has anyone thought about this and came up with a solution or maybe knows where the solution lies and can point a finger that way?
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #2 on: August 13, 2013, 23:45:41 pm »
Maybe use this on the order_done.php
Code: [Select]
<h1><?php echo JText::_('COM_VIRTUEMART_ACC_ORDER_INFO'); ?>

<?php

/* Print view URL */
$details_url juri::root().'index.php?option=com_virtuemart&view=orders&layout=details&tmpl=component&virtuemart_order_id=' $this->orderdetails['details']['BT']->virtuemart_order_id .'&order_pass=' JRequest::getString('order_pass',false) .'&order_number='.JRequest::getString('order_number',false);
$details_link "<a href=\"javascript:void window.open('$details_url', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\"  >";
//$details_link .= '<span class="hasTip print_32" title="' . JText::_('COM_VIRTUEMART_PRINT') . '">&nbsp;</span></a>';
$button = (JVM_VERSION==1) ? '/images/M_images/printButton.png' 'system/printButton.png';
$details_link .= JHtml::_('image',$buttonJText::_('COM_VIRTUEMART_PRINT'), NULLtrue);
$details_link  .=  '</a>';
echo $details_link?>

</h1>
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
Re: Print Invoice on Order Confirmation Page
« Reply #3 on: August 14, 2013, 21:41:45 pm »
Could I get some guidance in adding a print invoice button on the confirmation/thank you page? I did a search and I get a ton of results, mostly vm1.1, and for vm2 it seems only BE.
So these tons of threads about pdfs for invoices couldn't be helpful? Pdf for invoice could be used only in BE?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #4 on: August 14, 2013, 21:50:03 pm »
Could I get some guidance in adding a print invoice button on the confirmation/thank you page? I did a search and I get a ton of results, mostly vm1.1, and for vm2 it seems only BE.
So these tons of threads about pdfs for invoices couldn't be helpful? Pdf for invoice could be used only in BE?
Nope. See customers like to be able to be lazy and click the print button to get their invoice then and there. Not wait for an email. So do you have anything helpful to provide?
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
Re: Print Invoice on Order Confirmation Page
« Reply #5 on: August 14, 2013, 22:43:31 pm »
Yes. It's Bulk Order Print 3rd party VM extension.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #6 on: August 14, 2013, 23:30:46 pm »
I am not talking about BE printing. I am talking about the customer being able to print the order invoice from the order done page. order_done.php
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #8 on: August 15, 2013, 17:49:29 pm »
I guess if I wanted to print the product details page that is a good start.
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

Maxim Pishnyak

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2656
Re: Print Invoice on Order Confirmation Page
« Reply #9 on: August 15, 2013, 18:53:59 pm »
I saw that your code in your post #2 in this thread is not the same as printing code in mentioned by me thread. Why do you think that 'details' thread isn't useful for you at all?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Stonedfury

  • Jr. Member
  • **
  • Posts: 266
    • Stonedfury
  • Skype Name: Stonedfury
  • VirtueMart Version: 2.0.24
Re: Print Invoice on Order Confirmation Page
« Reply #10 on: August 15, 2013, 19:12:28 pm »
The code in my post is from my template and is off the order details page. I wish to get it functional on the order done page. I think you are skipping that part.

Order done! Thank you! Your order number is --------- Click to print invoice
No such thing as a stupid question, only a stupid answer. I won't ask if I know the answer or found it using the search as you suggested.

mowlman

  • Jr. Member
  • **
  • Posts: 209
Re: Print Invoice on Order Confirmation Page
« Reply #11 on: August 14, 2014, 16:36:44 pm »
anyone get this figured out?

The ability for a customer to print their invoice directly from the Order_done page once they completed checkout?