Author Topic: Modification in invoice  (Read 386 times)

artonweb

  • Beginner
  • *
  • Posts: 27
    • Art On web
Modification in invoice
« 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?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9748
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Modification in invoice
« Reply #1 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
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

artonweb

  • Beginner
  • *
  • Posts: 27
    • Art On web
Re: Modification in invoice
« Reply #2 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?

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2914
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Modification in invoice
« Reply #3 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

artonweb

  • Beginner
  • *
  • Posts: 27
    • Art On web
Re: Modification in invoice
« Reply #4 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.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2914
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Modification in invoice
« Reply #5 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
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)