VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: maxispin on December 03, 2016, 09:41:06 AM

Title: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: maxispin on December 03, 2016, 09:41:06 AM
VM 3.0.17

I don't figure out how to print/echo on Order emails 'vmpayment_info'.

<?php echo $this->orderDetails['paymentName'] ?>
Results (Payment Name + payment_desc) (I wonder why they has to be groupped so.. and where it is defined)

Could you please help me out?
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: GJC Web Design on December 03, 2016, 12:27:33 PM
saved in the #_virtuemart_payment_plg_xxxx  table each purchase

if u wanted just the name guess you need to query the  #_virtuemart_paymentmethods_en_gb etc table with the payment id or split up the current return
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: maxispin on December 03, 2016, 13:13:25 PM
I see.. not very handy..

the case is that payment method related additional information is needed to given after purchase, not on the frontend. Thus, the email is handy tool for that.

I need to figure out another solution.

How am I able to echo Anything from the database?    (This might be easy question, but I am not a coder.)
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: GJC Web Design on December 03, 2016, 13:16:27 PM
If u do want to just echo out the static info of the payment method I would just do a std.Joomla query for it in the email template .. Google!

But the name and/or desc might be in an object available in the email template.. u need to check
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: maxispin on December 03, 2016, 22:04:17 PM
I have googled but obviously not much enough :D

Thanks for encouraging  ;D
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: maxispin on December 03, 2016, 23:47:23 PM
Kind of work around... (better than nothing):

invoice_items.php

<td align="left" class="pricePad" colspan="6" style="border: 1px solid #CCCCCC;">
<?php echo $this->orderDetails['paymentName'] ?>
<?php if(substr($this->orderDetails['paymentName'],0 === "NameDescription" )) echo '<p>Pay your order with this bank account number' ?></td>

Not very stable solution..
Title: Re: How to echo Payment Info ? (vmpayment_standard_payment_info)
Post by: maxispin on December 04, 2016, 00:22:06 AM
Hurrey...

I just got it double and realized that cache was not emptied or something. The info is coded to be published, but I have no idea where..