VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: artonweb on May 06, 2020, 10:07:25 AM

Title: Modification in invoice
Post by: artonweb on May 06, 2020, 10:07:25 AM
Hello.
I am using Joomla 3.9.18 and Virtuemart 3.6.10
I would like, when a shopper is choosing a payment method with large text of info, then in invoice document to view only the name of this method.
Is it possible?
Title: Re: Modification in invoice
Post by: GJC Web Design on May 06, 2020, 12:05:34 PM
Difficult because the name is taken from the #__virtuemart_payment_plg_xxxx table:: payment_name

If u look there you will see that the full html is stored there.

The payment id is available in the order object so u could do it by querying the payment name by id from #__virtuemart_paymentmethods_xx_xx
Title: Re: Modification in invoice
Post by: artonweb on May 07, 2020, 06:25:00 AM
Thank you for your reply.
I am thinking to solve the issue with some code.
For example if payment name is "one" then echo "a specific text".
Can you help me with this?
Title: Re: Modification in invoice
Post by: Jörgen on May 07, 2020, 06:37:02 AM
As GJC just Said, use the payment Id and query the __virtuemart_payment_plg_xxxx table for the name. You can also use payment Id directly, not so userfriendly but doable.
Jörgen @ Kreativ Fotografi
Title: Re: Modification in invoice
Post by: artonweb on May 07, 2020, 06:49:05 AM
Thank you Jörgen.
Some code to do this in invoice_items.php
I am using standard payment method and I would like to hide the info of payment.
Title: Re: Modification in invoice
Post by: Jörgen on May 07, 2020, 07:00:25 AM
Ok, you have to figure out the code by yourself. What you can för easily is tagning your payment dedscription and use CSS to huden the portion you want. This only requires changed in your custom.css File.
Jörgen @ Kreativ Fotografi