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
Printable View
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
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 />
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.
Version 1.1 has been uploaded, adding the invoice to the account history page (previously it was just on the my account page).
Version 1.2 has been added for Zen Cart 1.5.6 support.
Hi Scott,
In your latest version it seems that the following file is from ZC V1.5.1Last time I uploaded your great plugin to my site I assumed I'd mucked something up but I've just downloaded a fresh copy so I can update my site to V1.5.7 and I don't think it is me.Quote:
\includes\templates\custom\templates\tpl_account_default.php
Feel free to tell me I'm an idiot if it is me :)
Brent
Yes, you'll want to merge the latest and greatest template updates. Most people have their own customizations so sometimes I don't bother pulling in all those changes - just look at my tweaks and put those in your template. Glad you're benefiting from my stuff!
Thanks Scott. The problem with that file, for anyone who can't code, is that it has no comments which make it clear what your modifications are. I figured it out by downloading Zen Cart V1.5.1 and comparing it to the V1.5.7 so I could see which changes were down to Zen Cart and which were yours. The file in your mod seems to have a version GIT of 1.5.1 but contents from 1.5.5
To make it easier for others coming after me I've sent you a donation so hopefully you can add comments and upload a new 1.5.7 version for the community :)