New Zenner
- Join Date:
- Mar 2007
- Posts:
- 24
- Plugin Contributions:
- 0
Catalog Invoice Support Thread
how to use logo from admin on invoice instead of logo from shop front end
just installed catalog invoice
zencart 56
php 7.2
Views: 18,566
New Zenner
how to use logo from admin on invoice instead of logo from shop front end
just installed catalog invoice
zencart 56
php 7.2
Administrator
Copy the admin logo to the images folder under your template. (call it, say, includes/templates/YOUR_TEMPLATE/images/admin_logo.png or whatever the filetype is).
In invoice.php on line 96, change HEADER_LOGO_IMAGE to the filename you used above ("admin_logo.png").
You don't want to directly link to the image logo- that would reveal the name of your admin.
New Zenner
thank you so much for quick reply
replace code like that
New Zenner
it worked sorry my mistake browser cache problem thanks again
Zen Follower
the 1.5.7c upgrade removed the invoice option from the customer side. Anyone know of a fix?
Administrator
Reinstall my plugin. :)
Zen Follower
I reinstalled and along with a blank "My Account" page, I get the following error:
[25-Jun-2021 23:05:12 UTC] PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /includes/templates/ntobs20/templates/tpl_account_default.php:16
Stack trace:
#0 /includes/templates/ntobs20/common/tpl_main_page.php(195): require()
#1 /index.php(94): require('/home/feadmin/p...')
#2 {main}
thrown in /includes/templates/ntobs20/templates/tpl_account_default.php on line 16
[25-Jun-2021 23:05:12 UTC] Request URI: /index.php?main_page=account, IP address: xxxxxx
--> PHP Fatal error: Uncaught Error: Call to a member function isMobile() on null in /includes/templates/ntobs20/templates/tpl_account_default.php:16
Stack trace:
#0 /includes/templates/ntobs20/common/tpl_main_page.php(195): require()
#1 /index.php(94): require('/home/...')
#2 {main}
thrown in /includes/templates/ntobs20/templates/tpl_account_default.php on line 16.
Administrator
The template file provided was based on responsive_classic. If you don't use responsive_classic, make the relevant changes to your own template file.
Zen Follower
swguy:
The template file provided was based on responsive_classic. If you don't use responsive_classic, make the relevant changes to your own template file.
- Compare what I gave you to what's in responsive classic.
- Apply those changes to your template file.
Thank you. So the only element I moved from your file to my template file was this line
<!-- Invoice -->
<td class="accountOrderViewButton alignRight"><?php echo '<a href="' . FILENAME_INVOICE . '.php?oID=' . $orders['orders_id'] . '" target="_blank">' . zen_image_button(BUTTON_IMAGE_INVOICE_SMALL, BUTTON_INVOICE_SMALL_ALT) . '</a>' . ' '; ?></td>
and it enabled the mod to function correctly.
Zen Follower
swguy:
Catalog Invoice allows your customers to create their own invoices from past orders on their My Account page
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
Administrator
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.
Zen Follower
swguy:
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.
Sadly, that's one of the things I'd tried (and failed with) before asking.
It generates a link to [siteurl]/index.php?main_page=invoice&oID=123456 instead of to [siteurl]/invoice.php&oID=123456
Administrator
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
Administrator
There was a bug in file inclusion in invoice.php that has been fixed.
New Zenner
Great plug-in, essential for my daughter's (very) small wholesale business where all her stockists pay by invoice.
Zencart v 1.5.7c
Minor bug, I noticed that invoice "date added" was showing DATE_TIME_FORMAT instead of date added.
This has apparently affected some other plugins.
The lines below have been removed from includes/languages/english.php in 1.5.7
define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
Adding them cured it.
Administrator
Thanks. Will update next time.
Totally Zenned
Has anyone yet ported the changes from the new 1.5.8 version of html /admin/invoice.php over to ```html
/invoice.php
The latest version in the plugin is based on ```
@version $Id: DrByte 2020 May 20 Modified in v1.5.7 $
``` and the version in 1.5.8 has changed substantially ```
@version $Id: Scott C Wilson 2022 Sep 17 Modified in v1.5.8 $
I tried to port the changes over but there have been too many revisions in the area where the revised code needs to be inserted.
Help needed please :)
Administrator
I will update this mod shortly.
Totally Zenned
Thank you. I will buy you a cup of coffee.
Administrator
OK an update has been submitted for 1.5.8.
https://www.zen-cart.com/downloads.php?do=file&id=2111
The CSS needs some tweaking; I'll do that as soon as I can.
Tell staff why this post should be reviewed.