Catalog Invoice allows your customers to create their own invoices from past orders on their My Account page.
https://www.zen-cart.com/downloads.php?do=file&id=2111
Catalog Invoice allows your customers to create their own invoices from past orders on their My Account page.
https://www.zen-cart.com/downloads.php?do=file&id=2111
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Scott... the FUNCTIONS file... invoice_functions.php
... is configured to return MM/DD/YY
Here in the UK, we read the date as DD/MM/YY
What changes need to happen with this code to render date as DD/MM/YY ?
Additionally - and for interest's sake, I added a JS print function to the end of the main invoice.php filePHP Code:
<?php
// Functions for catalog side invoice
if (!function_exists('zen_datetime_short')) {
function zen_datetime_short($raw_datetime) {
if ( ($raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '') ) return false;
$year = (int)substr($raw_datetime, 0, 4);
$month = (int)substr($raw_datetime, 5, 2);
$day = (int)substr($raw_datetime, 8, 2);
$hour = (int)substr($raw_datetime, 11, 2);
$minute = (int)substr($raw_datetime, 14, 2);
$second = (int)substr($raw_datetime, 17, 2);
return strftime(DATE_TIME_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
}
}
At the bottom:
PHP Code:
<!-- body_text_eof //-->
<br>
... allows customers to PRINT by clicking the button.PHP Code:
<!-- body_text_eof //-->
<br /><p><button onclick="printFunction()">Print This Page</button><script>function printFunction(){window.print();}</script></p>
PS: The <br> tag needs closing, surely? <br />
20 years a Zencart User
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
First of all thank you for this add-on. I've installed the add-on as instructed but I get a file not found message when I click on the invoice button. Any ideas why?
Check each of the files in includes and make sure they have in fact uploaded correctly.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Version 1.1 has been uploaded, adding the invoice to the account history page (previously it was just on the my account page).
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Is there a way to change the invoice link in the email sent out to the customer so that it uses this new invoice page?
At present it goes to the entirely unsatisfactory account history page.
I think the change has to go into classes/order.php somewhere a bit after line 1000 but I'm not sure what or where
In includes/classes/order.php look for the line saying
EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
it's on line 1069 in 1.5.7c. Just adjust that to point to FILENAME_INVOICE instead.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Yep, you're right.
Instead of
zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false)
use something like
HTTPS_SERVER . DIR_WS_CATALOG . 'invoice.php?order_id='.$zf_insert_id
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Bookmarks