VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: BenRoe on November 02, 2020, 12:39:17 PM

Title: invoice layouting
Post by: BenRoe on November 02, 2020, 12:39:17 PM
Why does virtuemart offer an invoice header/footer Editor if it doesnt take any formatting/layouting from it?
is there a plugin that actually works?
Title: Re: invoice layouting
Post by: jenkinhill on November 02, 2020, 13:14:57 PM
The invoice editor works OK for me. What are you trying to do?
Title: Re: invoice layouting
Post by: BenRoe on November 02, 2020, 13:28:53 PM
Im trying to align the company logo to the right side (text-align right/float:right) but in the preview it shows on the left
Title: Re: invoice layouting
Post by: pinochico on November 02, 2020, 14:01:44 PM
table?
Title: Re: invoice layouting
Post by: BenRoe on November 02, 2020, 14:09:06 PM
...yeah, a table works for the new layout

a table is also good for eating food and drinking water  :P I hope you dont misunderstand me, I just discovered that a table is good for eating AND for layouting stuff  :)
Title: Re: invoice layouting
Post by: pinochico on November 02, 2020, 14:10:41 PM
Basic installation VM 3.8.4
My invoice has the logo on the right side - I don't use float or another css style.

Where is problem?.
Title: Re: invoice layouting
Post by: pinochico on November 02, 2020, 14:21:16 PM
sorry, you need logo on right side.

Ok, then go in invoice header layout and change it - it used table for food :D

components/com_virtuemart/views/invoice/tmpl/mail_html_header.php

Table is used and you can create custom override without table.
Title: Re: invoice layouting
Post by: BenRoe on November 02, 2020, 14:38:32 PM
can you layout the invoice without touching PHP Code? That stuff that is in between the header and the footer? practically
Title: Re: invoice layouting
Post by: pinochico on November 02, 2020, 14:50:45 PM
I think no, but I don't use invoice from VM.
There are many online invoice services, which create better invoice
Title: Re: invoice layouting
Post by: GJC Web Design on November 02, 2020, 15:24:46 PM
as with most html to pdf libraries TCPDF only understands very basic html/css so as you found it is all a bit primitive.
The invoice is laid out in tables as are most pdf creators.
the templates are very basic so to adjust them is usually the easiest way

invoice.php
invoice_history.php
invoice_items.php
invoice_order.php

templates\your_template\html\com_virtuemart\invoice\invoice_items.php  etc  and get the invoice as you want it