VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: rocktribal on February 18, 2019, 09:47:09 am

Title: Invoice layout - Terms not visible in standard payment
Post by: rocktribal 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
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: Jörgen on February 18, 2019, 09:58:03 am
Using custom template ?
Try using protostar and see if it works.

Jörgen @ Kreativ Fotografi
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: rocktribal 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.
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: jenkinhill 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.
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: rocktribal 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
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: Jörgen 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
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: rocktribal 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?
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: Jörgen on February 18, 2019, 15:20:33 pm
using the same vendor?

Jörgen @ Kreativ Fotografi
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: rocktribal on February 18, 2019, 18:11:29 pm
Yes with the same vendor.
Title: Re: Invoice layout - Terms not visible in standard payment
Post by: Jörgen 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