Re: Catalog Invoice Support Thread
Thanks for this Scott. Been testing for you and here is my feedback.
If I want to turn off images should I hard code the setting in \invoice.php? The new override settings that work with admin\invoice.php won't be pulled through.
The latest version works in PHP 7.4 but fails in PHP 8.0
Code:
[05-Feb-2023 14:11:26 Europe/London] PHP Fatal error: Uncaught Error: Undefined constant "TABLE_HEADING_PRICE_EXCLUDING_TAX" in /invoice.php:214
Stack trace:
#0 {main}
thrown in /invoice.php on line 214
[05-Feb-2023 14:11:26 Europe/London] Request URI: /store158/invoice.php?oID=31848, IP address: 77.108.141.0
--> PHP Fatal error: Uncaught Error: Undefined constant "TABLE_HEADING_PRICE_EXCLUDING_TAX" in /invoice.php:214
Stack trace:
#0 {main}
thrown in /invoice.php on line 214.
I fixed this by adding entries to my \includes\languages\english\lang.invoice.php file but don't know if this is the best way or if the error was caused by some other issue I have.
Code:
'TABLE_HEADING_PRICE_EXCLUDING_TAX' => 'Price (excl)',
'TABLE_HEADING_PRICE_INCLUDING_TAX' => 'Price (incl)',
'TABLE_HEADING_TOTAL_EXCLUDING_TAX' => 'Total (excl)',
'TABLE_HEADING_TOTAL_INCLUDING_TAX' => 'Total (incl)',
You also have two old files in your latest update. I have ported the changes across my end but so this is just for other users.
Firstly
Quote:
\includes\templates\custom\templates\tpl_account_default.php
This is using
Quote:
@version $Id: Scott C Wilson 2019 Jan 14 Modified in v1.5.6b $
and the latest version is
Quote:
@version $Id: lat9 2022 May 26 Modified in v1.5.8-alpha $
Secondly
Quote:
\includes\templates\custom\templates\tpl_account_history_default.php
Is based on
Quote:
@version $Id: Author: DrByte Sat Jan 9 13:13:41 2016 -0500 Modified in v1.5.5 $
but the latest version is
Quote:
@version $Id: lat9 2022 Jul 23 Modified in v1.5.8-alpha2 $
Re: Catalog Invoice Support Thread
Language file changes are correct - I'll add on the next update.
The template changes are really just an example - you have to merge the changes into your own template files.
Re: Catalog Invoice Support Thread
Quote:
Originally Posted by
swguy
The template changes are really just an example - you have to merge the changes into your own template files.
I understand that. It was more a notification for other users as they will see 1.5.8 ready and make assumptions. I got caught out by this when I started on this journey. Hard for someone who reads and writes code to understand :smile:
For anyone trying to remove images changing line 44 in /invoice.php did the trick for me.
Code:
$show_product_images = $show_product_images ?? false;
Re: Catalog Invoice Support Thread
css was referencing files that weren't included; this has been fixed in the latest update.
Re: Catalog Invoice Support Thread
When I click on the invoice button and the customer has purchased 1 item, the invoice is mixed up. If multiple items have been purchased, everything will work fine.
How is this possible, bug?
Using zen cart version 1.5.8a
Dirk
Re: Catalog Invoice Support Thread
Can you be more specific about what you mean when you say everything is mixed up? Screenshot perhaps?
2 Attachment(s)
Re: Catalog Invoice Support Thread
Attachment 20793Attachment 20794
First is one item ordered and second one is two items.
As you can see the layout is different (not everything is mixed up).
Re: Catalog Invoice Support Thread
This seems to be related to the order, not the number of items. No idea; does the regular admin orders page have the same layout?
Re: Catalog Invoice Support Thread
Quote:
Originally Posted by
swguy
This seems to be related to the order, not the number of items. No idea; does the regular admin orders page have the same layout?
Yes it does.
Re: Catalog Invoice Support Thread
I'm not a programmer or anything so I don't know how to solve this. Any help is welcome. I have already restored a backup of invoice.php to the admin folder with no results.