- Posts: 65
- Thank you received: 0
Payment methods translation + confirmation email
14 years 1 month ago #62765
by phamosa
Payment methods translation + confirmation email was created by phamosa
Hi!
I need help with the following:
www.rufrecords.de/index.php?option=com_h...t&Itemid=409&lang=de
In out shop on Ruf Records /German version, the following part concerning the payment methods ("Zahlungsmethode") is not translated:
Bank transfer
For orders in Germany
IPayment Credit Card
For orders in and outside Germany.
Furthermore, I need to include the payment method into the confirmation email for the customers. How can I do this in both languages?
Let me know if you need an Admin login!
Thank you!
Best regards, Carolin
I need help with the following:
www.rufrecords.de/index.php?option=com_h...t&Itemid=409&lang=de
In out shop on Ruf Records /German version, the following part concerning the payment methods ("Zahlungsmethode") is not translated:
Bank transfer
For orders in Germany
IPayment Credit Card
For orders in and outside Germany.
Furthermore, I need to include the payment method into the confirmation email for the customers. How can I do this in both languages?
Let me know if you need an Admin login!
Thank you!
Best regards, Carolin
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62803
by Xavier
Replied by Xavier on topic Re: Payment methods translation + confirmation email
Hi phamosa,
You can change these translations in the payment method edition.
"Bank transfer" is the name of the Payment method and "For orders in Germany" is the description.
If you are using Joomla 1.5 you can use JoomFish, and FaLang for Joomla 2.5 to manage many languages on your website.
With these extensions, you can translate the different payment informations.
You can change these translations in the payment method edition.
"Bank transfer" is the name of the Payment method and "For orders in Germany" is the description.
If you are using Joomla 1.5 you can use JoomFish, and FaLang for Joomla 2.5 to manage many languages on your website.
With these extensions, you can translate the different payment informations.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62828
by phamosa
Replied by phamosa on topic Re: Payment methods translation + confirmation email
Hi Xavier,
I did the translation with FaLang and it works well, thank you.
My other question was:
Furthermore, I need to include the payment method into the confirmation email for the customers. How can I do this in both languages?
I would simply like to write it in a single row underneath the delivery address:
Payment method: e.g. Invoice / Bank Transfer
In German: Zahlungsmethode: e.g. Rechnung / Banküberweisung
Here is the code of the respective email ORDER_CREATION_NOTIFICATION_SUBJECT as of now:
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.7
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;">
<table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<?php echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
<br/>
<br/>
<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
$url = '<a href="'.$data->order_url.'">'. $url.'</a>';
}
echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<h1 style="background-color:#DDDDDD;font-size:14px;width:100%;padding:5px;"><?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?></h1>
<br/>
<table width="100%" style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<tr>
<td style="font-weight:bold;"><?php
echo JText::_('CART_PRODUCT_NAME');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_UNIT_PRICE');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_QUANTITY');
?></td>
<td style="font-weight: bold; text-align: right;"><?php echo JText::_('HIKASHOP_TOTAL'); ?>
</td>
</tr>
<?php
if(hikashop_level(2)){
$fieldsClass = hikashop_get('class.field');
$null = null;
$itemFields = $fieldsClass->getFields('frontcomp',$null,'item');
}
foreach($data->cart->products as $item){
?>
<tr>
<td>
<p><?php echo $item->order_product_name; ?></p><?php
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($item->$namekey)) continue;
echo '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey).'</p>';
}
} ?>
</td>
<td><?php echo $currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id); ?></td>
<td><?php echo $item->order_product_quantity; ?></td>
<td style="text-align: right"><?php echo $currencyHelper->format($item->order_product_total_price,$data->order_currency_id); ?></td>
</tr>
<?php
}
if(bccomp($data->order_discount_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id).'</td></tr>';
}
if(bccomp($data->order_shipping_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper->format($data->order_shipping_price,$data->order_currency_id).'</td></tr>';
}
if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax){
if($config->get('detailed_tax_display') && !empty($data->order_tax_info)){
foreach($data->order_tax_info as $tax){
echo '<tr><td colspan="4" style="text-align:right">'.$tax->tax_namekey. ' : '.$currencyHelper->format($tax->tax_amount,$data->order_currency_id).'</td></tr>';
}
}else{
echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
}
$text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id));
}else{
$text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id);
}
echo '<tr><td colspan="4" style="text-align:right;font-weight:bold;">'.$text.'</td></tr>';
?>
</table>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<table width="100%" style="border: 1px solid #DDDDDD;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<?php
$params = null;
$js = '';
$fieldsClass = hikashop_get('class.field');
$app =& JFactory::getApplication();
if($app->isAdmin()){
$view = 'order';
}else{
$view = 'address';
}
$template = trim(hikashop_getLayout($view,'address_template',$params,$js));
if(!empty($data->cart->billing_address)){
$billing = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->billing_address->address_id];
$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_BILLING_ADDRESS').'</td></tr><tr><td>';
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
?!}).)*}#i','',$billing)).'<br/></td></tr>';
}
if(!empty($data->order_shipping_method)) {
$currentShipping = hikashop_import('hikashopshipping',$data->order_shipping_method);
if(method_exists($currentShipping, 'getShippingAddress')) {
$override = $currentShipping->getShippingAddress($data->order_shipping_id);
if($override !== false) {
$data->override_shipping_address = $override;
}
}
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_SHIPPING_ADDRESS').'</td></tr><tr><td>';
if(!empty($data->override_shipping_address)) {
echo $data->override_shipping_address.'<br/></td></tr>';
} else if(!empty($data->cart->has_shipping) && !empty($data->cart->shipping_address)){
$shipping = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->shipping_address->address_id];
$shipping=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$shipping);
}
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
?!}).)*}#i','',$shipping)).'<br/></td></tr>';
}?>
</table>
</td>
</tr>
<tr>
<td><?php
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
echo "<br/>".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
} ?></td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<?php
JPluginHelper::importPlugin('hikashop');
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$data->cart, 'email_notification_html'));
?>
<tr>
<td>
<?php
if(!$app->isAdmin()){
echo JText::_('ORDER_VALID_AFTER_PAYMENT');
$config =& hikashop_config();
if($data->cart->full_total->prices[0]->price_value_with_tax>0 && hikashop_level(1) && $config->get('allow_payment_button',1)){
global $Itemid;
$url = '';
if(!empty($Itemid)){
$url='&Itemid='.$Itemid;
}
$pay_url = hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url);
if($config->get('force_ssl',0) && strpos('https://',$pay_url) === false) {
$pay_url = str_replace('http://','https://',$pay_url);
} ?>
<a href="$pay_url"><?php JText::_('PAY_NOW'); ?></a>
<?php } ?>
<br/>
<br/>
<?php echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE);
}?>
<br/>
<br/>
<?php echo JText::sprintf('BEST_REGARDS_CUSTOMER',$mail->from_name);?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
</tbody>
</table>
</div>
I did the translation with FaLang and it works well, thank you.
My other question was:
Furthermore, I need to include the payment method into the confirmation email for the customers. How can I do this in both languages?
I would simply like to write it in a single row underneath the delivery address:
Payment method: e.g. Invoice / Bank Transfer
In German: Zahlungsmethode: e.g. Rechnung / Banküberweisung
Here is the code of the respective email ORDER_CREATION_NOTIFICATION_SUBJECT as of now:
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.7
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;">
<table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<?php echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
<br/>
<br/>
<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
$url = '<a href="'.$data->order_url.'">'. $url.'</a>';
}
echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<h1 style="background-color:#DDDDDD;font-size:14px;width:100%;padding:5px;"><?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?></h1>
<br/>
<table width="100%" style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<tr>
<td style="font-weight:bold;"><?php
echo JText::_('CART_PRODUCT_NAME');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_UNIT_PRICE');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_QUANTITY');
?></td>
<td style="font-weight: bold; text-align: right;"><?php echo JText::_('HIKASHOP_TOTAL'); ?>
</td>
</tr>
<?php
if(hikashop_level(2)){
$fieldsClass = hikashop_get('class.field');
$null = null;
$itemFields = $fieldsClass->getFields('frontcomp',$null,'item');
}
foreach($data->cart->products as $item){
?>
<tr>
<td>
<p><?php echo $item->order_product_name; ?></p><?php
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($item->$namekey)) continue;
echo '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey).'</p>';
}
} ?>
</td>
<td><?php echo $currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id); ?></td>
<td><?php echo $item->order_product_quantity; ?></td>
<td style="text-align: right"><?php echo $currencyHelper->format($item->order_product_total_price,$data->order_currency_id); ?></td>
</tr>
<?php
}
if(bccomp($data->order_discount_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id).'</td></tr>';
}
if(bccomp($data->order_shipping_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper->format($data->order_shipping_price,$data->order_currency_id).'</td></tr>';
}
if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax){
if($config->get('detailed_tax_display') && !empty($data->order_tax_info)){
foreach($data->order_tax_info as $tax){
echo '<tr><td colspan="4" style="text-align:right">'.$tax->tax_namekey. ' : '.$currencyHelper->format($tax->tax_amount,$data->order_currency_id).'</td></tr>';
}
}else{
echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
}
$text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id));
}else{
$text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id);
}
echo '<tr><td colspan="4" style="text-align:right;font-weight:bold;">'.$text.'</td></tr>';
?>
</table>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<table width="100%" style="border: 1px solid #DDDDDD;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<?php
$params = null;
$js = '';
$fieldsClass = hikashop_get('class.field');
$app =& JFactory::getApplication();
if($app->isAdmin()){
$view = 'order';
}else{
$view = 'address';
}
$template = trim(hikashop_getLayout($view,'address_template',$params,$js));
if(!empty($data->cart->billing_address)){
$billing = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->billing_address->address_id];
$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_BILLING_ADDRESS').'</td></tr><tr><td>';
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
}
if(!empty($data->order_shipping_method)) {
$currentShipping = hikashop_import('hikashopshipping',$data->order_shipping_method);
if(method_exists($currentShipping, 'getShippingAddress')) {
$override = $currentShipping->getShippingAddress($data->order_shipping_id);
if($override !== false) {
$data->override_shipping_address = $override;
}
}
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_SHIPPING_ADDRESS').'</td></tr><tr><td>';
if(!empty($data->override_shipping_address)) {
echo $data->override_shipping_address.'<br/></td></tr>';
} else if(!empty($data->cart->has_shipping) && !empty($data->cart->shipping_address)){
$shipping = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->shipping_address->address_id];
$shipping=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$shipping);
}
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
}?>
</table>
</td>
</tr>
<tr>
<td><?php
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
echo "<br/>".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
} ?></td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<?php
JPluginHelper::importPlugin('hikashop');
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$data->cart, 'email_notification_html'));
?>
<tr>
<td>
<?php
if(!$app->isAdmin()){
echo JText::_('ORDER_VALID_AFTER_PAYMENT');
$config =& hikashop_config();
if($data->cart->full_total->prices[0]->price_value_with_tax>0 && hikashop_level(1) && $config->get('allow_payment_button',1)){
global $Itemid;
$url = '';
if(!empty($Itemid)){
$url='&Itemid='.$Itemid;
}
$pay_url = hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url);
if($config->get('force_ssl',0) && strpos('https://',$pay_url) === false) {
$pay_url = str_replace('http://','https://',$pay_url);
} ?>
<a href="$pay_url"><?php JText::_('PAY_NOW'); ?></a>
<?php } ?>
<br/>
<br/>
<?php echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE);
}?>
<br/>
<br/>
<?php echo JText::sprintf('BEST_REGARDS_CUSTOMER',$mail->from_name);?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
</tbody>
</table>
</div>
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62838
by Xavier
Replied by Xavier on topic Re: Payment methods translation + confirmation email
Hi to add the shipping description, you can add:
I think that the values will be in the same language as on the website.
Code:
echo $data->cart->shipping->shipping_type;
echo $data->cart->shipping->shipping_description;
I think that the values will be in the same language as on the website.
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62859
by phamosa
Replied by phamosa on topic Re: Payment methods translation + confirmation email
But I was not talking about shipping method which is already included, but about the payment method...
Please Log in or Create an account to join the conversation.
14 years 1 month ago #62933
by Xavier
Replied by Xavier on topic Re: Payment methods translation + confirmation email
Hi phamosa,
Just replace "shipping" by "payment".
Just replace "shipping" by "payment".
Please Log in or Create an account to join the conversation.
14 years 1 month ago #63365
by phamosa
Replied by phamosa on topic Re: Payment methods translation + confirmation email
I tried it this way but it does not work..
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.7
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;">
<table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<?php echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
<br/>
<br/>
<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
$url = '<a href="'.$data->order_url.'">'. $url.'</a>';
}
echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<h1 style="background-color:#DDDDDD;font-size:14px;width:100%;padding:5px;"><?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?></h1>
<br/>
<table width="100%" style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<tr>
<td style="font-weight:bold;"><?php
echo JText::_('CART_PRODUCT_NAME');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_UNIT_PRICE');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_QUANTITY');
?></td>
<td style="font-weight: bold; text-align: right;"><?php echo JText::_('HIKASHOP_TOTAL'); ?>
</td>
</tr>
<?php
if(hikashop_level(2)){
$fieldsClass = hikashop_get('class.field');
$null = null;
$itemFields = $fieldsClass->getFields('frontcomp',$null,'item');
}
foreach($data->cart->products as $item){
?>
<tr>
<td>
<p><?php echo $item->order_product_name; ?></p><?php
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($item->$namekey)) continue;
echo '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey).'</p>';
}
} ?>
</td>
<td><?php echo $currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id); ?></td>
<td><?php echo $item->order_product_quantity; ?></td>
<td style="text-align: right"><?php echo $currencyHelper->format($item->order_product_total_price,$data->order_currency_id); ?></td>
</tr>
<?php
}
if(bccomp($data->order_discount_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id).'</td></tr>';
}
if(bccomp($data->order_shipping_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper->format($data->order_shipping_price,$data->order_currency_id).'</td></tr>';
}
if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax){
if($config->get('detailed_tax_display') && !empty($data->order_tax_info)){
foreach($data->order_tax_info as $tax){
echo '<tr><td colspan="4" style="text-align:right">'.$tax->tax_namekey. ' : '.$currencyHelper->format($tax->tax_amount,$data->order_currency_id).'</td></tr>';
}
}else{
echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
}
$text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id));
}else{
$text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id);
}
echo '<tr><td colspan="4" style="text-align:right;font-weight:bold;">'.$text.'</td></tr>';
?>
</table>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<table width="100%" style="border: 1px solid #DDDDDD;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<?php
$params = null;
$js = '';
$fieldsClass = hikashop_get('class.field');
$app =& JFactory::getApplication();
if($app->isAdmin()){
$view = 'order';
}else{
$view = 'address';
}
$template = trim(hikashop_getLayout($view,'address_template',$params,$js));
if(!empty($data->cart->billing_address)){
$billing = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->billing_address->address_id];
$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_BILLING_ADDRESS').'</td></tr><tr><td>';
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
?!}).)*}#i','',$billing)).'<br/></td></tr>';
}
if(!empty($data->order_shipping_method)) {
$currentShipping = hikashop_import('hikashopshipping',$data->order_shipping_method);
if(method_exists($currentShipping, 'getShippingAddress')) {
$override = $currentShipping->getShippingAddress($data->order_shipping_id);
if($override !== false) {
$data->override_shipping_address = $override;
}
}
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_SHIPPING_ADDRESS').'</td></tr><tr><td>';
if(!empty($data->override_shipping_address)) {
echo $data->override_shipping_address.'<br/></td></tr>';
} else if(!empty($data->cart->has_shipping) && !empty($data->cart->shipping_address)){
$shipping = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->shipping_address->address_id];
$shipping=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$shipping);
}
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
?!}).)*}#i','',$shipping)).'<br/></td></tr>';
}?>
</table>
</td>
</tr>
<tr>
<td><?php
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
echo "<br/>".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
} ?></td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<?php
JPluginHelper::importPlugin('hikashop');
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$data->cart, 'email_notification_html'));
?>
<tr>
<td>
<?php
if(!$app->isAdmin()){
echo JText::_('ORDER_VALID_AFTER_PAYMENT');
$config =& hikashop_config();
if($data->cart->full_total->prices[0]->price_value_with_tax>0 && hikashop_level(1) && $config->get('allow_payment_button',1)){
global $Itemid;
$url = '';
if(!empty($Itemid)){
$url='&Itemid='.$Itemid;
}
$pay_url = hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url);
if($config->get('force_ssl',0) && strpos('https://',$pay_url) === false) {
$pay_url = str_replace('http://','https://',$pay_url);
} ?>
<a href="$pay_url"><?php JText::_('PAY_NOW'); ?></a>
<?php } ?>
<br/>
<br/>
<?php echo $data->cart->payment->_payment_type;?>
<?php echo $data->cart->payment->payment_description;?>
<br/>
<br/>
<?php echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE);
}?>
<br/>
<br/>
<?php echo JText::sprintf('BEST_REGARDS_CUSTOMER',$mail->from_name);?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
</tbody>
</table>
</div>
<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.7
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div style="background-color: #ffffff; font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px; color: #000000; width: 100%;">
<table style="margin: auto;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<?php echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);?>
<br/>
<br/>
<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
$url = '<a href="'.$data->order_url.'">'. $url.'</a>';
}
echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<h1 style="background-color:#DDDDDD;font-size:14px;width:100%;padding:5px;"><?php echo JText::_('SUMMARY_OF_YOUR_ORDER');?></h1>
<br/>
<table width="100%" style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<tr>
<td style="font-weight:bold;"><?php
echo JText::_('CART_PRODUCT_NAME');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_UNIT_PRICE');
?></td>
<td style="font-weight: bold;"><?php
echo JText::_('CART_PRODUCT_QUANTITY');
?></td>
<td style="font-weight: bold; text-align: right;"><?php echo JText::_('HIKASHOP_TOTAL'); ?>
</td>
</tr>
<?php
if(hikashop_level(2)){
$fieldsClass = hikashop_get('class.field');
$null = null;
$itemFields = $fieldsClass->getFields('frontcomp',$null,'item');
}
foreach($data->cart->products as $item){
?>
<tr>
<td>
<p><?php echo $item->order_product_name; ?></p><?php
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field->field_namekey;
if(empty($item->$namekey)) continue;
echo '<p>'.$fieldsClass->getFieldName($field).': '.$fieldsClass->show($field,$item->$namekey).'</p>';
}
} ?>
</td>
<td><?php echo $currencyHelper->format($item->order_product_price+$item->order_product_tax,$data->order_currency_id); ?></td>
<td><?php echo $item->order_product_quantity; ?></td>
<td style="text-align: right"><?php echo $currencyHelper->format($item->order_product_total_price,$data->order_currency_id); ?></td>
</tr>
<?php
}
if(bccomp($data->order_discount_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_COUPON').' : '.$currencyHelper->format($data->order_discount_price*-1,$data->order_currency_id).'</td></tr>';
}
if(bccomp($data->order_shipping_price,0,5)){
echo '<tr><td colspan="4" style="text-align:right">'.JText::_('HIKASHOP_SHIPPING_METHOD').' : '.$currencyHelper->format($data->order_shipping_price,$data->order_currency_id).'</td></tr>';
}
if($data->cart->full_total->prices[0]->price_value!=$data->cart->full_total->prices[0]->price_value_with_tax){
if($config->get('detailed_tax_display') && !empty($data->order_tax_info)){
foreach($data->order_tax_info as $tax){
echo '<tr><td colspan="4" style="text-align:right">'.$tax->tax_namekey. ' : '.$currencyHelper->format($tax->tax_amount,$data->order_currency_id).'</td></tr>';
}
}else{
echo '<tr><td colspan="4" style="text-align:right">'.JText::sprintf('TOTAL_WITHOUT_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value,$data->order_currency_id)).'</td></tr>';
}
$text=JText::sprintf('TOTAL_WITH_VAT',$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id));
}else{
$text=JText::_('HIKASHOP_FINAL_TOTAL'). ' : '.$currencyHelper->format($data->cart->full_total->prices[0]->price_value_with_tax,$data->order_currency_id);
}
echo '<tr><td colspan="4" style="text-align:right;font-weight:bold;">'.$text.'</td></tr>';
?>
</table>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td>
<table width="100%" style="border: 1px solid #DDDDDD;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:12px;">
<?php
$params = null;
$js = '';
$fieldsClass = hikashop_get('class.field');
$app =& JFactory::getApplication();
if($app->isAdmin()){
$view = 'order';
}else{
$view = 'address';
}
$template = trim(hikashop_getLayout($view,'address_template',$params,$js));
if(!empty($data->cart->billing_address)){
$billing = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->billing_address->address_id];
$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_BILLING_ADDRESS').'</td></tr><tr><td>';
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
}
if(!empty($data->order_shipping_method)) {
$currentShipping = hikashop_import('hikashopshipping',$data->order_shipping_method);
if(method_exists($currentShipping, 'getShippingAddress')) {
$override = $currentShipping->getShippingAddress($data->order_shipping_id);
if($override !== false) {
$data->override_shipping_address = $override;
}
}
}
echo '<tr><td style="font-weight:bold;background-color:#DDDDDD">'.JText::_('HIKASHOP_SHIPPING_ADDRESS').'</td></tr><tr><td>';
if(!empty($data->override_shipping_address)) {
echo $data->override_shipping_address.'<br/></td></tr>';
} else if(!empty($data->cart->has_shipping) && !empty($data->cart->shipping_address)){
$shipping = $template;
foreach($data->order_addresses_fields as $field){
$fieldname = $field->field_namekey;
$address =& $data->order_addresses[$data->cart->shipping_address->address_id];
$shipping=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$shipping);
}
echo str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?
}?>
</table>
</td>
</tr>
<tr>
<td><?php
$fields = $fieldsClass->getFields('frontcomp',$data,'order','');
foreach($fields as $fieldName => $oneExtraField) {
echo "<br/>".$fieldsClass->trans($oneExtraField->field_realname).' : '.$fieldsClass->show($oneExtraField,$data->$fieldName);
} ?></td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<?php
JPluginHelper::importPlugin('hikashop');
$dispatcher =& JDispatcher::getInstance();
$dispatcher->trigger('onAfterOrderProductsListingDisplay', array(&$data->cart, 'email_notification_html'));
?>
<tr>
<td>
<?php
if(!$app->isAdmin()){
echo JText::_('ORDER_VALID_AFTER_PAYMENT');
$config =& hikashop_config();
if($data->cart->full_total->prices[0]->price_value_with_tax>0 && hikashop_level(1) && $config->get('allow_payment_button',1)){
global $Itemid;
$url = '';
if(!empty($Itemid)){
$url='&Itemid='.$Itemid;
}
$pay_url = hikashop_frontendLink('index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url);
if($config->get('force_ssl',0) && strpos('https://',$pay_url) === false) {
$pay_url = str_replace('http://','https://',$pay_url);
} ?>
<a href="$pay_url"><?php JText::_('PAY_NOW'); ?></a>
<?php } ?>
<br/>
<br/>
<?php echo $data->cart->payment->_payment_type;?>
<?php echo $data->cart->payment->payment_description;?>
<br/>
<br/>
<?php echo JText::sprintf('THANK_YOU_FOR_YOUR_ORDER',HIKASHOP_LIVE);
}?>
<br/>
<br/>
<?php echo JText::sprintf('BEST_REGARDS_CUSTOMER',$mail->from_name);?>
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
<tr>
<td height="10">
</td>
</tr>
</tbody>
</table>
</div>
Please Log in or Create an account to join the conversation.
14 years 1 month ago #63514
by nicolas
Replied by nicolas on topic Re: Payment methods translation + confirmation email
It should be:
<?php echo $data->cart->payment->payment_type;?>
and not:
<?php echo $data->cart->payment->_payment_type;?>
<?php echo $data->cart->payment->payment_type;?>
and not:
<?php echo $data->cart->payment->_payment_type;?>
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds