Created
June 27, 2014 11:28
-
-
Save joomdonation/b3e42834a67df2e17f3b to your computer and use it in GitHub Desktop.
Email template to display amount and content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @version 1.6.4 | |
| * @package Joomla | |
| * @subpackage Membership Pro | |
| * @author Tuan Pham Ngoc | |
| * @copyright Copyright (C) 2012 - 2014 Ossolution Team | |
| * @license GNU/GPL, see LICENSE.php | |
| */ | |
| // Check to ensure this file is included in Joomla! | |
| defined('_JEXEC') or die ; | |
| ?> | |
| <table class="os_table" width="100%"> | |
| <tr> | |
| <td class="title_cell" width="35%"> | |
| <?php echo JText::_('OSM_PLAN') ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $planTitle;?> | |
| </td> | |
| </tr> | |
| <?php | |
| if (isset($username)) { | |
| ?> | |
| <tr> | |
| <td class="title_cell" width="35%"> | |
| <?php echo JText::_('OSM_USERNAME') ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $username; ?> | |
| </td> | |
| </tr> | |
| <?php | |
| } | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_SUBSCRIPTION_START_DATE'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo JHtml::_('date', $row->from_date, $config->date_format, null); ?> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_SUBSCRIPTION_END_DATE'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php | |
| if ($lifetimeMembership) | |
| { | |
| echo JText::_('OSM_LIFETIME'); | |
| } | |
| else | |
| { | |
| echo JHtml::_('date', $row->to_date, $config->date_format, null); | |
| } | |
| ?> | |
| </td> | |
| </tr> | |
| <?php | |
| $fields = $form->getFields(); | |
| foreach ($fields as $field) | |
| { | |
| switch (strtolower($field->type)) | |
| { | |
| case 'heading' : | |
| ?> | |
| <tr> | |
| <td colspan="2"><h3 class="osm-heading"><?php echo JText::_($field->title) ; ?></h3></td> | |
| </tr> | |
| <?php | |
| break ; | |
| case 'message' : | |
| ?> | |
| <tr> | |
| <td colspan="2"> | |
| <p class="osm-message"><?php echo $field->description ; ?></p> | |
| </td> | |
| </tr> | |
| <?php | |
| break ; | |
| default: | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_($field->title); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $field->value; ?> | |
| </td> | |
| </tr> | |
| <?php | |
| break; | |
| } | |
| } | |
| if (isset($couponCode)) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_COUPON'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $couponCode; ?> | |
| </td> | |
| </tr> | |
| <?php | |
| } | |
| if ($row->amount > 0) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_NET_AMOUNT'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo OSMembershipHelper::formatCurrency($row->amount, $config); ?> | |
| </td> | |
| </tr> | |
| <?php | |
| if ($row->discount_amount > 0) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_DISCOUNT_AMOUNT'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo OSMembershipHelper::formatCurrency($row->discount_amount, $config); ?> | |
| </td> | |
| </tr> | |
| <?php | |
| } | |
| if ($row->tax_amount > 0) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_TAX_AMOUNT'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo OSMembershipHelper::formatCurrency($row->tax_amount, $config); ?> | |
| </td> | |
| </tr> | |
| <?php | |
| } | |
| if ($row->tax_amount > 0 || $row->gross_amount > 0) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_GROSS_AMOUNT'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo OSMembershipHelper::formatCurrency($row->gross_amount, $config); ?> | |
| </div> | |
| </tr> | |
| <?php | |
| } | |
| } | |
| if ($row->gross_amount > 0) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_PAYMENT_OPTION'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php | |
| $method = os_payments::loadPaymentMethod($row->payment_method) ; | |
| if ($method) | |
| { | |
| echo JText::_($method->title); | |
| } | |
| ?> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_TRANSACTION_ID'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $row->transaction_id ; ?> | |
| </td> | |
| </tr> | |
| <?php | |
| if ($toAdmin && ($row->payment_method == 'os_creditcard')) | |
| { | |
| ?> | |
| <tr> | |
| <td class="title_cell"> | |
| <?php echo JText::_('OSM_LAST_4DIGITS'); ?> | |
| </td> | |
| <td class="field_cell"> | |
| <?php echo $last4Digits; ?> | |
| </td> | |
| </tr> | |
| <?php | |
| } | |
| } | |
| ?> | |
| </table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment