本文整理汇总了PHP中em_get_currency_formatted函数的典型用法代码示例。如果您正苦于以下问题:PHP em_get_currency_formatted函数的具体用法?PHP em_get_currency_formatted怎么用?PHP em_get_currency_formatted使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了em_get_currency_formatted函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_row
/**
* @param Object $object
* @return array()
*/
function get_row($object, $csv = false)
{
/* @var $EM_Ticket EM_Ticket */
/* @var $EM_Ticket_Booking EM_Ticket_Booking */
/* @var $EM_Booking EM_Booking */
if (get_class($object) == 'EM_Ticket_Booking') {
$EM_Ticket_Booking = $object;
$EM_Ticket = $EM_Ticket_Booking->get_ticket();
$EM_Booking = $EM_Ticket_Booking->get_booking();
} else {
$EM_Booking = $object;
}
$cols = array();
foreach ($this->cols as $col) {
//is col a user col or else?
//TODO fix urls so this works in all pages in front as well
if ($col == 'user_email') {
$cols[] = $EM_Booking->get_person()->user_email;
} elseif ($col == 'dbem_phone') {
$cols[] = $EM_Booking->get_person()->phone;
} elseif ($col == 'user_name') {
if ($csv || get_option('dbem_bookings_registration_disable') && $EM_Booking->get_person()->ID == get_option('dbem_bookings_registration_user')) {
$cols[] = $EM_Booking->get_person()->get_name();
} else {
$cols[] = '<a href="' . add_query_arg(array('person_id' => $EM_Booking->person_id, 'event_id' => null), $EM_Booking->get_event()->get_bookings_url()) . '">' . $EM_Booking->person->get_name() . '</a>';
}
} elseif ($col == 'first_name') {
$cols[] = $EM_Booking->get_person()->first_name;
} elseif ($col == 'last_name') {
$cols[] = $EM_Booking->get_person()->last_name;
} elseif ($col == 'event_name') {
if ($csv) {
$cols[] = $EM_Booking->get_event()->event_name;
} else {
$cols[] = '<a href="' . $EM_Booking->get_event()->get_bookings_url() . '">' . $this->events[$EM_Booking->event_id]->name . '</a>';
}
} elseif ($col == 'event_date') {
$cols[] = $EM_Booking->get_event()->output('#_EVENTDATES');
} elseif ($col == 'event_time') {
$cols[] = $EM_Booking->get_event()->output('#_EVENTTIMES');
} elseif ($col == 'booking_price') {
if ($this->show_tickets && !empty($EM_Ticket)) {
$cols[] = em_get_currency_formatted(apply_filters('em_bookings_table_row_booking_price_ticket', $EM_Ticket_Booking->get_price(false, false, true), $EM_Booking, true));
} else {
$cols[] = $EM_Booking->get_price(true);
}
} elseif ($col == 'booking_status') {
$cols[] = $EM_Booking->get_status(true);
} elseif ($col == 'booking_date') {
$cols[] = date_i18n(get_option('dbem_date_format') . ' ' . get_option('dbem_time_format'), $EM_Booking->timestamp);
} elseif ($col == 'actions') {
if (!$csv) {
$cols[] = implode(' | ', $this->get_booking_actions($EM_Booking));
}
} elseif ($col == 'booking_spaces') {
$cols[] = $this->show_tickets && !empty($EM_Ticket) ? $EM_Ticket_Booking->get_spaces() : $EM_Booking->get_spaces();
} elseif ($col == 'booking_id') {
$cols[] = $EM_Booking->booking_id;
} elseif ($col == 'ticket_name' && $this->show_tickets && !empty($EM_Ticket)) {
$cols[] = $EM_Ticket->{$col};
} elseif ($col == 'ticket_description' && $this->show_tickets && !empty($EM_Ticket)) {
$cols[] = $EM_Ticket->{$col};
} elseif ($col == 'ticket_price' && $this->show_tickets && !empty($EM_Ticket)) {
$cols[] = $EM_Ticket->get_price(true);
} elseif ($col == 'ticket_id' && $this->show_tickets && !empty($EM_Ticket)) {
$cols[] = $EM_Ticket->ticket_id;
} elseif ($col == 'booking_comment') {
$cols[] = $EM_Booking->booking_comment;
} else {
$val = apply_filters('em_bookings_table_rows_col_' . $col, '', $EM_Booking, $this, $csv);
$cols[] = apply_filters('em_bookings_table_rows_col', $val, $col, $EM_Booking, $this, $csv);
}
}
//clean up the cols to prevent nasty html or xss
global $allowedposttags;
foreach ($cols as $key => $col) {
$cols[$key] = wp_kses($col, $allowedposttags);
}
return $cols;
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:84,代码来源:em-bookings-table.php
示例2: get_discount_text
/**
* Puts the coupon into a text representation in terms of discount
*/
function get_discount_text()
{
$text = "";
switch ($this->coupon_type) {
case '%':
//discount by percent
$text = sprintf(__('%s Off', 'em-pro'), '%' . number_format($this->coupon_discount, 2));
break;
case '#':
//discount by price
$text = sprintf(__('%s Off', 'em-pro'), em_get_currency_formatted($this->coupon_discount));
break;
}
return $text;
}
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:18,代码来源:coupon.php
示例3: output
function output($format, $target = "html")
{
preg_match_all("/(#@?_?[A-Za-z0-9]+)({([^}]+)})?/", $format, $placeholders);
foreach ($this->get_tickets() as $EM_Ticket) {
break;
}
//Get first ticket for single ticket placeholders
$output_string = $format;
$replaces = array();
foreach ($placeholders[1] as $key => $result) {
$replace = '';
$full_result = $placeholders[0][$key];
switch ($result) {
case '#_BOOKINGID':
$replace = $this->booking_id;
break;
case '#_RESPNAME':
//Depreciated
//Depreciated
case '#_BOOKINGNAME':
$replace = $this->get_person()->get_name();
break;
case '#_RESPEMAIL':
//Depreciated
//Depreciated
case '#_BOOKINGEMAIL':
$replace = $this->get_person()->user_email;
break;
case '#_RESPPHONE':
//Depreciated
//Depreciated
case '#_BOOKINGPHONE':
$replace = $this->get_person()->phone;
break;
case '#_BOOKINGSPACES':
$replace = $this->get_spaces();
break;
case '#_BOOKINGLISTURL':
$replace = em_get_my_bookings_url();
break;
case '#_COMMENT':
//Depreciated
//Depreciated
case '#_BOOKINGCOMMENT':
$replace = $this->booking_comment;
break;
case '#_BOOKINGPRICEWITHTAX':
$replace = em_get_currency_formatted($this->get_price(false, false, true));
break;
case '#_BOOKINGPRICEWITHOUTTAX':
$replace = em_get_currency_formatted($this->get_price(false, false, false));
break;
case '#_BOOKINGPRICETAX':
$replace = em_get_currency_formatted($this->get_price(false, false, false) * (get_option('dbem_bookings_tax') / 100));
break;
case '#_BOOKINGPRICE':
$replace = em_get_currency_formatted($this->get_price());
break;
case '#_BOOKINGTICKETNAME':
$replace = $EM_Ticket->name;
break;
case '#_BOOKINGTICKETDESCRIPTION':
$replace = $EM_Ticket->description;
break;
case '#_BOOKINGTICKETPRICEWITHTAX':
$replace = em_get_currency_formatted($EM_Ticket->get_price(false, true));
break;
case '#_BOOKINGTICKETPRICEWITHOUTTAX':
$replace = em_get_currency_formatted($EM_Ticket->get_price(false, false));
break;
case '#_BOOKINGTICKETTAX':
$replace = em_get_currency_formatted($EM_Ticket->get_price(false, false) * (get_option('dbem_bookings_tax') / 100));
break;
case '#_BOOKINGTICKETPRICE':
$replace = em_get_currency_formatted($EM_Ticket->get_price());
break;
case '#_BOOKINGTICKETS':
ob_start();
em_locate_template('emails/bookingtickets.php', true, array('EM_Booking' => $this));
$replace = ob_get_clean();
break;
default:
$replace = $full_result;
break;
}
$replaces[$full_result] = apply_filters('em_booking_output_placeholder', $replace, $this, $full_result, $target);
}
//sort out replacements so that during replacements shorter placeholders don't overwrite longer varieties.
krsort($replaces);
foreach ($replaces as $full_result => $replacement) {
$output_string = str_replace($full_result, $replacement, $output_string);
}
//run event output too, since this is never run from within events and will not infinitely loop
$output_string = $this->get_event()->output($output_string, $target);
return apply_filters('em_booking_output', $output_string, $this, $format, $target);
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:96,代码来源:em-booking.php
示例4: em_bookings_single
//.........这里部分代码省略.........
?>
</tbody>
<tfoot>
<?php
do_action('em_bookings_admin_ticket_totals_header');
?>
<tr>
<th><?php
_e('Total Price', 'dbem');
?>
</th>
<th><?php
echo sprintf(__('%d Spaces', 'dbem'), $EM_Booking->get_spaces());
?>
</th>
<th><?php
echo $EM_Booking->get_price(true, true);
?>
</th>
</tr>
<?php
if (!get_option('dbem_bookings_tax_auto_add') && is_numeric(get_option('dbem_bookings_tax')) && get_option('dbem_bookings_tax') > 0) {
?>
<tr>
<th><?php
_e('Tax', 'dbem');
?>
</th>
<th><?php
echo get_option('dbem_bookings_tax');
?>
%</th>
<th><?php
echo em_get_currency_formatted($EM_Booking->get_price() * (get_option('dbem_bookings_tax') / 100), 2);
?>
</th>
</tr>
<tr>
<th><?php
_e('Total Price (inc. tax)', 'dbem');
?>
</th>
<th> </th>
<th><?php
echo $EM_Booking->get_price(false, true, true);
?>
</th>
</tr>
<?php
}
?>
<?php
do_action('em_bookings_admin_ticket_totals_footer');
?>
</tfoot>
</table>
<table class="em-form-fields" cellspacing="0" cellpadding="0">
<?php
if (!has_action('em_bookings_single_custom')) {
//default behaviour
?>
<tr>
<th><?php
_e('Comment', 'dbem');
?>
</th>
开发者ID:hscale,项目名称:webento,代码行数:67,代码来源:em-bookings.php
示例5: view_page
//.........这里部分代码省略.........
</th>
<th class='manage-column' scope='col'><?php
esc_html_e_emp('Booker', 'dbem');
?>
</th>
<th class='manage-column' scope='col'><?php
esc_html_e_emp('Spaces', 'dbem');
?>
</th>
<th><?php
_e('Original Total Price', 'em-pro');
?>
</th>
<th><?php
_e('Coupon Discount', 'em-pro');
?>
</th>
<th><?php
_e('Final Price', 'em-pro');
?>
</th>
<th> </th>
</tr>
</tfoot>
<tbody>
<?php
foreach ($EM_Bookings as $EM_Booking) {
?>
<tr>
<td><?php
echo $EM_Booking->output('#_BOOKINGSLINK');
?>
</td>
<td><a href="<?php
echo EM_ADMIN_URL;
?>
&page=events-manager-bookings&person_id=<?php
echo $EM_Booking->person_id;
?>
"><?php
echo $EM_Booking->person->get_name();
?>
</a></td>
<td><?php
echo $EM_Booking->get_spaces();
?>
</td>
<td><?php
echo em_get_currency_formatted($EM_Booking->booking_meta['original_price']);
?>
</td>
<td><?php
echo em_get_currency_formatted($EM_Booking->booking_meta['original_price'] - $EM_Booking->get_price());
?>
<em>(<?php
echo $EM_Coupon->get_discount_text();
?>
)</em></td>
<td><?php
echo em_get_currency_formatted($EM_Booking->get_price());
?>
</td>
<td>
<?php
$edit_url = em_add_get_params($_SERVER['REQUEST_URI'], array('booking_id' => $EM_Booking->booking_id, 'em_ajax' => null, 'em_obj' => null));
?>
<?php
if ($EM_Booking->can_manage()) {
?>
<a class="em-bookings-edit" href="<?php
echo $edit_url;
?>
"><?php
esc_html_e_emp('Edit/View', 'dbem');
?>
</a>
<?php
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div> <!-- table-wrap -->
<?php
} else {
?>
<p><?php
_e('Your coupon hasn\'t been used yet!', 'em-pro');
?>
</p>
<?php
}
?>
</div> <!-- wrap -->
<?php
}
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:101,代码来源:coupons-admin.php
示例6: format_price
/**
* Formats a price according to settings and currency
* @param double $price
* @return string
*/
function format_price($price)
{
return em_get_currency_formatted($price);
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:9,代码来源:em-object.php
示例7: _e
<?php
if ($has_taxes) {
?>
<tr class="em-checkout-totals-tax">
<th colspan="<?php
echo $cols;
?>
"><?php
_e('Taxes', 'em-pro');
?>
( <?php
echo $EM_Multiple_Booking->get_tax_rate();
?>
% )</th>
<td><?php
echo em_get_currency_formatted($EM_Multiple_Booking->get_price(false, false, false) * (get_option('dbem_bookings_tax') / 100));
?>
</td>
</tr>
<?php
}
?>
<?php
if ($has_discounts) {
?>
<tr class="em-checkout-totals-discount">
<th colspan="<?php
echo $cols;
?>
"><?php
_e('Discounts', 'em-pro');
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:31,代码来源:bookings-table.php
示例8: output
//.........这里部分代码省略.........
</script>
<?php
}
add_action('wp_footer', 'em_booking_js_footer');
add_action('admin_footer', 'em_booking_js_footer');
define('EM_BOOKING_JS_LOADED', true);
}
$replace = ob_get_clean();
}
break;
case '#_BOOKINGBUTTON':
if (get_option('dbem_rsvp_enabled')) {
ob_start();
$template = em_locate_template('placeholders/bookingbutton.php', true, array('EM_Event' => $this));
$replace = ob_get_clean();
}
break;
case '#_EVENTPRICERANGE':
//get the range of prices
$min = false;
$max = 0;
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
if ($EM_Ticket->get_price() > $max) {
$max = $EM_Ticket->get_price();
}
if ($EM_Ticket->get_price() < $min || $min === false) {
$min = $EM_Ticket->get_price();
}
}
if ($min === false) {
$min = 0;
}
if ($min != $max) {
$replace = em_get_currency_formatted($min) . ' - ' . em_get_currency_formatted($max);
} else {
$replace = em_get_currency_formatted($min);
}
break;
case '#_EVENTPRICEMIN':
//get the range of prices
$min = false;
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
if ($EM_Ticket->get_price() < $min || $min === false) {
$min = $EM_Ticket->get_price();
}
}
if ($min === false) {
$min = 0;
}
$replace = em_get_currency_formatted($min);
break;
case '#_EVENTPRICEMAX':
//get the range of prices
$max = 0;
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
if ($EM_Ticket->get_price() > $max) {
$max = $EM_Ticket->get_price();
}
}
$replace = em_get_currency_formatted($max);
break;
case '#_AVAILABLESEATS':
//Depreciated
//Depreciated
case '#_AVAILABLESPACES':
if ($this->event_rsvp && get_option('dbem_rsvp_enabled')) {
开发者ID:rajankz,项目名称:webspace,代码行数:67,代码来源:em-event.php
示例9: __
<div class="postbox " id="em-opt-pricing-options" >
<div class="handlediv" title="<?php
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php
echo sprintf(__('%s Options', 'dbem'), __('Pricing', 'dbem'));
?>
</span></h3>
<div class="inside">
<table class='form-table'>
<?php
/* Tax & Currency */
em_options_select(__('Currency', 'dbem'), 'dbem_bookings_currency', em_get_currencies()->names, __('Choose your currency for displaying event pricing.', 'dbem'));
em_options_input_text(__('Thousands Separator', 'dbem'), 'dbem_bookings_currency_thousands_sep', '<code>' . get_option('dbem_bookings_currency_thousands_sep') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_thousands_sep') . '</strong>000<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Decimal Point', 'dbem'), 'dbem_bookings_currency_decimal_point', '<code>' . get_option('dbem_bookings_currency_decimal_point') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Currency Format', 'dbem'), 'dbem_bookings_currency_format', __('Choose how prices are displayed. <code>@</code> will be replaced by the currency symbol, and <code>#</code> will be replaced by the number.', 'dbem') . ' <code>' . get_option('dbem_bookings_currency_format') . " = " . em_get_currency_formatted('10000000') . '</code>');
em_options_input_text(__('Tax Rate', 'dbem'), 'dbem_bookings_tax', __('Add a tax rate to your ticket prices (entering 10 will add 10% to the ticket price).', 'dbem'));
em_options_radio_binary(__('Add tax to ticket price?', 'dbem'), 'dbem_bookings_tax_auto_add', __('When displaying ticket prices and booking totals, include the tax automatically?', 'dbem'));
echo $save_button;
?>
</table>
</div> <!-- . inside -->
</div> <!-- .postbox -->
<div class="postbox " id="em-opt-booking-feedbacks" >
<div class="handlediv" title="<?php
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php
_e('Customize Feedback Messages', 'dbem');
开发者ID:pcco,项目名称:portal-redesign,代码行数:31,代码来源:bookings.php
示例10: foreach
?>
======================================
<?php
foreach ($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking) {
/* @var $EM_Ticket_Booking EM_Ticket_Booking */
echo $EM_Ticket_Booking->get_ticket()->ticket_name;
?>
Quantity: <?php
echo $EM_Ticket_Booking->get_spaces();
?>
Price: <?php
echo em_get_currency_formatted($EM_Ticket_Booking->get_price());
?>
<?php
}
?>
--------------------------------------
Spaces : <?php
echo $EM_Booking->get_spaces();
?>
Total : <?php
echo $EM_Booking->get_price(true);
?>
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:30,代码来源:bookingsummary.php
示例11: get_price
/**
* Gets the total price for this whole booking. Seting $force_reset to true will recheck spaces, even if previously done so.
* @param boolean $force_refresh
* @param boolean $format
* @param boolean $add_tax
* @return float
*/
function get_price($force_refresh = false, $format = false, $add_tax = 'x')
{
if ($force_refresh || $this->booking_price == 0 || $add_tax !== 'x' || get_option('dbem_bookings_tax_auto_add')) {
$this->booking_price = $this->get_tickets_bookings()->get_price($force_refresh, false, $add_tax);
$this->booking_price = apply_filters('em_booking_get_price', $this->booking_price, $this, $add_tax);
}
if ($format) {
return em_get_currency_formatted($this->booking_price);
}
return $this->booking_price;
}
开发者ID:rajankz,项目名称:webspace,代码行数:18,代码来源:em-booking.php
示例12: get_price
/**
* Gets the total price for this whole booking. Seting $force_reset to true will recheck spaces, even if previously done so.
* @param boolean $force_refresh
* @return float
*/
function get_price($force_refresh = false, $format = false, $add_tax = 'x')
{
if ($force_refresh || $this->ticket_booking_price == 0 || $add_tax !== 'x' || get_option('dbem_bookings_tax_auto_add')) {
//get the ticket, calculate price on spaces
$this->ticket_booking_price = round($this->get_ticket()->get_price(false, $add_tax) * $this->ticket_booking_spaces, 2);
$this->ticket_booking_price = apply_filters('em_ticket_booking_get_price', $this->ticket_booking_price, $this, $add_tax);
}
if ($format) {
return em_get_currency_formatted($this->ticket_booking_price);
}
return $this->ticket_booking_price;
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:17,代码来源:em-ticket-booking.php
示例13: get_price
/**
* Gets the total price for this whole booking by adding up subtotals of booked tickets. Seting $force_reset to true will recheck spaces, even if previously done so.
* @param boolean $force_refresh
* @return float
*/
function get_price($force_refresh = false, $format = false, $add_tax = 'x')
{
if ($force_refresh || $this->price == 0 || $add_tax !== 'x' || get_option('dbem_bookings_tax_auto_add')) {
$price = 0;
foreach ($this->tickets_bookings as $EM_Ticket_Booking) {
$price += $EM_Ticket_Booking->get_price($force_refresh, false, $add_tax);
}
$this->price = apply_filters('em_tickets_bookings_get_price', $price, $this, $add_tax);
}
if ($format) {
return em_get_currency_formatted($this->price);
}
return $this->price;
}
开发者ID:rajankz,项目名称:webspace,代码行数:19,代码来源:em-tickets-bookings.php
示例14: em_admin_options_page
//.........这里部分代码省略.........
echo sprintf(__('%s Options', 'dbem'), __('General', 'dbem'));
?>
</span></h3>
<div class="inside">
<table class='form-table'>
<?php
em_options_radio_binary(__('Allow guest bookings?', 'dbem'), 'dbem_bookings_anonymous', __('If enabled, guest visitors can supply an email address and a user account will automatically be created for them along with their booking. They will be also be able to log back in with that newly created account.', 'dbem'));
em_options_radio_binary(__('Approval Required?', 'dbem'), 'dbem_bookings_approval', __('Bookings will not be confirmed until the event administrator approves it.', 'dbem'));
em_options_radio_binary(__('Reserved unconfirmed spaces?', 'dbem'), 'dbem_bookings_approval_reserved', __('By default, event spaces become unavailable once there are enough CONFIRMED bookings. To reserve spaces even if unnapproved, choose yes.', 'dbem'));
em_options_radio_binary(__('Can users cancel their booking?', 'dbem'), 'dbem_bookings_user_cancellation', __('If enabled, users can cancel their bookings themselves from their bookings page.', 'dbem'));
em_options_radio_binary(__('Allow overbooking when approving?', 'dbem'), 'dbem_bookings_approval_overbooking', __('If you get a lot of pending bookings and you decide to allow more bookings than spaces allow, setting this to yes will allow you to override the event space limit when manually approving.', 'dbem'));
em_options_radio_binary(__('Allow double bookings?', 'dbem'), 'dbem_bookings_double', __('If enabled, users can book an event more than once.', 'dbem'));
echo $save_button;
?>
</table>
</div> <!-- . inside -->
</div> <!-- .postbox -->
<div class="postbox " >
<div class="handlediv" title="<?php
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php
echo sprintf(__('%s Options', 'dbem'), __('Pricing', 'dbem'));
?>
</span></h3>
<div class="inside">
<table class='form-table'>
<?php
/* Tax & Currency */
em_options_select(__('Currency', 'dbem'), 'dbem_bookings_currency', em_get_currencies()->names, __('Choose your currency for displaying event pricing.', 'dbem'));
em_options_input_text(__('Thousands Separator', 'dbem'), 'dbem_bookings_currency_thousands_sep', '<code>' . get_option('dbem_bookings_currency_thousands_sep') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_thousands_sep') . '</strong>000<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Decimal Point', 'dbem'), 'dbem_bookings_currency_decimal_point', '<code>' . get_option('dbem_bookings_currency_decimal_point') . " = " . em_get_currency_symbol() . '100<strong>' . get_option('dbem_bookings_currency_decimal_point') . '</strong>00</code>');
em_options_input_text(__('Currency Format', 'dbem'), 'dbem_bookings_currency_format', __('Choose how prices are displayed. <code>@</code> will be replaced by the currency symbol, and <code>#</code> will be replaced by the number.', 'dbem') . ' <code>' . get_option('dbem_bookings_currency_format') . " = " . em_get_currency_formatted('10000000') . '</code>');
em_options_input_text(__('Tax Rate', 'dbem'), 'dbem_bookings_tax', __('Add a tax rate to your ticket prices (entering 10 will add 10% to the ticket price).', 'dbem'));
em_options_radio_binary(__('Add tax to ticket price?', 'dbem'), 'dbem_bookings_tax_auto_add', __('When displaying ticket prices and booking totals, include the tax automatically?', 'dbem'));
echo $save_button;
?>
</table>
</div> <!-- . inside -->
</div> <!-- .postbox -->
<div class="postbox " >
<div class="handlediv" title="<?php
__('Click to toggle', 'dbem');
?>
"><br /></div><h3><span><?php
_e('Customize Feedback Messages', 'dbem');
?>
</span></h3>
<div class="inside">
<p><?php
_e('Below you will find texts that will be displayed to users in various areas during the bookings process, particularly on booking forms.', 'dbem');
?>
</p>
<table class='form-table'>
<tr><td colspan='2'><h4><?php
_e('My Bookings messages', 'dbem');
?>
</h4></td></tr>
<?php
em_options_input_text(__('Booking Cancelled', 'dbem'), 'dbem_booking_feedback_cancelled', __('When a user cancels their booking, this message will be displayed confirming the cancellation.', 'dbem'));
em_options_input_text(__('Booking Cancellation Warning', 'dbem'), 'dbem_booking_warning_cancel', __('When a user chooses to cancel a booking, this warning is displayed for them to confirm.', 'dbem'));
?>
<tr><td colspan='2'><h4><?php
_e('Booking form texts/messages', 'dbem');
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:67,代码来源:em-options.php
示例15: get_price
/**
* Gets the total price for this ticket.
* @return float
*/
function get_price($format = false, $add_tax = 'x')
{
$price = $this->ticket_price;
if (is_numeric(get_option('dbem_bookings_tax')) && get_option('dbem_bookings_tax') > 0) {
//tax could be added here
if ($add_tax === true || $add_tax !== false && get_option('dbem_bookings_tax_auto_add')) {
$price = round($price * (1 + get_option('dbem_bookings_tax') / 100), 2);
}
}
$price = apply_filters('em_ticket_get_price', $price, $this);
if ($format) {
return em_get_currency_formatted($price);
}
return $price;
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:19,代码来源:em-ticket.php
示例16: output
//.........这里部分代码省略.........
break;
case '#_BOOKINGBUTTON':
if (get_option('dbem_rsvp_enabled') && $this->event_rsvp) {
ob_start();
$template = em_locate_template('placeholders/bookingbutton.php', true, array('EM_Event' => $this));
$replace = ob_get_clean();
}
break;
case '#_EVENTPRICERANGEALL':
$show_all_ticket_prices = true;
//continues below
//continues below
case '#_EVENTPRICERANGE':
//get the range of prices
$min = false;
$max = 0;
if ($this->get_bookings()->is_open() || !empty($show_all_ticket_prices)) {
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
/* @var $EM_Ticket EM_Ticket */
if ($EM_Ticket->is_available() || get_option('dbem_bookings_tickets_show_unavailable') || !empty($show_all_ticket_prices)) {
if ($EM_Ticket->get_price() > $max) {
$max = $EM_Ticket->get_price();
}
if ($EM_Ticket->get_price() < $min || $min === false) {
$min = $EM_Ticket->get_price();
}
}
}
}
if ($min === false) {
$min = 0;
}
if ($min != $max) {
$replace = em_get_currency_formatted($min) . ' - ' . em_get_currency_formatted($max);
} else {
$replace = em_get_currency_formatted($min);
}
break;
case '#_EVENTPRICEMIN':
//get the range of prices
$min = false;
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
/* @var $EM_Ticket EM_Ticket */
if ($EM_Ticket->is_available() || get_option('dbem_bookings_tickets_show_unavailable')) {
if ($EM_Ticket->get_price() < $min || $min === false) {
$min = $EM_Ticket->get_price();
}
}
}
if ($min === false) {
$min = 0;
}
$replace = em_get_currency_formatted($min);
break;
case '#_EVENTPRICEMAX':
//get the range of prices
$max = 0;
foreach ($this->get_tickets()->tickets as $EM_Ticket) {
/* @var $EM_Ticket EM_Ticket */
if ($EM_Ticket->is_available() || get_option('dbem_bookings_tickets_show_unavailable')) {
if ($EM_Ticket->get_price() > $max) {
$max = $EM_Ticket->get_price();
}
}
}
$replace = em_get_currency_formatted($max);
开发者ID:javipaur,项目名称:TiendaVirtual,代码行数:67,代码来源:em-event.php
示例17: get_discount_text
/**
* Puts the coupon into a text representation in terms of discount
*/
function get_discount_text()
{
$text = "";
switch ($this->coupon_type) {
case '%':
//discount by percent
$text = sprintf(__('%s Off', 'em-pro'), number_format($this->coupon_discount, 0) . '%');
break;
case '#':
//discount by price
$text = sprintf(__('%s Off', 'em-pro'), em_get_currency_formatted($this->coupon_discount));
break;
}
return apply_filters('em_coupon_get_discount_text', $text, $this);
}
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:18,代码来源:coupon.php
注:本文中的em_get_currency_formatted函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论