VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Stonedfury on July 25, 2013, 21:15:35 PM

Title: Print Invoice on Order Confirmation Page
Post by: Stonedfury 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.
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury 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?
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury on August 13, 2013, 23:45:41 PM
Maybe use this on the order_done.php
<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>
Title: Re: Print Invoice on Order Confirmation Page
Post by: Maxim Pishnyak on August 14, 2013, 21:41:45 PM
Quote from: Stonedfury on July 25, 2013, 21:15:35 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?
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury on August 14, 2013, 21:50:03 PM
Quote from: Maxim Pishnyak on August 14, 2013, 21:41:45 PM
Quote from: Stonedfury on July 25, 2013, 21:15:35 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?
Title: Re: Print Invoice on Order Confirmation Page
Post by: Maxim Pishnyak on August 14, 2013, 22:43:31 PM
Yes. It's Bulk Order Print 3rd party VM extension.
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury 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
Title: Re: Print Invoice on Order Confirmation Page
Post by: Maxim Pishnyak on August 15, 2013, 10:40:47 AM
Print icon at product details pop window does not print [SOLVED] (https://forum.virtuemart.net/index.php?topic=102811.0)
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury on August 15, 2013, 17:49:29 PM
I guess if I wanted to print the product details page that is a good start.
Title: Re: Print Invoice on Order Confirmation Page
Post by: Maxim Pishnyak 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?
Title: Re: Print Invoice on Order Confirmation Page
Post by: Stonedfury 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
Title: Re: Print Invoice on Order Confirmation Page
Post by: mowlman 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?