News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Payment method in order confirmation e-mail

Started by gba, April 13, 2015, 17:22:40 PM

Previous topic - Next topic

gba

Hi all!

Does anyone have an idea, how to achieve that:
I want to display the payment method name, description and info in the order confirmation e-mail.
But: The only data I have in the order details object is the virtuemart_paymentmethod_id.

Thank you very much for any useful hint!

Kind regards,
Gerald

gba

Hello all!

Seems as this would be a bit difficult...
I found out, there is also a field paymentName in the order details object, containing HTML code for payment method name and description (@VM team: a bit dirty hugh? ;) ).
Out of this HTML code I extracted the payment method name.
Also dirty - but it works for me :)

Any cleaner suggestions are very welcome!

Best regards,
Gerald

antonino78

Hello,
Also I have the same problem.
Do you mind indicate how you solved?

gba

Hi!

$tmp = $this->orderDetails['paymentName']; //contains string '<span class="vmpayment_name">Name</span><span class="vmpayment_description">Description</span>
$startpos = strpos($tmp,">") + 1;
$stoppos = strpos($tmp,"<",$startpos);
echo substr($tmp,$startpos,$stoppos - $startpos);
Very dirty though...  ;)

Kind regards,
Gerald

gba


GJC Web Design

In VM3.0.18 ( IMHO many vers before) the full info is in the email

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

Hello GJC

You are right, the full info is in the e-mail. But breaking it apart and getting the string vmCartPaymentLogo, payment_name, payment_description and payment_info You have to add something like that gba suggests.
Just printing out $this->orderDetails['paymentName'] gives the whole shebang. Omitting or rearranging is impossible without breaking the tagged html string apart.

If You have a better idea extracting the data, please suggest :)

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

yes.. true .. the whole thing is simply stored in the DB order

perhaps to make it easier just over ride the protected function renderPluginName ($plugin) in what ever payment you use then u can control how the name etc is made up and stored

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation