From 56e5b673ee40a00961b32178af1bdd53ce6b8836 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Tue, 2 Mar 2021 12:27:25 +0000 Subject: [PATCH] v 3.4.6 --- inc/mep_extra_price.php | 19 +++++++------- inc/mep_functions.php | 35 ++++++++++++++----------- inc/template-prts/event_add_cart.php | 12 +++++++++ js/mp_event_custom_script.js | 26 ++++++++++++++++++ readme.txt | 7 ++++- templates/single/extra_service_list.php | 3 ++- templates/single/ticket_type_list.php | 6 +++-- woocommerce-event-press.php | 2 +- 8 files changed, 80 insertions(+), 30 deletions(-) diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index 427dc16..c9c4cc9 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -126,15 +126,15 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item) } } if (is_array($user_info) && sizeof($user_info) > 0) { - echo '
  • '; - echo mep_cart_display_user_list($user_info,$eid); - echo '
  • '; + echo '
  • '; + echo mep_cart_display_user_list($user_info,$eid); + echo '
  • '; } - } else { + } else { if (is_array($user_info) && sizeof($user_info) > 0) { - echo '
  • '; - echo mep_cart_display_user_list($user_info,$eid); - echo '
  • '; + echo '
  • '; + echo mep_cart_display_user_list($user_info,$eid); + echo '
  • '; } else { if($hide_date_status == 'no'){ ?> @@ -148,9 +148,8 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
  • :
  • 0) { - // echo $eid; - echo mep_cart_display_ticket_type_list($ticket_type_arr, $eid); + if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) { + echo mep_cart_display_ticket_type_list($ticket_type_arr, $eid); } if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) { foreach ($event_extra_service as $extra_service) { diff --git a/inc/mep_functions.php b/inc/mep_functions.php index 88e59e2..e13751d 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -2424,11 +2424,7 @@ if (!function_exists('get_event_list_js')) { }); jQuery('#rowtotal_').val(total); - total = total.toFixed(2); - let total_part=total.toString().split("."); - total_part[0] = total_part[0].replace(/\B(?=(\d{3})+(?!\d))/g, ""); - total=total_part.join(""); - jQuery('#usertotal_').html("" + total + ""); + jQuery('#usertotal_').html(mp_event_wo_commerce_price_format(total)); }).change(); //trigger change event on page load @@ -3102,15 +3098,7 @@ function mep_single_page_js_script($event_id){ }); //Fix 27.10.2020 Tony jQuery('#rowtotal').val(total); - total = total.toFixed(2); - let total_part=total.toString().split("."); - total_part[0] = total_part[0].replace(/\B(?=(\d{3})+(?!\d))/g, ""); - total=total_part.join(""); - jQuery('#usertotal').html("" + total + ""); + jQuery('#usertotal').html(mp_event_wo_commerce_price_format(total)); }).change(); //trigger change event on page load " /> + + + + + + @@ -3667,4 +3661,15 @@ function mep_default_sidebar_reg() { 'after_title' => '', ) ); } -add_action( 'widgets_init', 'mep_default_sidebar_reg' ); \ No newline at end of file +add_action( 'widgets_init', 'mep_default_sidebar_reg' ); + + +// add_action('mep_after_social_share_list','mep_custom_share_btn'); +// function mep_custom_share_btn($event_id){ +// ?> + + + + + " /> + + + + + +
    @@ -285,6 +291,12 @@ if (!function_exists('mep_get_event_reg_btn_list')) { do_action('mep_event_extra_service_list'); ?> " /> + + + + + +
    diff --git a/js/mp_event_custom_script.js b/js/mp_event_custom_script.js index b14050f..38a58e6 100644 --- a/js/mp_event_custom_script.js +++ b/js/mp_event_custom_script.js @@ -1,3 +1,29 @@ +function mp_event_wo_commerce_price_format(price) { + let currency_position = jQuery('input[name="currency_position"]').val(); + let currency_symbol = jQuery('input[name="currency_symbol"]').val(); + let currency_decimal = jQuery('input[name="currency_decimal"]').val(); + let currency_thousands_separator = jQuery('input[name="currency_thousands_separator"]').val(); + let currency_number_of_decimal = jQuery('input[name="currency_number_of_decimal"]').val(); + let price_text = ''; + + price = price.toFixed(currency_number_of_decimal); +console.log('price= '+ price); + let total_part = price.toString().split("."); + total_part[0] = total_part[0].replace(/\B(?=(\d{3})+(?!\d))/g, currency_thousands_separator); + price = total_part.join(currency_decimal); + + if (currency_position === 'right') { + price_text = price + currency_symbol; + } else if (currency_position === 'right_space') { + price_text = price + ' ' + currency_symbol; + } else if (currency_position === 'left') { + price_text = currency_symbol + price; + } else { + price_text = currency_symbol + ' ' + price; + } + console.log('price= '+ price_text); + return price_text; +} (function ($) { //added by sumon $(document).on('click', '.mp_event_visible_event_time', function (e) { diff --git a/readme.txt b/readme.txt index 02f6b62..e27b70a 100644 --- a/readme.txt +++ b/readme.txt @@ -713,4 +713,9 @@ Member Role wise event feature added Early bird feature added in ticket type Bug fixed Hook added -25 Feb 2021* \ No newline at end of file +25 Feb 2021* + += 3.4.6= +* Update Release: +Total Price 0 issue fixed +02 March 2021* \ No newline at end of file diff --git a/templates/single/extra_service_list.php b/templates/single/extra_service_list.php index c7135e5..fa66212 100644 --- a/templates/single/extra_service_list.php +++ b/templates/single/extra_service_list.php @@ -13,6 +13,7 @@ $total_sold = (int) mep_extra_service_sold($post_id, $field['option_name'], $event_date); $ext_left = ($total_extra_service - $total_sold); + $tic_price=mep_get_price_including_tax($post_id, $field['option_price']); $actual_price=strip_tags(wc_price(mep_get_price_including_tax($post_id, $field['option_price']))); $data_price=str_replace(get_woocommerce_currency_symbol(), '', $actual_price); $data_price=str_replace(wc_get_price_thousand_separator(), '', $data_price); @@ -49,7 +50,7 @@ diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php index bb9c7a6..f823e37 100644 --- a/woocommerce-event-press.php +++ b/woocommerce-event-press.php @@ -3,7 +3,7 @@ * Plugin Name: Woocommerce Events Manager * Plugin URI: http://mage-people.com * Description: A Complete Event Solution for WordPress by MagePeople.. - * Version: 3.4.5 + * Version: 3.4.6 * Author: MagePeople Team * Author URI: http://www.mage-people.com/ * Text Domain: mage-eventpress
    0) { ?> - + '> '> diff --git a/templates/single/ticket_type_list.php b/templates/single/ticket_type_list.php index d74f96c..717d3ef 100644 --- a/templates/single/ticket_type_list.php +++ b/templates/single/ticket_type_list.php @@ -11,7 +11,9 @@ 0) { ?> - +