Invoice format not same in front and back end

  • Posts: 33
  • Thank you received: 2
3 years 10 months ago #320458

-- url of the page with the problem -- : www.softdune.com
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.3.18
-- Browser(s) name and version -- : Chrome

I did some customization in the back orders (added text and logo's) using invoice.php

From the front end the users can print the invoice through My Orders/Actions/Print Invoice

Is there a way that this front end invoice is the same as when created from the back end?

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320461

Hi,

Yes, you need to do the same customization in the order / show.php view file for your frontend template.
Note that the customization might vary since on your frontend, you have the CSS of your template to take into account when you do CSS customization.
Otherwise, if you use the PDF invoice plugin, both frontend and backend will use the same base for the PDF. Note however, that it bases itself on again another view, which would have to be customized again if you were to use it.

The following user(s) said Thank You: OnslaughtUK

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
3 years 10 months ago #320474

I'm considering taking the PDF Invoice plugin.

If I understand you correctly this is not taking the invoice.php as basis to create the invoice output.
If so, what is the used base?

just a thought: why is the OOTB not using all the same base to create the invoices. It would be much easier to maintain.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #320483

Hi,

Yes, it's using its own invoice.php. You'll find it in the folder plugins/hikashop/attachinvoice/attachinvoice/ after you install the plugin so you'll be able to customize it there.

I don't know what you mean by OOTB.
The reason it uses two different files for the invoice is because we're allowing you to have a template override and thus the invoice layout is a normal view file. In that case, the way the MVC system of Joomla works, you can't use a backend view file on the frontend and vice-versa. So we had to have to different view files.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 2
3 years 10 months ago #321063

Just an additional question on this before I customize the plugin invoice.php file in plugins/hikashop/attachinvoice/attachinvoice/

Do I do this directly in the above (with FTP) or is there a possibility to do the customization from within Hikashop through display/views ?



ps: sry about the OOTB abreviation. It stands for Out-Of-The-Box (= how the software is delivered standard)

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 10 months ago #321093

Hi,

You can do it through Display>Views so yes you can do it via FTP.

PS: thanks for the explanation. My mother tongue is not English, so I'm not well versed in such abbreviations.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum