=== WP e-Commerce - Printable Invoices ===
Contributors: Visser Labs
Tags: e-commerce, wp-e-commerce, shop, cart, invoices
Requires at least: 2.9.2
Tested up to: 4.7.5
Stable tag: 1.6.5
== Description ==
Provide detailed sale invoices from WP e-Commerce to your customers in printed or electronic form.
==== Purchase Receipt ====
The Purchase Receipt/Pending Purchase/Admin Report template(s) include the following hooks:
* wpsc_pi_before_header
* wpsc_pi_header_addons
* wpsc_pi_after_header
* wpsc_pi_before_body
* wpsc_pi_after_body_checkout
* wpsc_pi_before_body_sale_summary
* wpsc_pi_after_body_sale_summary
* wpsc_pi_before_body_cart
* wpsc_pi_after_body_cart
* wpsc_pi_before_body_notes
* wpsc_pi_after_body_notes
* wpsc_pi_after_body
* wpsc_pi_before_footer
* wpsc_pi_footer_addons
* wpsc_pi_after_footer
For more information visit: http://www.visser.com.au/wp-ecommerce/
== Installation ==
1. Upload the folder 'wp-e-commerce-printable-invoices' to the '/wp-content/plugins/' directory
2. Activate the plugin through the 'Plugins' menu in WordPress
== Usage ==
To customise the Printable Invoices template.
==== In WP e-Commerce 3.7 ====
1. Open Store > Printable Invoices from the WordPress Administration
==== In WP e-Commerce 3.8 ====
1. Open Settings > Printable Invoice from the WordPress Administration
====
To view the Printable Invoice for a Sale.
==== In WP e-Commerce 3.7 ====
1. Open Store > Sales from the WordPress Administration
==== In WP e-Commerce 3.8 ====
1. Open Dashboard > Store Sales from the WordPress Administration
====
2. Open the Sale detail view by clicking on the quantity of a given Sale
3. Under the Actions options click Print Customer Invoice or Print Purchase Report
That's it!
== Support ==
If you have any problems, questions or suggestions please join the members discussion on my WP e-Commerce dedicated forum.
http://www.visser.com.au/wp-ecommerce/forums/
== Disclaimer ==
This Plugin does not claim to be a PCI-compliant solution. It is not responsible for any harm or wrong doing this Plugin may cause. Users are fully responsible for their own use. This Plugin is to be used WITHOUT warranty.
Hi there Michael,
Since upgrading to your most recent plugin (1.6.3) and the latest WP-Ecommerce (3.8.9.2), I am now getting the following error:
Fatal error: Cannot use object of type stdClass as array in /home/buyfenci/public_html/wp-content/plugins/wp-e-commerce-printable-invoices/includes/functions.php on line 291
Any ideas? Loved the plugin up till this problem – Does the plugin need an update for the new WPEC perhaps?
With thanks,
Mark
Hi Mark, that’s correct, I’m rushing through an urgent Plugin update to fix compatibility with WP e-Commerce 3.8.9.2, the Core Plugin deals with the $purchase_log object differently and it caught us off guard.
I’ve send a e-mail to the support twice now but have not had a single answer so far. So i’ll ask here.
I am looking to add the order id to the e-mail subject. This is a absolute must!
Hope so find a answer.
Hi Levi, I’ve received your support e-mail this morning and will respond shortly. We’ll issue a minor Plugin update and/or patch for you to add the Order # to the Purchase Receipt e-mail.
Brilliant! So simple to install / and does the job perfectly. Many thanks.
Helppppppppppppppppppppppppppppp
I am having issues with Total tax not dispalying on the invoice any ideas?
Hi Ashley, can you please confirm which tax method you are using within your store. A Plugin update is going out shortly including template changes and some tax adjustments.
Sorry if this has been asked before, but you have quite a bit of messages. 🙂
1. Can this plugin be updated via the backend of the admin site? Or must I log in to your website, input session ID, to update your plugin?
2. I would like to made my purchase receipt look better, can the styled invoices from this plugin completely replace the plain text purchase receipt?
Thanks!
Hi Sam, you can update the Plugin from Dashboard > Plugin Updates page within the WordPress Administration. No Session ID is required. You can also use the Premium Plugin Updates page to download the latest release at any time.
http://www.visser.com.au/wp-ecommerce/premium-plugin-updates/
I would like to made my purchase receipt look better, can the styled invoices from this plugin completely replace the plain text purchase receipt?
Sure can. Please find the ‘Replace Purchase Receipt…’ option under Settings > Printable Invoices. This will replace the default WP e-Commerce Purchase Receipt template with the one you view via Dashboard > Manage Sales. 🙂
Hi Michael,
I have tried the suggestions you have made here i.e. switched on “Replace WP e-Commerce Purchase Receipt” but when this is switched on, it kills the final transaction page and it also doesn’t send the email.
Do you have a solution to this perhaps?
Thanks.
Hi sixfootjames, this is due to changes in WP e-Commerce 3.8.9.1; and now 3.8.9.2. If you need Printable Invoices working for e-mailed invoices you should roll back to WP e-Commerce 3.8.8.5.
We’ll be issuing a patch shortly to resolve compatibility with WP e-Commerce 3.8.9.2.
I managed to fix that problem with this:
in functions.php (of this plugin) find the line that says:
wp_mail( $email, wpsc_pi_email_subject(), $output );
and change it to this:
if ( ! get_transient( “{$sessionid}_pending_email_sent” ) ) {
wp_mail( $email, wpsc_pi_email_subject(), $output );
}
I also had some issues with this plugin and it’s incompatibility with wp-ajax as wp-ajax functions live in the admin area and this plugin wraps everything with an is_admin() check.
I got around this by changing the is_admin() checks to this:
if( is_admin() && !(!empty($_SERVER[‘HTTP_X_REQUESTED_WITH’]) && strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’) ) { …. }
Hopefully this helps somebody.
I also had to fix a bunch of stuff that shouldn’t be included in the emails, because this plugin just prints out every checkout form (regardless if it was the one used at checkout). I fixed that by changing the /template/store/wpsc-printable_invoice.php file. I don’t remember exactly what the lines were before i changed what i did, but basically i wrapped one section with a conditional statement to make sure it only printed out the main checkout forms set (0) and not all of them.
It looks like this now:
if($form_field[‘checkout_set’] == 0){ ?>
<tr id=”form_uniquename-” class=”form-default field_type-“>
<?php
}
Hopefully this helps somebody. I really hate having to hack my wordpress plugins but this plugin didn't really leave any room for not doing that (a couple filters or hooks, or add actions would be great!) Or perhaps you could consider implementing my changes?
Thanks,
Adrian
Adrian,
It is beyond me why some of you guys even bother to continue to use WPEC, it seems always so full of bugs every time. I always ask for support there, and quite often never get replies. I have since moved to WooCommerce as support is steaming ahead on nearly every question. I simply purchased the plugin that Agus built to import all your products to WooCommerce from WPEC. I never looked back.
Besides, the variations and tax work flawlessly, and the printable invoices are exquisite to the point they don’t need to be hacked. Just thought I would add this comment as I was getting sick of always looking for fixes and workarounds for WPEC.
Every week there is something new in WooCommerce, it makes WPEC look quite useless. Then again these are just my thoughts. I get all excited when I talk about Woo, not too sure why, but it gives me the warm fuzzies 😉
Hi Adrian, thanks for the contribution. I’ve added your patch for duplicate e-mails, I had left ‘all’ Checkout fields appearing intentionally as some Plugin users use alternate Checkout sets. For now I’ve set the default Checkout Set to 0 and will add an override in a future Plugin update for those using alternate Checkout sets. You can remove your template change to limit Checkout sets as this is done within the logic side of the Plugin.
Regarding the AJAX requests, I’m playing with this now and will likely use a custom conditional function for this (e.g. wpsc_pi_is_ajax_or_admin() ) in the interim. I’ll push out an urgent Plugin update with the above mentioned items then focus on adding support for other e-mail templates within WP e-Commerce (e.g. Admin Report, Custom Message, etc.)
Hello,
after the update 3.8.8 of WP-Ecommerce the printable invoice plugin only shows me “This users cart was empty”… would you please fix the compability issue asap… your plugin is part of my daily routine, so I really need it 😉
Cheers,
Raffaele
Hi Raffaele, pushing out an urgent Plugin update that adds support for WP e-Commerce 3.8.8 RC2 and above. The Core team changed a simple variable for no other reason than to annoy us… expect a Plugin update shortly. 😛
Are you able to include a image of the product on the printable invoice?
Hi Roy, great suggestion. I’ll look at this for the next Plugin update! 🙂
How do I update the Printable Invoices plugin and retain the customization already completed?
Hi Matt, I’m putting together a Post to explain the changes, in summary the template markup mostly remains the same with the logic now separated from the template. In the meantime feel free to send your customised template to me and I’ll send you back the adjusted copy. 🙂
– does it function regardless the way of payment?
– can it easily be translated tot another language?
Hi frank, all payment gateways generate a Purchase Receipt for each Sale this Plugin simply intercepts this and replaces it with our own Purchase Receipt. 🙂
Printable Invoices uses POT translation files but I’ll be adding additional text fields under Settings > Printable Invoices to replace template labels with your own personalised copy (e.g. Tax to GST, Invoice Total to Estimate Total, etc.).
I’d like to purchase this plugin but would like to know, is it possible to rearrange the template? Are the fields independent and can they be positioned where needed?
For example, I’d like to arrange the layout so that the billing address and delivery address are besides eachother.
Thanks
Just taken the time to read the comments and think what I’m hoping for will be in the next update.
Re the independent fields, will it be possible to do something like this in the plugin:
Click here for delivery address
where the POSTCODE is replaced by the delivery postcode?
Hi Cody, while support for side-by-side layout is now supported you will need to add an if() statement based on the unique ID of the checkout column. If you can e-mail me a detailed description of what you’re after I’ll put a tutorial together or better yet make it a feature for all within the next Plugin update. 🙂
Thanks Michael
In terms of the side by side, I can happily wait 🙂
I had another question (which if its possible – I’ll end up buying straight away) is, is it possible to add a link within the php file which pulls the shipping postcode into the file?
So that in the code there is:
http://maps.google.co.uk/?q=
which would come out like
http://maps.google.co.uk/?q=EC2Y5HN
Thanks
Hi Cody, this has been included in the next Plugin update. I’m completing testing of the updated Purchase Receipt code and putting together a detailed update post on the new features and template changes. 🙂
Hi Michael
Just wondering if the current/latest plugin has ability to add a link with a variable (ie shipping postcode) to the link?
http://maps.google.co.uk/?q=*SHIPPING POSTCODE HERE*
Hi Michael
Just wanted to find out if this has been added yet as I’d like to buy if it does.
Thanks
Hi Cody, I did impliment Google Map support but looking at the current release it’s been commented out. The best way I think to do it is let you fill the ‘data type’ that Google Maps looks for, e.g. there’ll be a checkbox to enable Google Maps and a text field that accepts tags.
For instance: %shipping_postcode% will use the shipping postcode from Checkout for the Google Maps data.
I’ll get this in the next major Plugin update.
Do you have plans to port this to WooCommerce?
Can you make this available for woocommerce?
hat would sincerely be tipped to you if you could!
thanks in advance.
P
Hi Phil, I’ll be looking to port Invoice Manager (Printable Invoices on steroids) over to WooCommerce once the next major Plugin is announced.
Can i send the invoices by email?
Hi Martin, you sure can. Just check the Purchase Receipt option under Settings > Printable Invoices to replace the standard Purchase Receipt. 🙂
Hi Michael
How are things progressing with customising the invoice template, you hinted back in early December that you had a few plans that would be out soon but havent said much since? Because of the two addresses in a single line format, at the moment Im having to scale my invoices when I print so it doesnt roll the footer etc onto a second page once I have more than about 4 items on the invoice, which is a pain. Even if I could remove the shipping address completely that would be a good start?
thanks
Chris
Micheal, I hope all is well as we don’t seem to have had any updates or comments from you on here since around the middle of January, and a quick scan of other areas of the site suggest you’ve not posted anywhere since the end of January?
Hi Chris, I’m testing the 1.5.7 Plugin update this weekend adding side-to-side layout for Checkout form fields as well as the default vertical column as it displays now. From here I’ll add visibility controls to show/hide Checkout form items from the Invoice (e.g. hide shipping address, etc.) which will go a long way for store owners wishing to further customise the body of the invoice.
Hi Michael
Just wanted to say thanks for the new version, the side by side address format is working a treat.
Chris
DUPLICATE EMAILS PROBLEM:
Ok guys, i think i finally nailed it!
The /wpsc-theme/functions/wpsc-transaction_results_functions.php file has the following code at line ~364:
$message = apply_filters('wpsc_email_message', $message, $report_id, $product_list, $total_tax, $total_shipping_email, $total_price_email);
The Printable Invoices will replace the wpsc_email_message with your custom invoice, but for some reason the
set_transient( $sessionid . '_pending_email_sent', true, 60 * 60 * 12 );
andset_transient( $sessionid . '_receipt_email_sent', true, 60 * 60 * 12 );
seems not to be working.If you remove the $message=apply_fiters[etc] from line ~364 and put it in the if/else loop, the problem is gone.
Cheers,
Ciprian
Hi Ciprian, thanks for the heads up. I’m looking at this now to reproduce and send off to Instinct if needed! 🙂
Hi Ciprian,
Great work on finding where the problem lies, but I’m a bit of a dummy when it comes to the code. If you can find it in your heart to give a more detailed explanation on what to cut and paste where in the /wpsc-theme/functions/wpsc-transaction_results_functions.php file I will be eternally grateful 🙂