calculation issue fixed

This commit is contained in:
magepeopleteam 2020-12-30 05:23:11 +00:00
parent 128ae36a60
commit 73c02171f6
5 changed files with 47 additions and 22 deletions

View File

@ -467,4 +467,9 @@ label.mp_event_virtual_type_des textarea{width:100%;}
}
.wrap.mage_settings_panel_wrap .notice.notice-warning {
display: none;
}
.mep_rich_text_status_section {
display: block;
text-align: center;
padding: 15px;
}

View File

@ -696,8 +696,18 @@ class MP_Event_All_Info_In_One
$event_rt_status = get_post_meta($post_id, 'mep_rt_event_status', true) ? get_post_meta($post_id, 'mep_rt_event_status', true) : '';
$event_rt_atdnce_mode = get_post_meta($post_id, 'mep_rt_event_attandence_mode', true) ? get_post_meta($post_id, 'mep_rt_event_attandence_mode', true) : '';
$event_rt_prv_date = get_post_meta($post_id, 'mep_rt_event_prvdate', true) ? get_post_meta($post_id, 'mep_rt_event_prvdate', true) : $event_start_date;
$rt_status = get_post_meta($post_id, 'mep_rich_text_status', true) ? get_post_meta($post_id, 'mep_rich_text_status', true) : 'enable';
?>
<table>
<div class='mep_rich_text_status_section'>
<label for='mep_rich_text_status'>
<?php _e('Rich Text Status','mage-eventpress'); ?>
<select id='mep_rich_text_status' name='mep_rich_text_status'>
<option value='enable' <?php if($rt_status == 'enable'){ echo 'Selected'; } ?>><?php _e('Enable','mage-eventpress'); ?></option>
<option value='disable' <?php if($rt_status == 'disable'){ echo 'Selected'; } ?>><?php _e('Disable','mage-eventpress'); ?></option>
</select>
</label>
</div>
<table id='mep_rich_text_table' <?php if($rt_status == 'disable'){ ?> style='display:none;' <?php } ?>>
<tr>
<th><span><?php _e('Type :', 'mage-eventpress'); ?></span></th>
<td colspan="3"><?php _e('Event', 'mage-eventpress'); ?></td>
@ -761,6 +771,22 @@ class MP_Event_All_Info_In_One
</td>
</tr>
</table>
<script>
jQuery('[name="mep_rich_text_status"]').change(function() {
var rich_status = jQuery(this).val() ? jQuery(this).val() : 'enable';
if(rich_status == 'enable'){
// mep_rich_text_table
jQuery('#mep_rich_text_table').show(500);
}
else if(rich_status == 'disable'){
jQuery('#mep_rich_text_table').hide(500);
}
});
</script>
<?php
}
@ -1192,11 +1218,13 @@ function mep_event_meta_save($post_id)
$mep_available_seat = isset($_POST['mep_available_seat']) ? strip_tags($_POST['mep_available_seat']) : 'off';
$_tax_status = isset($_POST['_tax_status']) ? strip_tags($_POST['_tax_status']) : 'none';
$_tax_class = isset($_POST['_tax_class']) ? strip_tags($_POST['_tax_class']) : '';
$mep_rich_text_status = isset($_POST['mep_rich_text_status']) ? strip_tags($_POST['mep_rich_text_status']) : 'enable';
if ($mep_reset_status == 'on') {
mep_reset_event_booking($post_id);
}
update_post_meta($post_id, 'mep_rich_text_status', $mep_rich_text_status);
update_post_meta($post_id, 'mep_available_seat', $mep_available_seat);
update_post_meta($post_id, 'mep_reg_status', $mep_reg_status);
update_post_meta($post_id, '_tax_status', $_tax_status);

View File

