Author Topic: Invoice layout - Terms not visible in standard payment  (Read 1035 times)

rocktribal

  • Beginner
  • *
  • Posts: 20
Invoice layout - Terms not visible in standard payment
« on: February 18, 2019, 09:47:09 am »
Hi, there is a problem in invoice layout when the payment is "Standard" the terms not visible even the configuration "Append Terms of Service" is on (Invoice-standar.jpg).
When the payment is "Paypal" the terms is visible (Invoice-paypal.jpg).

Thanks for any help!!!


VirtueMart 3.4.0

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2769
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Invoice layout - Terms not visible in standard payment
« Reply #1 on: February 18, 2019, 09:58:03 am »
Using custom template ?
Try using protostar and see if it works.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

rocktribal

  • Beginner
  • *
  • Posts: 20
Re: Invoice layout - Terms not visible in standard payment
« Reply #2 on: February 18, 2019, 10:34:13 am »
Hi Jörgen thanks for reply,
i don't think template is something who interfere with pdf generation.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27744
  • Always on vacation
    • Jenkin Hill Internet
Re: Invoice layout - Terms not visible in standard payment
« Reply #3 on: February 18, 2019, 11:18:35 am »
Invoice is based on templates, default files are in components/com_virtuemart/views/invoice/tmpl/

Check that {vm:vendorlegalinfo} is included in the Invoice footer on the Invoices/Emails tab of Shop settings.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.8.2 10325 on Joomla 3.9.18 PHP 7.3.18

rocktribal

  • Beginner
  • *
  • Posts: 20
Re: Invoice layout - Terms not visible in standard payment
« Reply #4 on: February 18, 2019, 12:56:47 pm »
Thanks for reply Kelvyn,
the solution to use the {vm:vendor legalinfo} in footer and displayed to every page is not good. That which i don't understand is when the order complete with paypal the generate pdf contains the terms and when the order complete with standard is not contains the terms.

I found the terms in the line 77 (components/com_virtuemart/views/invoice/tmpl/invoice.php)

if ($this->vendor->vendor_letter_add_tos) {?>
<div class="invoice_tos" <?php if ($this->vendor->vendor_letter_add_tos_newpage) { ?> style="page-break-before: always"<?php } ?>>
    <?php echo $this->vendor->vendor_terms_of_service; ?>
</div>
<?php }

i don't understand where the problem is?

Thanks again

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2769
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Invoice layout - Terms not visible in standard payment
« Reply #5 on: February 18, 2019, 13:37:00 pm »
Change
Code: [Select]
<?php echo $this->vendor->vendor_terms_of_service?>to
Code: [Select]
<?php echo 'Here comes vendor_terms_of_service <br />' $this->vendor->vendor_terms_of_service?>
If You do not see the added text, then You have a template override.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

rocktribal

  • Beginner
  • *
  • Posts: 20
Re: Invoice layout - Terms not visible in standard payment
« Reply #6 on: February 18, 2019, 14:46:23 pm »
As you can see in image there is no override.

it is possible to change template depending the payment method?

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2769
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Invoice layout - Terms not visible in standard payment
« Reply #7 on: February 18, 2019, 15:20:33 pm »
using the same vendor?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

rocktribal

  • Beginner
  • *
  • Posts: 20
Re: Invoice layout - Terms not visible in standard payment
« Reply #8 on: February 18, 2019, 18:11:29 pm »
Yes with the same vendor.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2769
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Invoice layout - Terms not visible in standard payment
« Reply #9 on: February 18, 2019, 19:21:43 pm »
Then You have to debug the php code line by line
insert this for example just before
if ($this->vendor->vendor_letter_add_tos) {?>

Code: [Select]
echo '<pre>';
print_r( $this->vendor )
echo '</pre>';

Examine the output from both payments and see what you get.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)