Author Topic: Two standard payment method with different text  (Read 408 times)

roman5527

  • Jr. Member
  • **
  • Posts: 159
Two standard payment method with different text
« on: January 12, 2020, 15:23:44 pm »
Hi, i need two standard payment methods but with different text after send order.

ho i can do it ? thanks.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3634
  • using Matomo instead of Google Analytics
Re: Two standard payment method with different text
« Reply #1 on: January 12, 2020, 17:14:56 pm »
Not sure if that is what you want, but you can add any text (including html code) into the payment description text field. The payment description is included in the order emails.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

pinochico

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 155
    • MiniJoomla
  • VirtueMart Version: 3
Re: Two standard payment method with different text
« Reply #2 on: January 12, 2020, 18:30:15 pm »
We use Virtuemart Mailing Manager for this:

 - setup rules and create different templates
or
- use conditional content in one template for customer email
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9490
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Two standard payment method with different text
« Reply #3 on: January 12, 2020, 19:22:31 pm »
or just detect the payment id in orderdone.php and switch what ever message applies by php
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

roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Two standard payment method with different text
« Reply #4 on: January 13, 2020, 18:17:59 pm »
Hi, GJC Web Design .

i cant edit it in plugins/vmpayment/standard/standard/tmpl/post_payment.php ???? because in this file is text for order done for this payment method.

and how i detect payment id please ?

thanks

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9490
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Two standard payment method with different text
« Reply #5 on: January 13, 2020, 19:41:11 pm »
there or in orderdone

see what is in  $viewData -- if your lucky the payment method ID -- if not you have to find some other method to find the ID
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

roman5527

  • Jr. Member
  • **
  • Posts: 159
Re: Two standard payment method with different text
« Reply #6 on: January 15, 2020, 16:33:42 pm »
Hi, thanks.

$viewData contains payment_name .
if someone needed, my code in plugins/vmpayment/standard/standard/tmpl/post_payment.php is :

Code: [Select]
<?php 

$dobierka 
'Dobierka';
$meno_platby $viewData["payment_name"];
$meno_platby2 strpos($meno_platby$dobierka);

?>




<?php 
if ($meno_platby2 === false) {
?>

<div style="width:100%;">
<?php echo '<div style="color:#32a840;width:100%;font-size:16px;">'vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU_TEXT1_PREVOD_NA_UCET').'</div>'?>
<?php echo '<div style="color:#32a840;margin-bottom:20px;width:100%;font-size:16px;">'vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU_TEXT2_PREVOD_NA_UCET').'</div>'?>
</div>

<?php } else { ?>

<div style="width:100%;">
<?php echo '<div style="color:#32a840;width:100%;font-size:16px;">'vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU_TEXT1').'</div>'?>
<?php echo '<div style="color:#32a840;margin-bottom:20px;width:100%;font-size:16px;">'vmText::_('COM_VIRTUEMART_CART_ORDERDONE_THANK_YOU_TEXT2').'</div>'?>
</div>
<?php ?>