@ -2585,8 +2585,7 @@ function mep_event_recurring_date_list_in_event_list_loop($event_id){
do_action('mep_event_everyday_date_list_display',$event_id);
}else{
foreach ($more_date as $_more_date) {
if (strtotime(current_time('Y-m-d H:i')) < strtotime($_more_date['event_more_start_date'] . ' ' . $_more_date['event_more_start_time'])) {
if (strtotime(current_time('Y-m-d H:i')) < strtotime($_more_date['event_more_start_date'] . ' ' . $_more_date['event_more_start_time'])) {
?>
<li>
<span class='mep-more-date'>
@ -2605,16 +2604,6 @@ function mep_event_recurring_date_list_in_event_list_loop($event_id){
}
}
}
echo '</ul>';
?>
<?php if($show_multidate == 'yes'){ ?>
@ -2651,14 +2640,16 @@ function mep_event_rich_text_data(){
$event_id = $post->ID;
if($event_id && get_post_type($event_id) == 'mep_events'){
$event_name = get_the_title($event_id);
$event_start_date = get_post_meta($post->ID,'event_start_datetime',true) ? get_post_meta($post->ID,'event_start_datetime',true) : '';
$event_end_date = get_post_meta($post->ID,'event_end_datetime',true) ? get_post_meta($post->ID,'event_end_datetime',true) : '';
$event_rt_status = get_post_meta($post->ID,'mep_rt_event_status',true) ? get_post_meta($post->ID,'mep_rt_event_status',true) : 'EventRescheduled';
$event_name = get_the_title($event_id);
$event_start_date = get_post_meta($post->ID,'event_start_datetime',true) ? get_post_meta($post->ID,'event_start_datetime',true) : '';
$event_end_date = get_post_meta($post->ID,'event_end_datetime',true) ? get_post_meta($post->ID,'event_end_datetime',true) : '';
$event_rt_status = get_post_meta($post->ID,'mep_rt_event_status',true) ? get_post_meta($post->ID,'mep_rt_event_status',true) : 'EventRescheduled';
$event_rt_atdnce_mode = get_post_meta($post->ID,'mep_rt_event_attandence_mode',true) ? get_post_meta($post->ID,'mep_rt_event_attandence_mode',true) : 'OfflineEventAttendanceMode';
$event_rt_prv_date = get_post_meta($post->ID,'mep_rt_event_prvdate',true) ? get_post_meta($post->ID,'mep_rt_event_prvdate',true) : $event_start_date;
$terms = get_the_terms( $event_id, 'mep_org' );
$org_name = is_array($terms) && sizeof($terms) > 0 ? $terms[0]->name : 'No Performer';
$event_rt_prv_date = get_post_meta($post->ID,'mep_rt_event_prvdate',true) ? get_post_meta($post->ID,'mep_rt_event_prvdate',true) : $event_start_date;
$terms = get_the_terms( $event_id, 'mep_org' );
$org_name = is_array($terms) && sizeof($terms) > 0 ? $terms[0]->name : 'No Performer';
$rt_status = get_post_meta($event_id, 'mep_rich_text_status', true) ? get_post_meta($event_id, 'mep_rich_text_status', true) : 'enable';
if($rt_status == 'enable'){
ob_start();
?>
@ -2697,6 +2688,7 @@ if($event_id && get_post_type($event_id) == 'mep_events'){
<?php
echo $content = ob_get_clean();
}
}
}
}

View File

@ -15,7 +15,7 @@
$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=(int)str_replace(wc_get_price_thousand_separator(), '', $data_price);
$data_price=str_replace(wc_get_price_thousand_separator(), '', $data_price);
?>
<tr>
<td align="Left"><?php echo $field['option_name']; ?>

View File

@ -13,7 +13,7 @@
<?php
$actual_price=strip_tags(wc_price(mep_get_price_including_tax($post_id,$ticket_price)));
$data_price=str_replace(get_woocommerce_currency_symbol(), '', $actual_price);
$data_price=(int)str_replace(wc_get_price_thousand_separator(), '', $data_price);
$data_price=str_replace(wc_get_price_thousand_separator(), '', $data_price);
if ($total_left > 0) {
if ($qty_t_type == 'dropdown') { ?>
<select name="option_qty[]" id="eventpxtp_<?php echo $count; ?>" <?php if ($total_left <= 0) { ?> style='display: none!important;' <?php } ?> class='extra-qty-box etp'>