version 3.1.5

This commit is contained in:
magepeopleteam 2020-03-18 12:54:23 +00:00
parent 6d572a4cb5
commit 32cfd319a1
19 changed files with 684 additions and 149 deletions

View File

@ -47,9 +47,7 @@ button.single_add_to_cart_button,
.mep-events-wrapper .mage_input_group{display: -webkit-flex;display: flex;}
.mep-default-content div.mep-default-feature-date-location>div,
.mep_spring_date>div,
.bristol_divided>div,
.mep_event_list_sec>div,
div.mep_event_list div.mage_grid_box>div{-webkit-flex: 1;flex: 1;}
.bristol_divided>div{-webkit-flex: 1;flex: 1;}
.mep-default-theme div.mep-default-feature-date,
.mep-default-theme div.mep-default-feature-time,
.mep-default-theme div.mep-default-feature-location,
@ -370,6 +368,12 @@ div.mep-default-feature-content p {
margin: 15px 0;
line-height: 20px;
}
.mep-events-wrapper p:not(.mep-events-wrapper .mep-default-feature-content p){
line-height: 1.2;
margin: 0;
padding: 0;
letter-spacing: inherit;
}
/******Responsive*******/
@media only screen and (max-width: 1199px) {
@ -498,4 +502,19 @@ div.mep-default-feature-content p {
div.bristol_center_box{display: block;border: 1px solid #ddd;}
.bristol .mep-default-sidrbar-calender-btn{margin: 0;padding: 20px 0;border-top: 1px solid #ddd;}
.bristol ul#mep_add_calender_links{width: 200px;}
}
div.mep_event_list div.mage_grid_box{-webkit-flex-wrap: wrap;flex-wrap: wrap;}
div.one_column{width:100%;margin: 0 0 15px 0;}
div.two_column{width:calc(50% - 15px);margin: 0 15px 15px 0;}
div.three_column{width:calc(33.33% - 15px);margin: 0 15px 15px 0;}
div.four_column{width:calc(25% - 15px);margin: 0 15px 15px 0;}
@media only screen and (max-width: 800px) {
div.two_column{width:calc(50% - 15px);margin: 0 15px 15px 0;}
div.three_column{width:calc(50% - 15px);margin: 0 15px 15px 0;}
div.four_column{width:calc(50% - 15px);margin: 0 15px 15px 0;}
}
@media only screen and (max-width: 500px) {
div.two_column,
div.three_column,
div.four_column{width:100%;margin: 0 0 15px 0;}
}

View File

@ -96,6 +96,7 @@ class MAGE_Events_Setting_Controls {
'default' => 'no',
'options' => mep_event_template_name()
),
array(
'name' => 'mep_event_price_show',
'label' => __( 'Show Event Price in List?', 'mage-eventpress' ),
@ -106,7 +107,21 @@ class MAGE_Events_Setting_Controls {
'yes' => 'Yes',
'no' => 'No'
)
),
),
array(
'name' => 'mep_event_product_type',
'label' => __( 'Enable Shipping Method on event?', 'mage-eventpress' ),
'desc' => __( 'Please Select The event product type which is using in WooCommerce, By default its virtual. If you change this type you need to re-save all the event again.', 'mage-eventpress' ),
'type' => 'select',
'default' => 'yes',
'options' => array(
'yes' => 'No',
'no' => 'Yes'
)
),
// array(
// 'name' => 'mep_event_slug',
// 'label' => __( 'Event Slug', 'mage-eventpress' ),
@ -114,6 +129,7 @@ class MAGE_Events_Setting_Controls {
// 'type' => 'text',
// 'default' => 'events'
// ),
array(
'name' => 'event-price-label',
'label' => __( 'Event Price Label', 'mage-eventpress' ),

View File

@ -65,6 +65,7 @@ function mep_addon_list_sec(){
<?php
$json = file_get_contents('http://vaincode.com/update/addon-list.json');
$obj = json_decode($json, true);
if(is_array($obj) && sizeof($obj) > 0){
echo '<div class="addon_list_sec"><ul class="mep_addon_list">';
foreach ($obj as $list) {
echo '<li>';
@ -76,4 +77,5 @@ echo '<li>';
echo '</li>';
}
echo '</ul></div>';
}
}

View File

@ -50,7 +50,7 @@ function mep_event_reset_booking_count($post){
wp_nonce_field( 'mep_event_reset_btn_nonce', 'mep_event_reset_btn_nonce' );
?>
<div class='sec'>
<h6><? _e('Current Status','mage-eventpress'); echo mep_get_event_total_seat($post->ID); ?></h6>
<h6><?php _e('Current Status','mage-eventpress'); echo mep_get_event_total_seat($post->ID); ?></h6>
<p style="color: red;"><?php _e('If you reset this count, All booking information will be removed including attendee list & its impossible to undo','mage-eventpress'); ?></p>
<label for="mep_ev_20988999"> <?php _e('Reset Booking Count :','mage-eventpress'); ?>
<label class="switch">

View File

@ -40,27 +40,45 @@ function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id,
$price = $_POST['option_price'];
}else{ $price=""; }
if($recurring == 'yes'){
$recurring_event_date = isset($_POST['recurring_event_date']) ? $_POST['recurring_event_date'] : array();
}else{
$recurring_event_date = array();
}
$count = count( $names );
if(isset($_POST['option_name'])){
for ( $i = 0; $i < $count; $i++ ) {
if($qty[$i] > 0){
if ( $names[$i] != '' ) :
$new[$i]['option_name'] = stripslashes( strip_tags( $names[$i] ) );
$ticket_type_arr[$i]['ticket_name'] = stripslashes( strip_tags( $names[$i] ) );
endif;
if ( $price[$i] != '' ) :
$new[$i]['option_price'] = stripslashes( strip_tags( $price[$i] ) );
$ticket_type_arr[$i]['ticket_price'] = stripslashes( strip_tags( $price[$i] ) );
endif;
if ( $qty[$i] != '' ) :
$new[$i]['option_qty'] = stripslashes( strip_tags( $qty[$i] ) );
$ticket_type_arr[$i]['ticket_qty'] = stripslashes( strip_tags( $qty[$i] ) );
endif;
if ( $max_qty[$i] != '' ) :
$new[$i]['max_qty'] = stripslashes( strip_tags( $max_qty[$i] ) );
$ticket_type_arr[$i]['max_qty'] = stripslashes( strip_tags( $max_qty[$i] ) );
endif;
if ( $mep_event_start_date[$i] != '' ) :
$ticket_type_arr[$i]['event_date'] = stripslashes( strip_tags( $mep_event_start_date[$i] ) );
endif;
$opttprice = ($price[$i]*$qty[$i]);
$tp = ($tp+$opttprice);
$opttprice = ($price[$i]*$qty[$i]);
$tp = ($tp+$opttprice);
}
}
}
@ -117,43 +135,40 @@ if(isset($_POST['mep_event_ticket_type'])){
}
$mep_event_ticket_type = get_post_meta($product_id, 'mep_event_ticket_type', true) ? get_post_meta($product_id, 'mep_event_ticket_type', true) : array();
$cnt = 0;
$vald = 0;
$ticket_type_arr = array();
// $ticket_type_arr = array();
if(is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0){
foreach($mep_event_ticket_type as $_type){
// foreach($mep_event_ticket_type as $_type){
$cart_arr = $new[$cnt];
$name_key = array_search($_type['option_name_t'],$cart_arr);
$qty_key = array_search($_type['option_qty_t'],$cart_arr);
// $cart_arr = $new[$cnt];
// $name_key = array_search($_type['option_name_t'],$cart_arr);
// $qty_key = array_search($_type['option_qty_t'],$cart_arr);
if(is_array($name_key)){
$total_found = count($name_key);
}else{
$total_found = 0;
}
if($cart_arr['option_qty'] > 0){
// if(is_array($name_key)){
// $total_found = count($name_key);
// }else{
// $total_found = 0;
// }
// if($cart_arr['option_qty'] > 0){
$ticket_type_arr[$cnt]['ticket_name'] = stripslashes( strip_tags( $cart_arr[$name_key] ) );
$ticket_type_arr[$cnt]['ticket_qty'] = stripslashes( strip_tags( $cart_arr['option_qty'] ) );
$ticket_type_arr[$cnt]['ticket_price'] = stripslashes( strip_tags( $cart_arr['option_price'] ) );
$ticket_type_arr[$cnt]['event_date'] = stripslashes( strip_tags( $mep_event_start_date ) );
$validate[$cnt]['ticket_qty'] = $vald + stripslashes( strip_tags( $cart_arr['option_qty'] ) );
$validate[$cnt]['event_id'] = stripslashes( strip_tags( $product_id ) );
}
// $ticket_type_arr[$cnt]['ticket_name'] = stripslashes( strip_tags( $cart_arr[$name_key] ) );
// $ticket_type_arr[$cnt]['ticket_qty'] = stripslashes( strip_tags( $cart_arr['option_qty'] ) );
// $ticket_type_arr[$cnt]['ticket_price'] = stripslashes( strip_tags( $cart_arr['option_price'] ) );
// $ticket_type_arr[$cnt]['event_date'] = stripslashes( strip_tags( $cart_arr['event_data'] ) );
// $validate[$cnt]['ticket_qty'] = $vald + stripslashes( strip_tags( $cart_arr['option_qty'] ) );
// $validate[$cnt]['event_id'] = stripslashes( strip_tags( $product_id ) );
// }
$cnt++;
}
}
if($recurring == 'yes'){
$recurring_event_date = isset($_POST['recurring_event_date']) ? $_POST['recurring_event_date'] : array();
}else{
$recurring_event_date = array();
// $cnt++;
// }
}
// print_r($ticket_type_arr);
// die();
$cart_item_data['event_ticket_info'] = $ticket_type_arr;
@ -207,10 +222,10 @@ if (get_post_type($eid) == 'mep_events') {
$user_info = $cart_item['event_user_info'];
$ticket_type_arr = $cart_item['event_ticket_info'];
$event_extra_service = $cart_item['event_extra_service'];
$event_recurring_date = $cart_item['event_recurring_date'];
$event_recurring_date = $cart_item['event_recurring_date'];
// echo '<pre>';
// print_r($user_info);
// print_r($ticket_type_arr);
@ -219,13 +234,43 @@ if (get_post_type($eid) == 'mep_events') {
echo "<ul class='event-custom-price'>";
if($recurring == 'yes'){
if(is_array($event_recurring_date) && sizeof($event_recurring_date) > 0){
foreach($event_recurring_date as $_event_recurring_date){
if(is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0 && sizeof($user_info) == 0){
foreach($ticket_type_arr as $_event_recurring_date){
?>
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date, 'date-time-text'); //date('D, d M Y H:i:s',strtotime($_event_recurring_date)); ?></li>
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'); //date('D, d M Y H:i:s',strtotime($_event_recurring_date)); ?></li>
<?php
}
}
if(is_array($user_info) && sizeof($user_info) > 0){
echo '<li>';
foreach($user_info as $userinf){
?>
<ul>
<?php if($userinf['user_name']){ ?> <li><?php _e('Name: ','mage-eventpress'); echo $userinf['user_name']; ?></li> <?php } ?>
<?php if($userinf['user_email']){ ?> <li><?php _e('Email: ','mage-eventpress'); echo $userinf['user_email']; ?></li> <?php } ?>
<?php if($userinf['user_phone']){ ?> <li><?php _e('Phone: ','mage-eventpress'); echo $userinf['user_phone']; ?></li> <?php } ?>
<?php if($userinf['user_address']){ ?> <li><?php _e('Address: ','mage-eventpress'); echo $userinf['user_address']; ?></li> <?php } ?>
<?php if($userinf['user_gender']){ ?> <li><?php _e('Gender: ','mage-eventpress'); echo $userinf['user_gender']; ?></li> <?php } ?>
<?php if($userinf['user_tshirtsize']){ ?> <li><?php _e('T-Shirt Size: ','mage-eventpress'); echo $userinf['user_tshirtsize']; ?></li> <?php } ?>
<?php if($userinf['user_company']){ ?> <li><?php _e('Company: ','mage-eventpress'); echo $userinf['user_company']; ?></li> <?php } ?>
<?php if($userinf['user_designation']){ ?> <li><?php _e('Designation: ','mage-eventpress'); echo $userinf['user_designation']; ?></li> <?php } ?>
<?php if($userinf['user_website']){ ?> <li><?php _e('Website: ','mage-eventpress'); echo $userinf['user_website']; ?></li> <?php } ?>
<?php if($userinf['user_vegetarian']){ ?> <li><?php _e('Vegetarian: ','mage-eventpress'); echo $userinf['user_vegetarian']; ?></li> <?php } ?>
<?php if($userinf['user_ticket_type']){ ?> <li><?php _e('Ticket Type: ','mage-eventpress'); echo $userinf['user_ticket_type']; ?></li> <?php } ?>
<li><?php _e('Event Date:','mage-eventpress'); ?> <?php echo get_mep_datetime($userinf['user_event_date'], 'date-time-text'); ?></li>
</ul>
<?php
}
echo '</li>';
}
}else{
if(is_array($user_info) && sizeof($user_info) > 0){
@ -251,9 +296,13 @@ if(is_array($user_info) && sizeof($user_info) > 0){
}
echo '</li>';
}else{
if(is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0){
foreach($ticket_type_arr as $_event_recurring_date){
?>
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo get_mep_datetime($cart_item['event_cart_date'], 'date-time-text'); ?></li>
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'); //date('D, d M Y H:i:s',strtotime($_event_recurring_date)); ?></li>
<?php
}
}
}
}
@ -295,15 +344,21 @@ function mep_checkout_validation( $posted ) {
$total_sold = mep_ticket_sold($event_id);
$total_left = $total_seat - ($total_sold + $total_resv);
;
$event_validate_info = $values['event_validate_info'];
$event_validate_info = $values['event_validate_info'] ? $values['event_validate_info'] : array();
$ee = 0;
foreach($event_validate_info as $inf){
$ee = $ee + $inf['ticket_qty'];
if(is_array($event_validate_info) && sizeof($event_validate_info) > 0){
foreach($event_validate_info as $inf){
$ee = $ee + $inf['ticket_qty'];
}
}
if($ee > $total_left) {
$event = get_the_title($event_id);
wc_add_notice( __( "Sorry, Seats are not available in <b>$event</b>, Available Seats <b>$total_left</b> but you selected <b>$ee</b>", 'mage-eventpress' ), 'error' );
}
}
}
@ -354,19 +409,15 @@ function mep_add_custom_fields_text_to_order_items( $item, $cart_item_key, $valu
$recurring = get_post_meta($eid, 'mep_enable_recurring', true) ? get_post_meta($eid, 'mep_enable_recurring', true) : 'no';
if($recurring == 'yes'){
$event_recurring_date = $values['event_recurring_date'];
$event_recurring_date_arr = $values['event_recurring_date_arr'];
if(is_array($event_recurring_date) && sizeof($event_recurring_date) > 0){
foreach($event_recurring_date as $_event_recurring_date){
$item->add_meta_data('Date',get_mep_datetime($_event_recurring_date, 'date-time-text'));
if(is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0){
foreach($ticket_type_arr as $_event_recurring_date){
$item->add_meta_data('Date',get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'));
}
}
}else{
$event_recurring_date_arr = array();
$item->add_meta_data('Date',get_mep_datetime($cart_date, 'date-time-text'));
}
$item->add_meta_data('_recurring_date_arr',$event_recurring_date_arr);
$item->add_meta_data('Location',$cart_location);
$item->add_meta_data('_event_ticket_info',$values['event_ticket_info']);
@ -396,7 +447,7 @@ if($event_ticket_type){
$item->add_meta_data('_event_ticket_type','normal');
}
$item->add_meta_data('_event_user_info',$event_user_info);
$item->add_meta_data('_no_of_ticket',count($event_user_info));
// $item->add_meta_data('_no_of_ticket',count($event_user_info));
$item->add_meta_data('_event_service_info',$mep_events_extra_prices);
$item->add_meta_data('event_id',$eid);
$item->add_meta_data('_product_id',$eid);

View File

@ -1828,7 +1828,7 @@ function mep_get_all_tax_list($current_tax=null){
if($tt){
$t_class = array();
foreach($tt as $tclass){
$t_class[] = $tclass->slug;
$t_class[] = 'mage-'.$tclass->slug;
}
$main_class = implode(' ',$t_class);
return $main_class;
@ -1972,23 +1972,31 @@ function mep_get_all_tax_list($current_tax=null){
function mep_ticket_sold($event_id){
$event_start_date = date('Y-m-d',strtotime(get_post_meta($event_id,'event_start_date',true)));
$get_ticket_type_list = get_post_meta($event_id,'mep_event_ticket_type',true) ? get_post_meta($event_id,'mep_event_ticket_type',true) : array();
// $get_ticket_type_list = get_post_meta($event_id,'mep_event_ticket_type',true) ? get_post_meta($event_id,'mep_event_ticket_type',true) : array();
$get_ticket_type_list = metadata_exists( 'post', $event_id, 'mep_event_ticket_type' ) ? get_post_meta($event_id,'mep_event_ticket_type',true) : array();
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$sold = 0;
foreach($get_ticket_type_list as $ticket_type){
$sold = $sold + mep_ticket_type_sold($event_id,$ticket_type['option_name_t'],$event_start_date);
if(is_array($get_ticket_type_list) && sizeof($get_ticket_type_list) > 0){
foreach($get_ticket_type_list as $ticket_type){
$sold = $sold + mep_ticket_type_sold($event_id,$ticket_type['option_name_t'],$event_start_date);
}
}
if($recurring == 'yes'){
$mep_event_more_date = get_post_meta($event_id,'mep_event_more_date',true);
foreach ($mep_event_more_date as $md) {
foreach($get_ticket_type_list as $ticket_type){
$sold = $sold + mep_ticket_type_sold($event_id,$ticket_type['option_name_t'],$md['event_more_start_date']);
// $mep_event_more_date = get_post_meta($event_id,'mep_event_more_date',true);
$mep_event_more_date = metadata_exists( 'post', $event_id, 'mep_event_more_date' ) ? get_post_meta($event_id,'mep_event_more_date',true) : array();
if(is_array($mep_event_more_date) && sizeof($mep_event_more_date) > 0){
foreach ($mep_event_more_date as $md) {
if(is_array($get_ticket_type_list) && sizeof($get_ticket_type_list) > 0){
foreach($get_ticket_type_list as $ticket_type){
$sold = $sold + mep_ticket_type_sold($event_id,$ticket_type['option_name_t'],$md['event_more_start_date']);
}
}
}
}
}
}
return $sold;
@ -2065,12 +2073,12 @@ function mep_get_all_tax_list($current_tax=null){
);
//SAVE THE POST
$pid = wp_insert_post($new_post);
$product_type = mep_get_option('mep_event_product_type', 'general_setting_sec','yes');
update_post_meta( $post_id, 'link_wc_product', $pid );
update_post_meta( $pid, 'link_mep_event', $post_id );
update_post_meta( $pid, '_price', 0.01 );
update_post_meta( $pid, '_sold_individually', 'yes' );
update_post_meta( $pid, '_virtual', 'yes' );
update_post_meta( $pid, '_virtual', $product_type );
$terms = array( 'exclude-from-catalog', 'exclude-from-search' );
wp_set_object_terms( $pid, $terms, 'product_visibility' );
update_post_meta( $post_id, 'check_if_run_once', true );
@ -2120,7 +2128,7 @@ function mep_get_all_tax_list($current_tax=null){
set_post_thumbnail( $product_id, get_post_thumbnail_id($post_id) );
wp_publish_post( $product_id );
$product_type = mep_get_option('mep_event_product_type', 'general_setting_sec','yes');
$_tax_status = isset($_POST['_tax_status']) ? strip_tags($_POST['_tax_status']) : 'none';
$_tax_class = isset($_POST['_tax_class']) ? strip_tags($_POST['_tax_class']) : '';
@ -2129,7 +2137,7 @@ function mep_get_all_tax_list($current_tax=null){
$update__tax_class = update_post_meta( $product_id, '_tax_class', $_tax_class);
$update__tax_class = update_post_meta( $product_id, '_stock_status', 'instock');
$update__tax_class = update_post_meta( $product_id, '_manage_stock', 'no');
$update__tax_class = update_post_meta( $product_id, '_virtual', 'yes');
$update__tax_class = update_post_meta( $product_id, '_virtual', $product_type);
$update__tax_class = update_post_meta( $product_id, '_sold_individually', 'yes');
@ -2155,7 +2163,11 @@ function mep_get_all_tax_list($current_tax=null){
}
// add_action('admin_init','mytest');
// function mytest(){
// echo $product_type = mep_get_option('mep_event_product_type', 'general_setting_sec','yes');
// die();
// }
add_action('parse_query', 'mep_product_tags_sorting_query');
@ -2309,15 +2321,15 @@ function mep_get_all_tax_list($current_tax=null){
add_filter( 'wp_mail_content_type','mep_set_email_content_type' );
add_filter('woocommerce_cart_item_price', 'mep_avada_mini_cart_price_fixed', 100, 3);
function mep_avada_mini_cart_price_fixed($price,$cart_item,$r){
add_filter('woocommerce_cart_item_price', 'mep_avada_mini_cart_price_fixed', 100, 3);
function mep_avada_mini_cart_price_fixed($price,$cart_item,$r){
$price = wc_price($cart_item['line_total']);
return $price;
}
function mage_array_strip($string, $allowed_tags = NULL){
function mage_array_strip($string, $allowed_tags = NULL){
if (is_array($string)){
foreach ($string as $k => $v){
$string[$k] = mage_array_strip($v, $allowed_tags);
@ -2330,4 +2342,25 @@ function mep_get_all_tax_list($current_tax=null){
add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' );
add_filter('wpseo_premium_term_redirect_slug_change', '__return_true' );
add_filter('wpseo_enable_notification_term_slug_change','__return_false');
add_filter('wpseo_enable_notification_term_slug_change','__return_false');
add_filter( 'woocommerce_order_item_get_formatted_meta_data', 'mep_hide_event_order_data_from_thankyou_and_email', 10, 1 );
function mep_hide_event_order_data_from_thankyou_and_email($formatted_meta){
$temp_metas = [];
foreach($formatted_meta as $key => $meta) {
if ( isset( $meta->key ) && ! in_array( $meta->key, [
'event_id'
// 'Location',
// 'Date'
] ) ) {
$temp_metas[ $key ] = $meta;
}
}
return $temp_metas;
}

View File

@ -90,7 +90,7 @@ function mep_event_list($atts, $content = null){
"cat" => "0",
"org" => "0",
"style" => "grid",
"column" => 2,
"column" => 3,
"cat-filter" => "no",
"org-filter" => "no",
"show" => "-1",
@ -231,27 +231,25 @@ function mep_event_list($atts, $content = null){
$loop = new WP_Query($args_search_qqq);
$total_post=$loop->post_count;
echo '<div class="mage_grid_box">';
while ($loop->have_posts()) {
$loop->the_post();
$event_meta = get_post_custom(get_the_id());
$author_terms = get_the_terms(get_the_id(), 'mep_org');
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
$newformat = date_i18n('Y-m-d H:i:s', $time);
$event_meta = get_post_custom(get_the_id());
$author_terms = get_the_terms(get_the_id(), 'mep_org');
$time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
$newformat = date_i18n('Y-m-d H:i:s', $time);
$tt = get_the_terms(get_the_id(), 'mep_cat');
$torg = get_the_terms(get_the_id(), 'mep_org');
$tt = get_the_terms(get_the_id(), 'mep_cat');
$torg = get_the_terms(get_the_id(), 'mep_org');
$org_class = mep_get_term_as_class(get_the_id(), 'mep_org');
$cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat');
$org_class = mep_get_term_as_class(get_the_id(), 'mep_org');
$cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat');
$event_multidate = maybe_unserialize($event_meta['mep_event_more_date'][0]);
$event_multidate = array_key_exists('mep_event_more_date', $event_meta) ? maybe_unserialize($event_meta['mep_event_more_date'][0]) : array();
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
$available_seat = mep_get_total_available_seat(get_the_id(), $event_meta);
if ($style == 'grid') {
if ($column == 2) {
$columnNumber = 'two_column';
@ -267,13 +265,11 @@ function mep_event_list($atts, $content = null){
}
?>
<?php if ($flex_column > 0 && $style == 'grid' && $mage_div_count % $flex_column == 0) {
echo '<div class="mage_grid_box">';
} ?>
<div class='<?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php if ($tt) {
echo 'mage-' . $org_class;
echo $org_class;
} ?> <?php if ($torg) {
echo 'mage-' . $cat_class;
echo $cat_class;
} ?>'>
<div class="mep_list_thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
@ -366,19 +362,9 @@ function mep_event_list($atts, $content = null){
</div>
<!-- <p>--><?php //echo count($args_search_qqq);?><!--</p>-->
<?php
$mage_div_count++;
if ($flex_column > 0 && $style == 'grid' && ($mage_div_count % $flex_column == 0 || $total_post == $mage_div_count)) {
$blank_div = $flex_column - ($mage_div_count % $flex_column);
if ($total_post == $mage_div_count && $blank_div > 0 && $flex_column > 1 && $blank_div < $flex_column) {
while ($blank_div > 0) {
echo '<div class="blank_div"></div>';
$blank_div--;
}
}
echo '</div>';
}
}
wp_reset_postdata();
echo '</div>';
//}
if ($pagination == 'yes') {
?>

View File

@ -245,8 +245,8 @@ if($user_api){
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
</div>
<input type="text" class="form-control" style="display: none;" required name="latitude" value="<?php echo get_term_meta( $term->term_id, 'latitude', true ); ?>">
<input type="text" class="form-control" style="display: none;" required name="longitude" value="<?php echo get_term_meta( $term->term_id, 'longitude', true ); ?>">
<input type="text" class="form-control" style="display: none;" name="latitude" value="<?php echo get_term_meta( $term->term_id, 'latitude', true ); ?>">
<input type="text" class="form-control" style="display: none;" name="longitude" value="<?php echo get_term_meta( $term->term_id, 'longitude', true ); ?>">
<!-- <div id="map"></div> -->
<?php

View File

@ -48,7 +48,12 @@ $simple_rsv = '';
$total_sold = mep_ticket_sold(get_the_id());
$total_left = $total_seat - ($total_sold + $total_resv);
if(array_key_exists('mep_reg_status', $event_meta)){
$reg_status = $event_meta['mep_reg_status'][0];
}else{
$reg_status = '';
}
if($reg_status!='off'){
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
foreach ($mep_event_ticket_type as $field ) {
@ -56,11 +61,7 @@ foreach ($mep_event_ticket_type as $field ) {
}
}else{$qm='';}
if($mep_event_ticket_type){
$seat_left = $total_left;
}else{
$seat_left = $total_left;
}
$seat_left = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
@ -74,13 +75,14 @@ $recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_me
if($recurring == 'yes'){
$event_more_dates = get_post_meta($post_id,'mep_event_more_date',true);
$seat_left = 10;
$md = end($event_more_dates);
$more_date = $md['event_more_start_date'].' '.$md['event_more_start_time'];
$newformat = date('Y-m-d H:i:s',strtotime($more_date));
$newformat = empty($event_more_dates) ? $newformat : date('Y-m-d H:i:s',strtotime($more_date));
}
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
date_default_timezone_set($default_timezone_val);
@ -99,7 +101,7 @@ if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
} elseif($seat_left<=0){
?>
<span class=event-expire-btn>
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : _e('No Seat Available','mage-eventpress'); ?>
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : _e('No Seat Availables','mage-eventpress'); ?>
</span>
<?php
do_action('mep_after_no_seat_notice');
@ -127,7 +129,7 @@ if(array_key_exists('mep_rsv_seat', $event_meta)){
$mep_available_seat = 'on';
}
$leftt = $total_left;
$leftt = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
$days = $interval->d;
$hours = $interval->h;
$minutes = $interval->i;
@ -137,12 +139,7 @@ if(array_key_exists('mep_rsv_seat', $event_meta)){
$qty_typec = $event_meta['qty_box_type'][0];
if(array_key_exists('mep_reg_status', $event_meta)){
$reg_status = $event_meta['mep_reg_status'][0];
}else{
$reg_status = '';
}
if($reg_status!='off'){
?>
<h4 class="mep-cart-table-title">
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : _e('Register Now:','mage-eventpress'); ?>

View File

@ -20,7 +20,7 @@ function mep_ev_ticket_type(){
?>
<?php echo "<h3 class='ex-sec-title'>".mep_get_label($pid,'mep_event_ticket_type_text','Ticket Type:
')."</h3>"; ?>
<input type="hidden" name='mep_event_start_date' value="<?php echo get_post_meta($post->ID, 'event_start_date', true).' '.get_post_meta($post->ID, 'event_start_time', true); ?>">
<table>
<?php
$count =1;
@ -41,6 +41,7 @@ function mep_ev_ticket_type(){
?>
<tr>
<td align="Left"><?php echo $field['option_name_t']; ?>
<input type="hidden" name='mep_event_start_date[]' value="<?php echo get_post_meta($post->ID, 'event_start_datetime', true); ?>">
<?php if($mep_available_seat=='on'){ ?><div class="xtra-item-left"><?php echo max($total_left,0); ?>
<?php echo mep_get_option('mep_left_text', 'label_setting_sec') ? mep_get_option('mep_left_text', 'label_setting_sec') : _e('Left:','mage-eventpress'); ?>

View File

@ -6,7 +6,7 @@ global $post,$event_meta,$total_book;
$total_resv = mep_event_total_seat(get_the_id(),'resv');
$total_sold = mep_ticket_sold(get_the_id());
$total_left = $total_seat - ($total_sold + $total_resv);
$total_left = apply_filters( 'mep_event_total_seat_count', $total_left, get_the_id() );
if($total_left>0){
do_action('mep_event_ticket_types');
do_action('mep_event_extra_service');

Binary file not shown.

View File

@ -3,9 +3,9 @@ msgstr ""
"Project-Id-Version: Woocommerce Events Manager\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-07 14:41+0000\n"
"PO-Revision-Date: 2020-02-10 11:17+0000\n"
"Last-Translator: admin_t8mc564q <info@bbr-racing.de>\n"
"Language-Team: Deutsch\n"
"PO-Revision-Date: 2020-03-10 05:32+0000\n"
"Last-Translator: shamim <shamim.link@yahoo.com>\n"
"Language-Team: German\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
@ -710,12 +710,12 @@ msgstr "Textfarbe der Beschriftung"
#: inc/admin_setting_panel.php:539 inc/template-prts/total_seat.php:19
msgid "Left"
msgstr "Links"
msgstr "frei"
#: inc/template-prts/event_extra_service.php:33
#: inc/template-prts/event_ticket_type.php:44
msgid "Left:"
msgstr "Links:"
msgstr "frei:"
#: inc/mep_tax_meta.php:7 inc/mep_tax_meta.php:201
msgid "Location/Venue"

Binary file not shown.

View File

@ -0,0 +1,415 @@
msgid ""
msgstr ""
"Project-Id-Version: EN\n"
"POT-Creation-Date: 2019-02-05 16:04+0600\n"
"PO-Revision-Date: 2020-02-27 14:33+0100\n"
"Last-Translator: shamim <shamim.link@yahoo.com>\n"
"Language-Team: English (United States)\n"
"Language: pl_PL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-KeywordsList: __(;_e;__x;_x\n"
"Report-Msgid-Bugs-To: \n"
"X-Loco-Version: 2.3.1; wp-5.3.2\n"
"X-Poedit-SearchPath-0: .\n"
#: inc/mep_csv_export.php:19
msgid "Export to CSV"
msgstr "Eksportuj do CSV"
#: inc/mep_event_meta.php:40
msgid "Registration On/Off:"
msgstr "Rejestracja włączona / wyłączona:"
#: inc/mep_event_meta.php:54
msgid "Show Available Seat?"
msgstr "Pokaż dostępne miejsce?"
#: inc/mep_event_meta.php:98
msgid "Show Address from Organizer?:"
msgstr "Pokaż adres z organizatora ?:"
#: inc/mep_event_meta.php:108
msgid "Location/Venue:"
msgstr "Lokalizacja / miejsce:"
#: inc/mep_event_meta.php:116 inc/mep_tax_meta.php:12 inc/mep_tax_meta.php:204
msgid "Street:"
msgstr "Ulica:"
#: inc/mep_event_meta.php:123 inc/mep_tax_meta.php:17 inc/mep_tax_meta.php:210
msgid "City:"
msgstr "Miasto:"
#: inc/mep_event_meta.php:130 inc/mep_tax_meta.php:22 inc/mep_tax_meta.php:216
msgid "State:"
msgstr "Stan:"
#: inc/mep_event_meta.php:137 inc/mep_tax_meta.php:27 inc/mep_tax_meta.php:222
msgid "Postcode:"
msgstr "Kod pocztowy:"
#: inc/mep_event_meta.php:144 inc/mep_tax_meta.php:32 inc/mep_tax_meta.php:228
msgid "Country:"
msgstr "Kraj:"
#: inc/mep_event_meta.php:152
msgid "Show Google Map:"
msgstr "Pokaż mapę Google:"
#: inc/mep_event_meta.php:284
msgid "Price Label"
msgstr "Etykieta cenowa"
#: inc/mep_event_meta.php:285
#: templates/template-prts/event_extra_service.php:18
msgid "Price"
msgstr "Cena"
#: inc/mep_event_meta.php:286
#: templates/template-prts/event_extra_service.php:17
msgid "Quantity"
msgstr "Ilość"
#: inc/mep_event_meta.php:287 inc/mep_event_meta.php:702
msgid "Reserve Qty"
msgstr "Zarezerwuj ilość"
#: inc/mep_event_meta.php:288
msgid "Input Type"
msgstr "Rodzaj wejścia"
#: inc/mep_event_meta.php:289
msgid "Show Quantity Box"
msgstr "Pokaż pole ilości"
#: inc/mep_event_meta.php:300 inc/mep_event_meta.php:629
#: inc/mep_event_meta.php:650 inc/mep_event_meta.php:725
#: inc/mep_event_meta.php:744
msgid "Input Box"
msgstr "Pole wprowadzania"
#: inc/mep_event_meta.php:301 inc/mep_event_meta.php:630
#: inc/mep_event_meta.php:651 inc/mep_event_meta.php:726
#: inc/mep_event_meta.php:744
msgid "Dropdown List"
msgstr "Lista rozwijana"
#: inc/mep_event_meta.php:303
msgid "Yes"
msgstr "tak"
#: inc/mep_event_meta.php:367 inc/mep_event_meta.php:384
#: inc/mep_event_meta.php:495 inc/mep_event_meta.php:512
#: inc/mep_event_meta.php:633 inc/mep_event_meta.php:653
#: inc/mep_event_meta.php:729 inc/mep_event_meta.php:745
msgid "Remove"
msgstr "Usunąć"
#: inc/mep_event_meta.php:383
msgid "FAQ Contents"
msgstr "FAQ Treść"
#: inc/mep_event_meta.php:392
msgid "Add New F.A.Q"
msgstr "Dodaj nowy F.A.Q"
#: inc/mep_event_meta.php:511
msgid "Day Details"
msgstr "Szczegóły dnia"
#: inc/mep_event_meta.php:520
msgid "Add New Day"
msgstr "Dodaj nowy dzień"
#: inc/mep_event_meta.php:605
msgid "Extra Service Name"
msgstr "Nazwa dodatkowej usługi"
#: inc/mep_event_meta.php:606
msgid "Service Price"
msgstr "Cena usługi"
#: inc/mep_event_meta.php:607 inc/mep_event_meta.php:701
msgid "Available Qty"
msgstr "Dostępna ilość"
#: inc/mep_event_meta.php:608 inc/mep_event_meta.php:703
msgid "Qty Box Type"
msgstr "Ilość Rodzaj skrzynki"
#: inc/mep_event_meta.php:649 inc/mep_event_meta.php:744
msgid "Please Select Type"
msgstr "Wybierz typ"
#: inc/mep_event_meta.php:658
msgid "Add Extra Price"
msgstr "Dodaj dodatkową cenę"
#: inc/mep_event_meta.php:699
msgid "Ticket Type Name"
msgstr "Nazwa rodzaju biletu"
#: inc/mep_event_meta.php:700
msgid "Ticket Price"
msgstr "Cena biletu"
#: inc/mep_event_meta.php:749
msgid "Add New Ticket Type"
msgstr "Dodaj nowy typ biletu"
#: inc/mep_event_meta.php:770
msgid "Start Date & Time:"
msgstr "Data i godzina rozpoczęcia:"
#: inc/mep_event_meta.php:774
msgid "End Date & Time:"
msgstr "Data i godzina zakończenia:"
#: inc/mep_event_meta.php:786
msgid "Confirmation Email Text:"
msgstr "Tekst e-maila z potwierdzeniem:"
#: inc/mep_event_meta.php:1143
msgid "Event:"
msgstr "Zdarzenie:"
#: inc/mep_event_meta.php:1148
msgid "UserID:"
msgstr "Identyfikator użytkownika:"
#: inc/mep_event_meta.php:1155
msgid "Full Name:"
msgstr "Pełne imię i nazwisko:"
#: inc/mep_event_meta.php:1160
msgid "Email:"
msgstr "Email:"
#: inc/mep_event_meta.php:1165
msgid "Phone:"
msgstr "Telefon:"
#: inc/mep_event_meta.php:1170
msgid "Addres:"
msgstr "Adres:"
#: inc/mep_event_meta.php:1177
msgid "Gender:"
msgstr "Płeć:"
#: inc/mep_event_meta.php:1184
msgid "Company:"
msgstr "Firma:"
#: inc/mep_event_meta.php:1191
msgid "Designation:"
msgstr "Przeznaczenie:"
#: inc/mep_event_meta.php:1198
msgid "Website:"
msgstr "Strona internetowa:"
#: inc/mep_event_meta.php:1206
msgid "Vegetarian?:"
msgstr "Wegetariański?"
#: inc/mep_event_meta.php:1214
msgid "T-Shirt Size?:"
msgstr "Rozmiar koszulki?"
#: inc/mep_event_meta.php:1245
msgid "Ticket Type:"
msgstr "Typ biletu:"
#: inc/mep_event_meta.php:1251
msgid "Order ID:"
msgstr "ID zamówienia:"
#: inc/mep_event_meta.php:1259
msgid "View Order"
msgstr "Zobacz zamówienie"
#: inc/mep_shortcode.php:105 inc/mep_shortcode.php:121
msgid "All"
msgstr "Wszystko"
#: inc/mep_shortcode.php:248 inc/mep_shortcode.php:490
msgid "Organized By:"
msgstr "Zorganizowane przez:"
#: inc/mep_shortcode.php:255 inc/mep_shortcode.php:497
msgid "Location:"
msgstr "Lokalizacja:"
#: inc/mep_shortcode.php:262 inc/mep_shortcode.php:504
msgid "Time:"
msgstr "Czas:"
#: inc/mep_tax.php:7 inc/mep_tax.php:8
msgid "Event Category"
msgstr "Kategoria zdarzenia"
#: inc/mep_tax.php:43 inc/mep_tax.php:44
msgid "Event Organizer"
msgstr "Organizator zdarzenia"
#: inc/mep_tax_meta.php:7 inc/mep_tax_meta.php:198
msgid "Location/Venue"
msgstr "Lokalizacja / miejsce:"
#: inc/mep_tax_meta.php:234
msgid "Map:"
msgstr "Mapa:"
#: templates/single-mep_events_attendees.php:75
msgid "Email"
msgstr "Email"
#: templates/single-mep_events_attendees.php:80
msgid "Phone"
msgstr "Telefon"
#: templates/single-mep_events_attendees.php:85
msgid "Address"
msgstr "Adres"
#: templates/single-mep_events_attendees.php:90
msgid "Designation"
msgstr "Przeznaczenie"
#: templates/single-mep_events_attendees.php:95
msgid "Company"
msgstr "Firma"
#: templates/single-mep_events_attendees.php:100
msgid "Website"
msgstr "Strona internetowa"
#: templates/single-mep_events_attendees.php:105
msgid "Gender"
msgstr "Płeć:"
#: templates/single-mep_events_attendees.php:111
msgid "Vegetarian"
msgstr "Wegetariański"
#: templates/single-mep_events_attendees.php:118
msgid "T Shirt Size"
msgstr "Rozmiar koszulki"
#: templates/single-mep_events_attendees.php:125
msgid "Ticket Type"
msgstr "Typ biletu"
#: templates/template-prts/event_add_cart.php:64
msgid "Event Expired"
msgstr "Wydarzenie wygasło"
#: templates/template-prts/event_add_cart.php:71
#: templates/template-prts/event_ticket_type.php:50
msgid "No Seat Available"
msgstr "Brak dostępnych miejsc"
#: templates/template-prts/event_add_cart.php:90
msgid "Register Now:"
msgstr "Rezerwuj teraz:"
#: templates/template-prts/event_add_cart.php:96
msgid "Quantity:"
msgstr "Ilość:"
#: templates/template-prts/event_add_cart.php:124
msgid "Total"
msgstr "Całkowity"
#: templates/template-prts/event_add_cart.php:126
msgid "No Ticket Selected!"
msgstr "Nie wybrano biletu!"
#: templates/template-prts/event_extra_service.php:16
#: woocommerce-event-press.php:639
msgid "Name"
msgstr "Nazwa"
#: templates/template-prts/event_extra_service.php:30
#: templates/template-prts/event_ticket_type.php:35
#: templates/template-prts/total_seat.php:50
#: templates/template-prts/total_seat.php:55
msgid "Left"
msgstr "Lewo"
#: templates/template-prts/event_extra_service.php:45
msgid "Not Available"
msgstr "Niedostępne"
#: templates/template-prts/event_ticket_type.php:38
msgid "Ticket Qty:"
msgstr "Ilość biletów:"
#: templates/template-prts/event_ticket_type.php:45
#: woocommerce-event-press.php:640
msgid "Ticket"
msgstr "Bilet"
#: templates/template-prts/event_ticket_type.php:52
msgid "Per Ticket Price:"
msgstr "Cena za bilet:"
#: templates/template-prts/faq.php:9
msgid "Event F.A.Q"
msgstr "Wydarzenie F.A.Q"
#: templates/template-prts/organizer.php:7
msgid "By:"
msgstr "Przez:"
#: templates/template-prts/total_seat.php:50
#: templates/template-prts/total_seat.php:55
msgid "Total Seat:"
msgstr "Łączna liczba miejsc:"
#: templates/themes/default-theme.php:17
msgid "Event Date:"
msgstr "Data wydarzenia:"
#: templates/themes/default-theme.php:24
msgid "Event Time:"
msgstr "Czas wydarzenia:"
#: templates/themes/default-theme.php:31 templates/themes/default-theme.php:53
#: templates/themes/theme-1.php:48
msgid "Event Location:"
msgstr "Lokalizacja wydarzenia:"
#: templates/themes/theme-1.php:26
msgid "Date and Time:"
msgstr "Data i godzina:"
#: templates/themes/theme-1.php:34
msgid "Description"
msgstr "Opis"
#: templates/themes/theme-2.php:33
msgid "Organizer:"
msgstr "Organizator:"
#: templates/themes/theme-2.php:35
msgid "Venue:"
msgstr "Miejsce wydarzenia:"
#: templates/themes/theme-3.php:41
msgid "About The Event"
msgstr "O wydarzeniu"
#: woocommerce-event-press.php:641
msgid "Event"
msgstr "Zdarzenie"
#: woocommerce-event-press.php:642 woocommerce-event-press.php:671
msgid "Download"
msgstr "Download"

View File

@ -384,17 +384,4 @@ CatID & OrgID Column Added
Some Bug Fixed
Code Improved
Expire Event List Shortcode issue fixed
05 Feb 2020*
= 3.1.4 =
* Update Release:
Multi Date Ribbon added into Event list
Multi Date added into Event calendar
Date & Time Formating set to WordPress Default timestamp
Add to Calendar Links not working issue fixed
Attendee Info now showing into cart
Code Improved
CSS issue fixed
... More
05 Feb 2020*

View File

@ -32,7 +32,24 @@ $currency_pos = get_option( 'woocommerce_currency_pos' );
<div class="mep-events-wrapper">
<?php do_action( 'woocommerce_before_single_product' ); ?>
<?php
require_once(dirname(__FILE__) . "/themes/$_current_template"); ?>
require_once(dirname(__FILE__) . "/themes/$_current_template");
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</div>
<div class="mep-related-events-sec">
<?php do_action('after-single-events'); ?>

View File

@ -117,4 +117,4 @@ $hide_calendar_details = mep_get_option('mep_event_hide_calendar_details', 'gene
<?php } ?>
</div>
</div>
</div>
</div>

View File

@ -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.1.4
* Version: 3.1.5
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
@ -25,4 +25,15 @@ function mep_admin_notice_wc_not_active() {
);
}
add_action( 'admin_notices', 'mep_admin_notice_wc_not_active' );
}
}
function kia_hide_mnm_meta_in_emails( $meta ) {
if( ! is_admin() ) {
$criteria = array( 'key' => 'event_id' );
$meta = wp_list_filter( $meta, $criteria, 'NOT' );
}
return $meta;
}
add_filter( 'woocommerce_order_item_get_formatted_meta_data', 'kia_hide_mnm_meta_in_emails' );