Author Topic: edit invoice PDF  (Read 540 times)

erwinds

  • Beginner
  • *
  • Posts: 27
  • A beginner
edit invoice PDF
« on: March 09, 2021, 16:10:30 pm »
hi,

How can I change/edit the layout PDF invoice?
Or is there an Extension / template for invoices?

Best regards,
Erwin

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1137
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: edit invoice PDF
« Reply #1 on: March 09, 2021, 16:43:33 pm »
You can copy PHP files for view invoice to your template as override and next edit as you wish:

components/com_virtuemart/views/invoice/tmpl/invoice_history.php
components/com_virtuemart/views/invoice/tmpl/invoice_items.php
components/com_virtuemart/views/invoice/tmpl/invoice_order.php
components/com_virtuemart/views/invoice/tmpl/invoice.php

to

templates/your_template/html/com_virtuemart/invoice/invoice_history.php
templates/your_template/html/com_virtuemart/invoice/invoice_items.php
templates/your_template/html/com_virtuemart/invoice/invoice_order.php
templates/your_template/html/com_virtuemart/invoice/invoice.php

Or you can use some apps for invoice, example - Artio VM Invoice (is not our extension)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10140
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: edit invoice PDF
« Reply #2 on: March 11, 2021, 10:58:46 am »
and only use very basic html and inline css ..  TCPDF will not accept any complex rules etc
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1137
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: edit invoice PDF
« Reply #3 on: March 11, 2021, 17:51:38 pm »
to gjc:

thanks :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

barbara

  • Jr. Member
  • **
  • Posts: 170
Re: edit invoice PDF
« Reply #4 on: March 31, 2021, 21:36:29 pm »
I`ve looked through all the files

components/com_virtuemart/views/invoice/tmpl/invoice_history.php
components/com_virtuemart/views/invoice/tmpl/invoice_items.php
components/com_virtuemart/views/invoice/tmpl/invoice_order.php
components/com_virtuemart/views/invoice/tmpl/invoice.php

trying to edit the layout of the ship to area and I dont see it

I see eg 'COM_VIRTUEMART_ORDER_PRINT_SHIPMENT_LBL' - and this code

Code: [Select]
<?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIP_TO_LBL'?></strong><br/>
<?php if(!empty($this->orderDetails['details']['has_ST'])){
echo "<table border='0'>";
foreach ($this->shipmentfields['fields'] as $field) {
if (!empty($field['value'])) {

but that is not helpful

I am trying to get the ship-to layout to be instead of the current layout


Address Nickname              shipafolaqbi
First Name                        john
Last Name                        David
Address                            16151 Blue Belle Dr
City Center                        Valley
State / Province / Region    Pennsylvania
Zip / Postal Code                18034
Country                             United States
Phone                               6049891206

to something like

shipafolaqbi
john David
16151 Blue Belle Dr
Center Valley, pa
18034
United States
 6049891206


any help would be greatly appreciated

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1137
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: edit invoice PDF
« Reply #5 on: April 01, 2021, 03:05:12 am »
Quote
any help would be greatly appreciated

basic knowledge about PHP and work with

Code: [Select]
$this->shipmentfields['fields']
in foreach

you can split some value together or move up/down.

That is all - or find on forum, I definitelly know, this problem was solved in past.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10140
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: edit invoice PDF
« Reply #6 on: April 01, 2021, 10:30:05 am »
just get rid of the

<td class="key">' . $field['title'] . '</td>'

part
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3482
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: edit invoice PDF
« Reply #7 on: April 01, 2021, 11:32:59 am »
You have to combine gjc and Pinochicos answers. That is of typ sent när and surname on the same line.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.