[Skip to main content](#vessel-content)

#   Customise the Tax Invoice while using the HikaShop - generate PDF invoice plugin

##

- **[bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")**
- [![bmm01's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14439-bmm01 "View bmm01's Profile") Topic Author
- [ Offline](/forum/user/14439-bmm01)

Less More

- Posts: 107
- Thank you received: 8
-
-

3 years 3 months ago [\#354560](#354560) by [bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")  *[Customise the Tax Invoice while using the HikaShop - generate PDF invoice plugin](/forum/35-orders-management/906909-customise-the-tax-invoice-while-using-the-hikashop-generate-pdf-invoice-plugin#354560 "-- Joomla version -- : 4.3.3 -- PHP version -- : 4.7.5  We had some customisations to the Tax Invoice in Joomla 3 and I want to bring these over to Joomla 4.  In the Joomla 4 site, I have edited the order / invoice.php file. The modifications show up on the Display / Views screen however the changes do not show up in the invoice (either on the Orders / Tax Invoice page) or in the invoice sent to the customer (we have the HikaShop - generate PDF invoice plugin).  When I disable the Plugin, the changes to the invoice are shown.  Is there somewhere else I need to edit the view to make the customised Invoice work with the Plugin? We want to attach the PDF of the invoice to the Order Confirmation email.  Plugin version is 2.0.1")* was created by *[bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")*

-- Joomla version -- : 4.3.3
-- PHP version -- : 4.7.5

We had some customisations to the Tax Invoice in Joomla 3 and I want to bring these over to Joomla 4.

In the Joomla 4 site, I have edited the order / invoice.php file. The modifications show up on the Display / Views screen however the changes do not show up in the invoice (either on the Orders / Tax Invoice page) or in the invoice sent to the customer (we have the HikaShop - generate PDF invoice plugin).

When I disable the Plugin, the changes to the invoice are shown.

Is there somewhere else I need to edit the view to make the customised Invoice work with the Plugin? We want to attach the PDF of the invoice to the Order Confirmation email.

Plugin version is 2.0.1

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjkwOS1jdXN0b21pc2UtdGhlLXRheC1pbnZvaWNlLXdoaWxlLXVzaW5nLXRoZS1oaWthc2hvcC1nZW5lcmF0ZS1wZGYtaW52b2ljZS1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

3 years 3 months ago [\#354562](#354562) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customise the Tax Invoice while using the HikaShop - generate PDF invoice plugin](/forum/35-orders-management/906909-customise-the-tax-invoice-while-using-the-hikashop-generate-pdf-invoice-plugin#354562 "-- Joomla version -- : 4.3.3 -- PHP version -- : 4.7.5  We had some customisations to the Tax Invoice in Joomla 3 and I want to bring these over to Joomla 4.  In the Joomla 4 site, I have edited the order / invoice.php file. The modifications show up on the Display / Views screen however the changes do not show up in the invoice (either on the Orders / Tax Invoice page) or in the invoice sent to the customer (we have the HikaShop - generate PDF invoice plugin).  When I disable the Plugin, the changes to the invoice are shown.  Is there somewhere else I need to edit the view to make the customised Invoice work with the Plugin? We want to attach the PDF of the invoice to the Order Confirmation email.  Plugin version is 2.0.1")*

Hi,

The plugin has its own file for the invoice. It's the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php (or another file in that folder, since you can now select the layout you want to use in the settings of the plugin).
Copy this file to media/com_hikashop/plugins/invoice.php and you'll have an override file you can modify.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjkwOS1jdXN0b21pc2UtdGhlLXRheC1pbnZvaWNlLXdoaWxlLXVzaW5nLXRoZS1oaWthc2hvcC1nZW5lcmF0ZS1wZGYtaW52b2ljZS1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")**
- [![bmm01's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/14439-bmm01 "View bmm01's Profile") Topic Author
- [ Offline](/forum/user/14439-bmm01)

Less More

- Posts: 107
- Thank you received: 8
-
-

3 years 3 months ago [\#354595](#354595) by [bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")  Replied by *[bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")* on topic *[Customise the Tax Invoice while using the HikaShop - generate PDF invoice plugin](/forum/35-orders-management/906909-customise-the-tax-invoice-while-using-the-hikashop-generate-pdf-invoice-plugin#354595 "-- Joomla version -- : 4.3.3 -- PHP version -- : 4.7.5  We had some customisations to the Tax Invoice in Joomla 3 and I want to bring these over to Joomla 4.  In the Joomla 4 site, I have edited the order / invoice.php file. The modifications show up on the Display / Views screen however the changes do not show up in the invoice (either on the Orders / Tax Invoice page) or in the invoice sent to the customer (we have the HikaShop - generate PDF invoice plugin).  When I disable the Plugin, the changes to the invoice are shown.  Is there somewhere else I need to edit the view to make the customised Invoice work with the Plugin? We want to attach the PDF of the invoice to the Order Confirmation email.  Plugin version is 2.0.1")*

Thanks very much Nicolas.
I have followed your instructions and I can modify the media/com_hikashop/plugins/invoice.php file and it works (by adding a ECHO 'TEST'![;)](/media/kunena/emoticons/24.png ";)").
However, I have now copied across the modified file invoice.php from administrator/templates/atum/html/com_hikashop/order
It works for the Shipping Invoice, however when I use it for the Tax Invoice, I get the following error:

An error has occurred.

0 Call to a member function get() on null

Call stack
\# Function Location
1 () JROOT/media/com_hikashop/plugins/invoice.php:126
2 require() JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:101
3 plgHikashopAttachinvoice-&gt;_getPDFInvoice() JROOT/plugins/hikashop/attachinvoice/attachinvoice.php:237
4 plgHikashopAttachinvoice-&gt;onHikashopBeforeDisplayView() JROOT/libraries/src/Plugin/CMSPlugin.php:284
5 Joomla\CMS\Plugin\CMSPlugin-&gt;Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
6 Joomla\Event\Dispatcher-&gt;dispatch() JROOT/libraries/src/Application/EventAware.php:111
7 Joomla\CMS\Application\WebApplication-&gt;triggerEvent() JROOT/administrator/components/com_hikashop/helpers/helper.php:2701
8 hikashopView-&gt;display() JROOT/administrator/components/com_hikashop/views/order/view.html.php:30
9 OrderViewOrder-&gt;display() JROOT/libraries/src/MVC/Controller/BaseController.php:645
10 Joomla\CMS\MVC\Controller\BaseController-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2463
11 hikashopController-&gt;display() JROOT/administrator/components/com_hikashop/controllers/order.php:305
12 OrderController-&gt;invoice() JROOT/libraries/src/MVC/Controller/BaseController.php:678
13 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2441
14 hikashopController-&gt;execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
15 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
16 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
17 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
18 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
19 Joomla\CMS\Application\AdministratorApplication-&gt;dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
20 Joomla\CMS\Application\AdministratorApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
21 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/administrator/includes/app.php:61
22 require_once() JROOT/administrator/index.php:32

Please advise how I can debug / fix this error. Apologies I am not a programmer and whoever coded the modifications has retired unfortunately. I'm getting myself quite confused - I have attached the invoice.php file that seems to work when the Attach Invoice plugin is Disabled.

Thanks very much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjkwOS1jdXN0b21pc2UtdGhlLXRheC1pbnZvaWNlLXdoaWxlLXVzaW5nLXRoZS1oaWthc2hvcC1nZW5lcmF0ZS1wZGYtaW52b2ljZS1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

3 years 3 months ago [\#354598](#354598) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Customise the Tax Invoice while using the HikaShop - generate PDF invoice plugin](/forum/35-orders-management/906909-customise-the-tax-invoice-while-using-the-hikashop-generate-pdf-invoice-plugin#354598 "-- Joomla version -- : 4.3.3 -- PHP version -- : 4.7.5  We had some customisations to the Tax Invoice in Joomla 3 and I want to bring these over to Joomla 4.  In the Joomla 4 site, I have edited the order / invoice.php file. The modifications show up on the Display / Views screen however the changes do not show up in the invoice (either on the Orders / Tax Invoice page) or in the invoice sent to the customer (we have the HikaShop - generate PDF invoice plugin).  When I disable the Plugin, the changes to the invoice are shown.  Is there somewhere else I need to edit the view to make the customised Invoice work with the Plugin? We want to attach the PDF of the invoice to the Order Confirmation email.  Plugin version is 2.0.1")*

Hi,

You can't just copy / paste the whole code of administrator/templates/atum/html/com_hikashop/order/invoice.php to media/com_hikashop/plugins/invoice.php
The code in each file is not compatible and doesn't rely on the same variables.
The modification will have to be done by a developer in media/com_hikashop/plugins/invoice.php which should be based on the code from plugins/hikashop/attachinvoice/attachinvoice/invoice.php and not the code from administrator/templates/atum/html/com_hikashop/order/invoice.php

The following user(s) said Thank You: [bmm01](/forum/user/14439-bmm01 "View bmm01's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwNjkwOS1jdXN0b21pc2UtdGhlLXRheC1pbnZvaWNlLXdoaWxlLXVzaW5nLXRoZS1oaWthc2hvcC1nZW5lcmF0ZS1wZGYtaW52b2ljZS1wbHVnaW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
