[Skip to main content](#vessel-content)

#   Where do I find $data-&gt;order\_payment\_method

##

- **[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")**
- [![phamosa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/guitar.gif)](/forum/user/7861-phamosa "View phamosa's Profile") Topic Author
- [ Offline](/forum/user/7861-phamosa)

Less More

- Posts: 65
- Thank you received: 0
-
-

13 years 11 months ago [\#80984](#80984) by [phamosa](/forum/user/7861-phamosa "View phamosa's Profile")  *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#80984 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")* was created by *[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")*

I would like to look into the php file that defines the "order_payment_method" to change the name of one of these payment methods provided.
Where do I find it?
Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

13 years 11 months ago [\#81111](#81111) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#81111 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")*

It's not possible to change where that is defined. Instead, you should change the code displaying it. So I need to know why and where you want to change that in order to tell you what to do.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")**
- [![phamosa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/guitar.gif)](/forum/user/7861-phamosa "View phamosa's Profile") Topic Author
- [ Offline](/forum/user/7861-phamosa)

Less More

- Posts: 65
- Thank you received: 0
-
-

13 years 11 months ago [\#81119](#81119) by [phamosa](/forum/user/7861-phamosa "View phamosa's Profile")  Replied by *[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")* on topic *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#81119 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")*

Dear Nicolas,
when my programmer installed and configured Hikashop for my customer, he also modified the email confirmation for the administrator and added the mentioned variable to display the payment method of the respective order.
It worked all well until now I had to add a payment method (payment in advance) and therefor modified the content of the Western Union payment method (I modified it just in the backend, not in the php codes). Functionally the payment method works well but in the administrator email confirmation, when the order is on "payment in advance", there is written "Payment method: westernunion"

He added to the code;
&lt;?php
$userCMS =&amp; JFactory::getUser();
echo "Order Emailaddress: ".($userCMS-&gt;get('email'))." - Payment Method: ".($data-&gt;order_payment_method);
?&gt;

Here is the complete code of the email:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 1.5.7 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt; &lt;div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;"&gt; &lt;table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;?php $userCMS =&amp; JFactory::getUser(); echo "Order Emailaddress: ".($userCMS-&gt;get('email'))." - Payment Method: ".($data-&gt;order_payment_method); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;br/&gt; &lt;br/&gt; &lt;?php $url = HIKASHOP_LIVE.'administrator/index.php?option=com_hikashop&amp;ctrl=order&amp;task=edit&amp;order_id='.$data-&gt;order_id; echo JText::sprintf('ORDER_STATUS_CHANGED',$data-&gt;mail_status)."&lt;br/&gt;&lt;br/&gt;".JText::sprintf('NOTIFICATION_OF_ORDER_ON_WEBSITE',$data-&gt;order_number,HIKASHOP_LIVE); $currency = hikashop_get('class.currency'); $url = '&lt;a href="'.$url.'" target="_blank"&gt;'.$url.'&lt;/a&gt;'; echo "&lt;br/&gt;".JText::sprintf('ACCESS_ORDER_WITH_LINK',$url); if($data-&gt;order_payment_method=='creditcard' &amp;&amp; !empty($data-&gt;credit_card_info-&gt;cc_number)){ echo "&lt;br/&gt;".JText::_('CUSTOMER_PAID_WITH_CREDIT_CARD'); if(!empty($data-&gt;credit_card_info-&gt;cc_owner)){ echo "&lt;br/&gt;".JText::_('CREDIT_CARD_OWNER').' : '.$data-&gt;credit_card_info-&gt;cc_owner; } echo "&lt;br/&gt;".JText::_('END_OF_CREDIT_CARD_NUMBER').' : '.substr($data-&gt;credit_card_info-&gt;cc_number,8); if(!empty($data-&gt;credit_card_info-&gt;cc_CCV)){ echo "&lt;br/&gt;".JText::_('CARD_VALIDATION_CODE').' : '.$data-&gt;credit_card_info-&gt;cc_CCV; } echo "&lt;br/&gt;".JText::_('CREDITCARD_WARNING'); } $fieldsClass = hikashop_get('class.field'); $fields = $fieldsClass-&gt;getFields('frontcomp',$data,'order',''); foreach($fields as $fieldName =&gt; $oneExtraField) { if(!empty($data-&gt;$fieldName)) echo "&lt;br/&gt;".$fieldsClass-&gt;trans($oneExtraField-&gt;field_realname).' : '.$fieldsClass-&gt;show($oneExtraField,$data-&gt;$fieldName); } $class = hikashop_get('class.order'); $url = $data-&gt;order_number; $config =&amp; hikashop_config(); if($config-&gt;get('simplified_registration',0)!=2){ $url .= ' ( '.$data-&gt;order_url.' )'; } $data-&gt;cart = $class-&gt;loadFullOrder($data-&gt;order_id,true,false); $data-&gt;cart-&gt;coupon = null; $price = null; $tax = $data-&gt;cart-&gt;order_subtotal - $data-&gt;cart-&gt;order_subtotal_no_vat + $data-&gt;order_discount_tax + $data-&gt;order_shipping_tax; $price-&gt;price_value = $data-&gt;order_full_price-$tax; $price-&gt;price_value_with_tax = $data-&gt;order_full_price; $data-&gt;cart-&gt;full_total = null; $data-&gt;cart-&gt;full_total-&gt;prices = array($price); $data-&gt;cart-&gt;coupon-&gt;discount_value =&amp; $data-&gt;order_discount_price; ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;table width="100%" style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;"&gt; &lt;tr&gt; &lt;td style="font-weight:bold;"&gt; ProductCode &lt;/td&gt; &lt;td style="font-weight:bold;"&gt; &lt;?php echo JText::_('CART_PRODUCT_NAME'); ?&gt; &lt;/td&gt; &lt;td style="font-weight:bold;"&gt; &lt;?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?&gt; &lt;/td&gt; &lt;td style="font-weight:bold;"&gt; &lt;?php echo JText::_('CART_PRODUCT_QUANTITY'); ?&gt; &lt;/td&gt; &lt;td style="font-weight:bold;text-align:right;"&gt; &lt;?php echo JText::_('HIKASHOP_TOTAL'); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php if(hikashop_level(2)){ $fieldsClass = hikashop_get('class.field'); $null = null; $itemFields = $fieldsClass-&gt;getFields('frontcomp',$null,'item'); } foreach($data-&gt;cart-&gt;products as $item){ ?&gt; &lt;tr&gt; &lt;td&gt; &lt;?php echo $item-&gt;order_product_code; ?&gt; &lt;td&gt; &lt;p&gt;&lt;?php echo $item-&gt;order_product_name; ?&gt;&lt;/p&gt;&lt;?php if(!empty($itemFields)){ foreach($itemFields as $field){ $namekey = $field-&gt;field_namekey; if(empty($item-&gt;$namekey)) continue; echo '&lt;p&gt;'.$fieldsClass-&gt;getFieldName($field).': '.$fieldsClass-&gt;show($field,$item-&gt;$namekey).'&lt;/p&gt;'; } } ?&gt; &lt;/td&gt; &lt;td&gt; &lt;?php echo $currencyHelper-&gt;format($item-&gt;order_product_price+$item-&gt;order_product_tax,$data-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;td&gt; &lt;?php echo $item-&gt;order_product_quantity; ?&gt; &lt;/td&gt; &lt;td style="text-align:right"&gt; &lt;?php echo $currencyHelper-&gt;format($item-&gt;order_product_total_price,$data-&gt;order_currency_id); ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } if(bccomp($data-&gt;order_discount_price,0,5)){ echo '&lt;tr&gt;&lt;td colspan="5" style="text-align:right"&gt;'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper-&gt;format($data-&gt;order_discount_price*-1,$data-&gt;order_currency_id).'&lt;/td&gt;&lt;/tr&gt;'; } if(bccomp($data-&gt;order_shipping_price,0,5)){ echo '&lt;tr&gt;&lt;td colspan="5" style="text-align:right"&gt;'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper-&gt;format($data-&gt;order_shipping_price,$data-&gt;order_currency_id).'&lt;/td&gt;&lt;/tr&gt;'; } if($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value!=$data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax){ if($config-&gt;get('detailed_tax_display') &amp;&amp; !empty($data-&gt;cart-&gt;order_tax_info)){ foreach($data-&gt;cart-&gt;order_tax_info as $tax){ echo '&lt;tr&gt;&lt;td colspan="5" style="text-align:right"&gt;'.$tax-&gt;tax_namekey. ' : '.$currencyHelper-&gt;format($tax-&gt;tax_amount,$data-&gt;order_currency_id).'&lt;/td&gt;&lt;/tr&gt;'; } }else{ echo '&lt;tr&gt;&lt;td colspan="5" style="text-align:right"&gt;'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value,$data-&gt;order_currency_id)).'&lt;/td&gt;&lt;/tr&gt;'; } $text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,$data-&gt;order_currency_id)); }else{ $text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper-&gt;format($data-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,$data-&gt;order_currency_id); } echo '&lt;tr&gt;&lt;td colspan="5" style="text-align:right;font-weight:bold;"&gt;'.$text.'&lt;/td&gt;&lt;/tr&gt;'; ?&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;table width="100%" style="border: 1px solid #DDDDDD;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;"&gt; &lt;?php $params = null; $js = ''; $fieldsClass = hikashop_get('class.field'); $app=&amp;JFactory::getApplication(); $template = trim(hikashop_getLayout($app-&gt;isAdmin() ? 'order' : 'address','address_template',$params,$js)); if(!empty($data-&gt;cart-&gt;billing_address)){ $billing = $template; foreach($data-&gt;cart-&gt;fields as $field){ $fieldname = $field-&gt;field_namekey; $billing=str_replace('{'.$fieldname.'}',$fieldsClass-&gt;show($field,$data-&gt;cart-&gt;billing_address-&gt;$fieldname),$billing); } echo '&lt;tr&gt;&lt;td style="font-weight:bold;background-color:#DDDDDD"&gt;'.JText::_('HIKASHOP_BILLING_ADDRESS').'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;'; echo str_replace(array("\r\n","\r","\n"),'&lt;br/&gt;',preg_replace('#{(?:(?!}).)*}#i','',$billing)).'&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;'; } if(!empty($data-&gt;cart-&gt;order_shipping_id) &amp;&amp; (!empty($data-&gt;cart-&gt;shipping_address) &#124;&#124; !empty($data-&gt;cart-&gt;override_shipping_address))){ echo '&lt;tr&gt;&lt;td style="font-weight:bold;background-color:#DDDDDD"&gt;'.JText::_('HIKASHOP_SHIPPING_ADDRESS').'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;'; if(!empty($data-&gt;cart-&gt;override_shipping_address)) { echo $data-&gt;cart-&gt;override_shipping_address.'&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;'; } else { $shipping = $template; foreach($data-&gt;cart-&gt;fields as $field){ $fieldname = $field-&gt;field_namekey; $shipping=str_replace('{'.$fieldname.'}',$fieldsClass-&gt;show($field,$data-&gt;cart-&gt;shipping_address-&gt;$fieldname),$shipping); } echo str_replace(array("\r\n","\r","\n"),'&lt;br/&gt;',preg_replace('#{(?:(?!}).)*}#i','',$shipping)).'&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;'; } }?&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td height="10"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

13 years 11 months ago [\#81363](#81363) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#81363 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")*

Well, the problem is that it's not how you should do it ![;)](/media/kunena/emoticons/24.png ";)")

You should display the name of the payment method with that code:
$class = hikashop_get('class.payment');
$payment = $class-&gt;get($data-&gt;order_payment_id);
echo $payment-&gt;payment_name;

it's a bit more complex but that way you get the payment name, not the payment type which is why you still see westernunion even if you changed the payment name.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")**
- [![phamosa's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/guitar.gif)](/forum/user/7861-phamosa "View phamosa's Profile") Topic Author
- [ Offline](/forum/user/7861-phamosa)

Less More

- Posts: 65
- Thank you received: 0
-
-

13 years 11 months ago [\#82273](#82273) by [phamosa](/forum/user/7861-phamosa "View phamosa's Profile")  Replied by *[phamosa](/forum/user/7861-phamosa "View phamosa's Profile")* on topic *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#82273 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")*

hi nicolas, so you mean I should put the code that you sent me instead of the $data-&gt;order_payment_method?
thank you!!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#82369](#82369) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Where do I find $data-&gt;order\_payment\_method](/forum/4-how-to/76543-where-do-i-find-data-order-payment-method#82369 "I would like to look into the php file that defines the &quot;order&#95;payment&#95;method&quot; to change the name of one of these payment methods provided. Where do I find it? Thank you!")*

Hi,

Yes you can put the code before:
echo "Order Emailaddress: ".($userCMS-&gt;get('email'))." - Payment Method: ".($data-&gt;order_payment_method);
and replace "$data-&gt;order_payment_method" by "$payment-&gt;payment_name".

The following user(s) said Thank You: [phamosa](/forum/user/7861-phamosa "View phamosa's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2NTQzLXdoZXJlLWRvLWktZmluZC1kYXRhLW9yZGVyLXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
