v9990
This commit is contained in:
parent
88e634bf66
commit
37573a87d2
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_add_calender','mep_ev_calender');
|
||||
|
||||
function mep_ev_calender(){
|
||||
?>
|
||||
<div class="calender-url">
|
||||
<?php mep_add_to_google_calender_link(get_the_id()); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
@ -1,524 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_add_to_cart','mep_get_event_reg_btn');
|
||||
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn(){
|
||||
global $post,$event_meta;
|
||||
$post_id = $post->ID;
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
||||
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
||||
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
||||
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
||||
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
||||
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
|
||||
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
|
||||
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
|
||||
$event_ecternal_link = '';
|
||||
$book_count = get_post_meta($post_id,'total_booking', true);
|
||||
|
||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
||||
|
||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
}else{
|
||||
$simple_rsv = '';
|
||||
}
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
$seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$datetime1 = new DateTime();
|
||||
$datetime2 = new DateTime($newformat);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
|
||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||
$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);
|
||||
|
||||
|
||||
|
||||
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
|
||||
foreach ($mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
}
|
||||
}else{$qm='';}
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
$seat_left = $total_left;
|
||||
}else{
|
||||
$seat_left = $total_left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$current = current_time('Y-m-d H:i:s');
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
|
||||
|
||||
$recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no';
|
||||
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
|
||||
date_default_timezone_set($default_timezone_val);
|
||||
|
||||
$datetime1 = new DateTime($newformat);
|
||||
$datetime2 = new DateTime($current);
|
||||
$interval = date_diff($datetime2, $datetime1);
|
||||
|
||||
|
||||
|
||||
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Sorry, Event Expired','mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
} 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'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
|
||||
}else{
|
||||
|
||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
}else{
|
||||
$simple_rsv = '';
|
||||
}
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
$leftt = $total_left;
|
||||
$days = $interval->d;
|
||||
$hours = $interval->h;
|
||||
$minutes = $interval->i;
|
||||
if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
||||
if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
||||
if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
||||
|
||||
|
||||
$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'); ?>
|
||||
|
||||
</h4>
|
||||
<form action="" method='post'>
|
||||
<?php
|
||||
do_action('mep_event_ticket_type_extra_service');
|
||||
|
||||
if($leftt>0){
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:','mage-eventpress');
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
if($mep_event_ticket_type){ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo $leftt; ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<span id="ttyttl"></span>
|
||||
<?php
|
||||
}else{
|
||||
if($event_sqi==1){
|
||||
$qmx = $leftt;
|
||||
if($qty_typec=='dropdown'){ ?>
|
||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box'>
|
||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }else{ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo $leftt; ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="number">
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
echo 1;
|
||||
?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box" step="1" min="1" max="<?php echo $leftt; ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span class='the-total'>
|
||||
<?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total','mage-eventpress'); ?>
|
||||
<span id="usertotal"></span></span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id,$event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<p class="mep_no_tickt_notice" id="mep_btn_notice">
|
||||
<?php echo mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') ? mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') : _e('No Ticket Selected!','mage-eventpress'); ?>
|
||||
</p>
|
||||
<?php
|
||||
$cart_product_id = get_post_meta($post_id,'link_wc_product',true) ? esc_attr(get_post_meta($post_id,'link_wc_product',true)) : esc_attr($post_id);
|
||||
?>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; //echo esc_attr($post_id); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
if(!$mep_event_ticket_type){
|
||||
if($qm){$qm=$qm;}else{$qm='';}
|
||||
?><?php do_action('mep_single_page_reg'); ?><?php }
|
||||
|
||||
}
|
||||
?>
|
||||
</form><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('mep_add_to_cart_list','mep_get_event_reg_btn_list');
|
||||
|
||||
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn_list(){
|
||||
global $post,$event_meta;
|
||||
$post_id = $post->ID;
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_date = $event_meta[mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'event_start_date' )][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||
$mep_reg_phone = strip_tags($event_meta['mep_reg_phone'][0]);
|
||||
$mep_reg_address = strip_tags($event_meta['mep_reg_address'][0]);
|
||||
$mep_reg_designation = strip_tags($event_meta['mep_reg_designation'][0]);
|
||||
$mep_reg_website = strip_tags($event_meta['mep_reg_website'][0]);
|
||||
$mep_reg_veg = strip_tags($event_meta['mep_reg_veg'][0]);
|
||||
$mep_reg_company = strip_tags($event_meta['mep_reg_company'][0]);
|
||||
$mep_reg_gender = strip_tags($event_meta['mep_reg_gender'][0]);
|
||||
$mep_reg_tshirtsize = strip_tags($event_meta['mep_reg_tshirtsize'][0]);
|
||||
$event_ecternal_link = '';
|
||||
$book_count = get_post_meta($post_id,'total_booking', true);
|
||||
|
||||
if($book_count){ $total_book = $book_count; }else{ $total_book = 0; }
|
||||
|
||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
}else{
|
||||
$simple_rsv = '';
|
||||
}
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
$seat_left = ((int)$event_meta['mep_total_seat'][0]- (int)$total_book);
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
$datetime1 = new DateTime();
|
||||
$datetime2 = new DateTime($newformat);
|
||||
$interval = $datetime1->diff($datetime2);
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
if (is_array($mep_event_ticket_type) || is_object($mep_event_ticket_type)){
|
||||
foreach ($mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
||||
// $opt_rst_qty = $field['option_rsv_t'] ? $field['option_rsv_t'] : 0;
|
||||
$tesqn = $post_id.str_replace(' ', '', $qm);
|
||||
$tesq = get_post_meta($post_id,"mep_xtra_$tesqn",true);
|
||||
$stc = $stc+$opt_qty;
|
||||
$llft = ($opt_qty - (int)$tesq);
|
||||
$leftt = $leftt+$llft;
|
||||
}
|
||||
}else{$qm='';}
|
||||
if($mep_event_ticket_type){
|
||||
$seat_left = $leftt;
|
||||
}else{
|
||||
$seat_left = $seat_left;
|
||||
}
|
||||
|
||||
|
||||
$current = current_time('Y-m-d H:i:s');
|
||||
$time = strtotime($event_expire_date);
|
||||
$newformat = date('Y-m-d H:i:s',$time);
|
||||
|
||||
date_default_timezone_set(get_option('timezone_string'));
|
||||
|
||||
$datetime1 = new DateTime($newformat);
|
||||
$datetime2 = new DateTime($current);
|
||||
|
||||
$interval = date_diff($datetime2, $datetime1);
|
||||
|
||||
// $days = $interval->days;
|
||||
// $hours = $interval->h;
|
||||
// $minutes = $interval->i;
|
||||
// if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
||||
// if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
||||
// if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
||||
// echo "<span class='active'>$dd $hh $mm</span>";
|
||||
|
||||
|
||||
|
||||
if(time() > strtotime($newformat)){
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Event Expired','mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
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'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
else{
|
||||
|
||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
}else{
|
||||
$simple_rsv = '';
|
||||
}
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$res = 0;
|
||||
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
||||
$opt_rst_qty = isset($field['option_rsv_t']) ? $field['option_rsv_t'] : 0;
|
||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
||||
$tesq = get_post_meta($post->ID,"mep_xtra_$tesqn",true);
|
||||
$stc = $stc+$opt_qty;
|
||||
$res = $res + (int)$opt_rst_qty;
|
||||
$res = (int)$res;
|
||||
$llft = ($opt_qty - (int)$tesq);
|
||||
$leftt = ($leftt+$llft);
|
||||
}
|
||||
$leftt = $leftt-$res;
|
||||
}else{
|
||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
||||
}
|
||||
|
||||
$days = $interval->d;
|
||||
$hours = $interval->h;
|
||||
$minutes = $interval->i;
|
||||
if($days>0){ $dd = $days." days "; }else{ $dd=""; }
|
||||
if($hours>0){ $hh = $hours." hours "; }else{ $hh=""; }
|
||||
if($minutes>0){ $mm = $minutes." minutes "; }else{ $mm=""; }
|
||||
|
||||
|
||||
$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'); ?>
|
||||
</h4> -->
|
||||
<form action="" method='post'>
|
||||
<?php
|
||||
|
||||
if(array_key_exists('mep_rsv_seat', $event_meta)){
|
||||
$simple_rsv = $event_meta['mep_rsv_seat'][0];
|
||||
}else{
|
||||
$simple_rsv = '';
|
||||
}
|
||||
if($simple_rsv){
|
||||
$simple_rsv = $simple_rsv;
|
||||
}else{
|
||||
$simple_rsv = 0;
|
||||
}
|
||||
$total_book = ($total_book + $simple_rsv);
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
if($mep_event_ticket_type){
|
||||
|
||||
$stc = 0;
|
||||
$leftt = 0;
|
||||
$res = 0;
|
||||
|
||||
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qm = $field['option_name_t'];
|
||||
$opt_qty = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
||||
$opt_rst_qty = isset($field['option_rsv_t']) ? $field['option_rsv_t'] : 0;
|
||||
$tesqn = $post->ID.str_replace(' ', '', $qm);
|
||||
|
||||
$tesq = get_post_meta($post->ID,"mep_xtra_$tesqn",true);
|
||||
|
||||
$stc = $stc+$opt_qty;
|
||||
|
||||
$res = $res + (int)$opt_rst_qty;
|
||||
|
||||
$res = (int)$res;
|
||||
|
||||
|
||||
$llft = ($opt_qty - (int)$tesq);
|
||||
$leftt = ($leftt+$llft);
|
||||
}
|
||||
$leftt = $leftt-$res;
|
||||
|
||||
}else{
|
||||
$leftt = $event_meta['mep_total_seat'][0]- $total_book;
|
||||
}
|
||||
|
||||
|
||||
if($leftt>0){
|
||||
|
||||
do_action('mep_event_ticket_types_list');
|
||||
do_action('mep_event_extra_service_list');
|
||||
|
||||
}else{
|
||||
?>
|
||||
<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'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($leftt>0){
|
||||
?>
|
||||
<input type='hidden' id='rowtotal_<?php echo get_the_id(); ?>' value="<?php echo get_post_meta($post_id,"_price",true); ?>"/>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:','mage-eventpress');
|
||||
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
|
||||
if($mep_event_ticket_type){ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<span id="ttyttl_<?php echo get_the_id(); ?>"></span>
|
||||
<?php
|
||||
}else{
|
||||
if($event_sqi==1){
|
||||
$qmx = ($event_meta['mep_total_seat'][0]- $total_book);
|
||||
if($qty_typec=='dropdown'){ ?>
|
||||
<select name="quantity" id="quantity_5a7abbd1bff73" class='input-text qty text extra-qty-box_<?php echo get_the_id(); ?>'>
|
||||
<?php for ($i = 1; $i <= $qmx; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }else{ ?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="number">
|
||||
<?php
|
||||
}
|
||||
}else{
|
||||
echo 1;
|
||||
?>
|
||||
<input id="quantity_5a7abbd1bff73" class="input-text qty text extra-qty-box_<?php echo get_the_id(); ?>" step="1" min="1" max="<?php echo ($event_meta['mep_total_seat'][0]- $total_book); ?>" name="quantity" value="1" title="Qty" size="4" pattern="[0-9]*" inputmode="numeric" type="hidden">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span class='the-total'>
|
||||
<?php echo mep_get_option('mep_total_text', 'label_setting_sec') ? mep_get_option('mep_total_text', 'label_setting_sec') : _e('Total','mage-eventpress'); ?>
|
||||
<span id="usertotal_<?php echo get_the_id(); ?>"></span></span>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id,$event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<p class="mep_no_tickt_notice" id="mep_btn_notice_<?php echo get_the_id(); ?>">
|
||||
<?php echo mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') ? mep_get_option('mep_no_ticket_selected_text', 'label_setting_sec') : _e('No Ticket Selected!','mage-eventpress'); ?>
|
||||
</p>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo esc_attr($post_id); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart_<?php echo get_the_id(); ?>"><?php _e(mep_get_label($post_id,'mep_cart_btn_text','Register This Event'),'mage-eventpress'); ?> </button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
if(!$mep_event_ticket_type){
|
||||
if($qm){$qm=$qm;}else{$qm='';}
|
||||
?><?php do_action('mep_single_page_reg'); ?><?php } } ?>
|
||||
</form><?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_date','mep_ev_datetime');
|
||||
function mep_ev_datetime(){
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $event_meta['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
|
||||
if ( array_key_exists( 'mep_event_more_date', $event_meta ) ) {
|
||||
$more_date = unserialize( $event_meta['mep_event_more_date'][0] );
|
||||
} else {
|
||||
$more_date = array();
|
||||
}
|
||||
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||
$cn = 1;
|
||||
|
||||
if($recurring == 'yes'){
|
||||
|
||||
if(strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)){
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime,'date-text').' '.get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></p>,
|
||||
|
||||
<?php
|
||||
}
|
||||
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($mep_show_upcoming_event == 'yes'){
|
||||
$cnt = 1;
|
||||
}else{
|
||||
$cnt = $cn;
|
||||
}
|
||||
|
||||
if($cn == $cnt){
|
||||
?>
|
||||
|
||||
<p><?php echo get_mep_datetime($_more_date['event_more_start_date'],'date-text').' '.get_mep_datetime($_more_date['event_more_start_time'],'time'); ?> - <?php if($_more_date['event_more_start_date'] != $_more_date['event_more_end_date']){ echo get_mep_datetime($_more_date['event_more_end_date'],'date-text') .' - '; } echo get_mep_datetime($_more_date['event_more_end_time'],'time'); ?></p>
|
||||
<?php
|
||||
$cn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}elseif(is_array($more_date) && sizeof($more_date) > 0){?>
|
||||
<p><?php echo get_mep_datetime($start_datetime,'date-text').' '.get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></p><br>
|
||||
<?php foreach ($more_date as $_more_date) {
|
||||
?>
|
||||
|
||||
<p><?php echo get_mep_datetime($_more_date['event_more_start_date'],'date-text').' '.get_mep_datetime($_more_date['event_more_start_time'],'time'); ?> - <?php if($_more_date['event_more_start_date'] != $_more_date['event_more_end_date']){ echo get_mep_datetime($_more_date['event_more_end_date'],'date-text') .' - '; } echo get_mep_datetime($_more_date['event_more_end_time'],'time'); ?></p><br>
|
||||
<?php
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime,'date-text').' '.get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_date_default_theme','mep_date_in_default_theme');
|
||||
|
||||
function mep_date_in_default_theme(){
|
||||
global $event_meta;
|
||||
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $event_meta['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
|
||||
// echo date('H:i A',strtotime($end_datetime));
|
||||
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||
$cn = 1;
|
||||
|
||||
if ( array_key_exists( 'mep_event_more_date', $event_meta ) ) {
|
||||
$more_date = unserialize( $event_meta['mep_event_more_date'][0] );
|
||||
} else {
|
||||
$more_date = array();
|
||||
}
|
||||
?>
|
||||
<h3><i class="fa fa-calendar"></i> <?php _e( 'Event Schedule Details', 'mage-eventpress' ); ?></h3>
|
||||
<?php
|
||||
echo '<ul>';
|
||||
|
||||
if($recurring == 'yes'){
|
||||
|
||||
if(strtotime(current_time('Y-m-d H:i')) < strtotime($start_datetime)){
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_datetime,'date-text'); ?> <br><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></li>
|
||||
|
||||
<?php
|
||||
}
|
||||
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($mep_show_upcoming_event == 'yes'){
|
||||
$cnt = 1;
|
||||
}else{
|
||||
$cnt = $cn;
|
||||
}
|
||||
if($cn == $cnt){
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($_more_date['event_more_start_date'].' '.$_more_date['event_more_start_time'],'date-text'); ?> <br><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($_more_date['event_more_start_date'].' '.$_more_date['event_more_start_time'],'time'); ?> - <?php if($_more_date['event_more_start_date'] != $_more_date['event_more_end_date']){ echo get_mep_datetime($_more_date['event_more_end_date'].' '.$_more_date['event_more_end_time'],'date-text') .' - '; } echo get_mep_datetime($_more_date['event_more_end_date'].' '.$_more_date['event_more_end_time'],'time'); ?></li>
|
||||
<?php
|
||||
$cn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(is_array($more_date) && sizeof($more_date) > 0){
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> Start : <?php echo get_mep_datetime($start_datetime,'time'); ?> - <?php echo get_mep_datetime($start_datetime,'date-text'); ?><br>
|
||||
<i class="fa fa-calendar"></i> End : <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'time') .' - '; } echo get_mep_datetime($end_datetime,'date-text'); ?></li>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
foreach ($more_date as $_more_date) {
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($_more_date['event_more_start_date'].' '.$_more_date['event_more_start_time'],'date-text'); ?> <br><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($_more_date['event_more_start_date'].' '.$_more_date['event_more_start_time'],'time'); ?> - <?php if($_more_date['event_more_start_date'] != $_more_date['event_more_end_date']){ echo get_mep_datetime($_more_date['event_more_end_date'].' '.$_more_date['event_more_end_time'],'date-text') .' - '; } echo get_mep_datetime($_more_date['event_more_end_date'].' '.$_more_date['event_more_end_time'],'time'); ?></li>
|
||||
<?php
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
?>
|
||||
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_date,'date-text'); ?> <br><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_date,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_date_only','mep_ev_date');
|
||||
function mep_ev_date(){
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $event_meta['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
$cn = 1;
|
||||
$more_date =array($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||
|
||||
|
||||
if($recurring == 'yes'){
|
||||
$event_more_dates = get_post_meta(get_the_id(),'mep_event_more_date',true);
|
||||
foreach($event_more_dates as $md){
|
||||
$more_date[] = $md['event_more_start_date'].' '.$md['event_more_start_time'];
|
||||
}
|
||||
|
||||
foreach($more_date as $ev_date){
|
||||
if(strtotime(current_time('Y-m-d H:i:s')) < strtotime($ev_date)){
|
||||
if($mep_show_upcoming_event == 'yes'){
|
||||
$cnt = 1;
|
||||
}else{
|
||||
$cnt = $cn;
|
||||
}
|
||||
if($cn == $cnt){
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($ev_date,'date-text'); ?></p>
|
||||
<?php
|
||||
$cn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_date,'date-text'); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_time_only','mep_ev_time');
|
||||
function mep_ev_time(){
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $event_meta['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
|
||||
$cn = 1;
|
||||
$more_date =array($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
$mep_show_upcoming_event = get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) ? get_post_meta(get_the_id(), 'mep_show_upcoming_event', true) : 'no';
|
||||
|
||||
|
||||
if($recurring == 'yes'){
|
||||
$event_more_dates = get_post_meta(get_the_id(),'mep_event_more_date',true);
|
||||
foreach($event_more_dates as $md){
|
||||
$more_date[] = $md['event_more_start_date'].' '.$md['event_more_start_time'];
|
||||
}
|
||||
|
||||
foreach($more_date as $ev_date){
|
||||
if(strtotime(current_time('Y-m-d H:i:s')) < strtotime($ev_date)){
|
||||
if($mep_show_upcoming_event == 'yes'){
|
||||
$cnt = 1;
|
||||
}else{
|
||||
$cnt = $cn;
|
||||
}
|
||||
if($cn == $cnt){
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($ev_date,'time'); ?> </p>
|
||||
<?php
|
||||
$cn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime,'time'); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mep_ev_time_ticket($event_meta){
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $event_meta['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
|
||||
mep_get_only_time($start_datetime);
|
||||
}
|
||||
|
||||
function mep_ev_date_ticket($event_meta){
|
||||
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$start_date = $event_meta['event_start_date'][0];
|
||||
$start_time = $event_meta['event_start_time'][0];
|
||||
|
||||
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
||||
|
||||
$end_date = $_more_date['event_end_date'][0];
|
||||
$end_time = $event_meta['event_end_time'][0];
|
||||
//echo date_i18n('d M Y', strtotime($start_datetime));
|
||||
echo get_mep_datetime($start_datetime,'date-text');
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_details','mep_ev_details');
|
||||
|
||||
|
||||
function mep_ev_details(){
|
||||
global $post, $event_meta;
|
||||
// the_content();
|
||||
|
||||
$content_event = get_post($post->ID);
|
||||
$content = $content_event->post_content;
|
||||
$content = apply_filters('the_content', $content);
|
||||
$content = str_replace(']]>', ']]>', $content);
|
||||
echo $content;
|
||||
|
||||
$mep_event_day = get_post_meta($post->ID, 'mep_event_day', true);
|
||||
|
||||
if ( $mep_event_day ){
|
||||
echo '<div class="mep-day-details-section">';
|
||||
?>
|
||||
<h4><?php _e('Event Days','mage-eventpress'); ?></h4>
|
||||
<?php
|
||||
foreach ( $mep_event_day as $field ) {
|
||||
|
||||
?>
|
||||
<div class="mep-day-title">
|
||||
<?php echo $field['mep_day_title']; ?>
|
||||
</div>
|
||||
<div class="mep-day-details">
|
||||
<p><?php echo $field['mep_day_content']; ?></p>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
|
||||
add_action('mep_event_extra_service','mep_ev_extra_serv');
|
||||
|
||||
function mep_ev_extra_serv(){
|
||||
global $post, $product;
|
||||
$pid = $post->ID;
|
||||
$count=1;
|
||||
|
||||
$mep_events_extra_prices = get_post_meta($post->ID, 'mep_events_extra_prices', true);
|
||||
if ( $mep_events_extra_prices ){
|
||||
echo "<h3 class='ex-sec-title'>".mep_get_label($pid,'mep_event_extra_service_text','Extra Service:')."</h3>";
|
||||
?>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left"><?php _e('Name','mage-eventpress'); ?></td>
|
||||
<td align="center"><?php _e('Quantity','mage-eventpress'); ?></td>
|
||||
<td align="center"><?php _e('Price','mage-eventpress'); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($mep_events_extra_prices as $field) {
|
||||
$total_ext = (int) $field['option_qty'];
|
||||
$opt_name = $pid.str_replace(' ', '', $field['option_name']);
|
||||
$tes = (int) get_post_meta($pid,"mep_xtra_$opt_name",true);
|
||||
$ext_left = ($total_ext-$tes);
|
||||
$qty_type = $field['option_qty_type'];
|
||||
?>
|
||||
<tr>
|
||||
<td align="Left"><?php echo $field['option_name']; ?>
|
||||
<div class="xtra-item-left"><?php echo $ext_left; ?> <?php _e('Left','mage-eventpress'); ?></div>
|
||||
</td>
|
||||
<td align="center">
|
||||
|
||||
|
||||
<?php
|
||||
if($ext_left>0){
|
||||
if($qty_type=='dropdown'){ ?>
|
||||
<select name="option_qty[]" id="eventpxtp_<?php //echo $count; ?>" class='extra-qty-box'>
|
||||
<?php for ($i = 0; $i <= $ext_left; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?> <?php echo $field['option_name']; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }else{ ?>
|
||||
<input id="eventpx" <?php //if($ext_left<=0){ echo "disabled"; } ?> size="4" pattern="[0-9]*" inputmode="numeric" type="number" class='extra-qty-box' name='option_qty[]' data-price='<?php echo $field['option_price']; ?>' value='0' min="0" max="<?php echo $ext_left; ?>">
|
||||
<?php } }else{ echo mep_get_option('mep_not_available_text', 'label_setting_sec') ? mep_get_option('mep_not_available_text', 'label_setting_sec') : _e('Not Available','mage-eventpress'); } ?>
|
||||
</td>
|
||||
<td align="center"><?php echo wc_price($field['option_price']); if($ext_left>0){ ?>
|
||||
<p style="display: none;" class="price_jq"><?php echo $field['option_price']; ?></p>
|
||||
<input type="hidden" name='option_name[]' value='<?php echo $field['option_name']; ?>'>
|
||||
<input type="hidden" name='option_price[]' value='<?php echo $field['option_price']; ?>'>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$count++;
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -1,177 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_location','mep_ev_location');
|
||||
add_action('mep_event_location_ticket','mep_ev_location_ticket');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mep_ev_location_cart($event_id,$event_meta){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
|
||||
echo get_term_meta( $org_id, 'org_location', true ); ?>,<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_state', true )){ echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?php } if(get_term_meta( $org_id, 'org_country', true )){ ?> <?php echo get_term_meta( $org_id, 'org_country', true ); ?> <?php }
|
||||
}else{
|
||||
?>
|
||||
<?php echo $event_meta['mep_location_venue'][0]; ?>, <?php if($event_meta['mep_street'][0]){ ?><?php echo $event_meta['mep_street'][0]; ?>, <?php } if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function mep_ev_location_ticket($event_id,$event_meta){
|
||||
$location_sts = get_post_meta($event_id,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $event_id, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
?>
|
||||
<?php echo get_term_meta( $org_id, 'org_location', true ); ?>,
|
||||
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><?php echo get_term_meta( $org_id, 'org_street', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <?php echo get_term_meta( $org_id, 'org_city', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <?php echo get_term_meta( $org_id, 'org_state', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>, <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_country', true )){ ?> <?php echo get_term_meta( $org_id, 'org_country', true ); ?> <?php }
|
||||
}else{
|
||||
?>
|
||||
<?php echo $event_meta['mep_location_venue'][0]; ?>,
|
||||
<?php if($event_meta['mep_street'][0]){ ?><?php echo $event_meta['mep_street'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_city'][0]){ ?> <?php echo $event_meta['mep_city'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_state'][0]){ ?> <?php echo $event_meta['mep_state'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_postcode'][0]){ ?> <?php echo $event_meta['mep_postcode'][0]; ?>, <?php } ?>
|
||||
<?php if($event_meta['mep_country'][0]){ ?> <?php echo $event_meta['mep_country'][0]; ?> <?php }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function mep_ev_location(){
|
||||
global $post,$event_meta;
|
||||
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
?>
|
||||
<p><?php echo get_term_meta( $org_id, 'org_location', true ); ?>,</p>
|
||||
<?php if(get_term_meta( $org_id, 'org_street', true )){ ?><p><?php echo get_term_meta( $org_id, 'org_street', true ); ?>,</p> <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_city', true )){ ?> <p><?php echo get_term_meta( $org_id, 'org_city', true ); ?>,</p> <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_state', true )){ ?> <p><?php echo get_term_meta( $org_id, 'org_state', true ); ?>,</p> <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_postcode', true )){ ?> <p><?php echo get_term_meta( $org_id, 'org_postcode', true ); ?>,</p> <?php } ?>
|
||||
<?php if(get_term_meta( $org_id, 'org_country', true )){ ?> <p><?php echo get_term_meta( $org_id, 'org_country', true ); ?></p> <?php }
|
||||
}else{
|
||||
?>
|
||||
<p><?php echo $event_meta['mep_location_venue'][0]; ?>,</p>
|
||||
<?php if($event_meta['mep_street'][0]){ ?><p><?php echo $event_meta['mep_street'][0]; ?>,</p> <?php } ?>
|
||||
<?php if($event_meta['mep_city'][0]){ ?> <p><?php echo $event_meta['mep_city'][0]; ?>,</p> <?php } ?>
|
||||
<?php if($event_meta['mep_state'][0]){ ?> <p><?php echo $event_meta['mep_state'][0]; ?>,</p> <?php } ?>
|
||||
<?php if($event_meta['mep_postcode'][0]){ ?> <p><?php echo $event_meta['mep_postcode'][0]; ?>,</p> <?php } ?>
|
||||
<?php if($event_meta['mep_country'][0]){ ?> <p><?php echo $event_meta['mep_country'][0]; ?></p> <?php }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('mep_event_location_venue','mep_ev_venue');
|
||||
function mep_ev_venue(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_location', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_location_venue'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_street','mep_ev_street');
|
||||
function mep_ev_street(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_street', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_street'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_city','mep_ev_city');
|
||||
function mep_ev_city(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_city', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_city'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_state','mep_ev_state');
|
||||
function mep_ev_state(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_state', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_state'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_postcode','mep_ev_postcode');
|
||||
function mep_ev_postcode(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_postcode', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_postcode'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action('mep_event_location_country','mep_ev_country');
|
||||
function mep_ev_country(){
|
||||
global $post,$event_meta;
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
echo "<span>".get_term_meta( $org_id, 'org_country', true )."</span>";
|
||||
}else{
|
||||
?>
|
||||
<span><?php echo $event_meta['mep_country'][0]; ?></span>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
<?php
|
||||
|
||||
add_action('mep_event_ticket_types','mep_ev_ticket_type');
|
||||
|
||||
function mep_ev_ticket_type(){
|
||||
global $post, $product,$event_meta;
|
||||
$pid = $post->ID;
|
||||
$count=1;
|
||||
ob_start();
|
||||
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
|
||||
if($mep_event_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;
|
||||
foreach ( $mep_event_ticket_type as $field ) {
|
||||
$qty_t_type = $field['option_qty_t_type'];
|
||||
$total_quantity = isset($field['option_qty_t']) ? $field['option_qty_t'] : 0;
|
||||
$total_resv_quantity = isset($field['option_rsv_t']) ? $field['option_rsv_t'] : 0;
|
||||
$total_sold = (int) mep_ticket_type_sold(get_the_id(),$field['option_name_t'],'');
|
||||
$total_left = (int) $total_quantity - ((int) $total_sold + (int) $total_resv_quantity);
|
||||
?>
|
||||
<tr>
|
||||
<td align="Left"><?php echo $field['option_name_t'];
|
||||
global $wpdb;
|
||||
echo old_order_check($pid, get_current_user_id(), $field['option_name_t'])
|
||||
?>
|
||||
<?php if($mep_available_seat=='on'){ ?><div class="xtra-item-left"><?php echo max($total_left,0); ?> <?php _e('Left','mage-eventpress'); ?></div> <?php } ?>
|
||||
</td>
|
||||
<td class="ticket-qty">
|
||||
<span class="tkt-qty">
|
||||
<?php echo mep_get_option('mep_ticket_qty_text', 'label_setting_sec') ? mep_get_option('mep_ticket_qty_text', 'label_setting_sec') : _e('Ticket Qty:','mage-eventpress'); ?>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
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'>
|
||||
|
||||
<?php
|
||||
if (function_exists('old_order_check')){
|
||||
do_action('min_max_data_execute', $field, $total_left, $pid, get_current_user_id());
|
||||
}else{
|
||||
for ($i = 0; $i <= $total_left; $i++) { ?>
|
||||
<option value="<?php echo $i; ?>"><?php echo $i; ?> <?php _e('Ticket','mage-eventpress'); ?></option>
|
||||
<?php }} ?>
|
||||
</select>
|
||||
<?php }else{
|
||||
?>
|
||||
<input id="eventpxtp_<?php echo $count; ?>" <?php //if($ext_left<=0){ echo "disabled"; } ?> size="4" pattern="[0-9]*" inputmode="numeric" type="number" class='extra-qty-box etp' name='option_qty[]' data-price='<?php echo $field['option_price_t']; ?>' value='0' min="0" max="<?php echo max($total_left,0); ?>">
|
||||
<?php } }else{ _e('No Seat Available','mage-eventpress'); } ?>
|
||||
</td>
|
||||
<td class="ticket-price"><span class="tkt-pric">
|
||||
|
||||
<?php echo mep_get_option('mep_per_ticket_price_text', 'label_setting_sec') ? mep_get_option('mep_per_ticket_price_text', 'label_setting_sec') : _e('Per Ticket Price:','mage-eventpress'); ?>
|
||||
</span> <strong><?php echo wc_price($field['option_price_t']); ?></strong>
|
||||
<?php if($total_left>0){ ?>
|
||||
<p style="display: none;" class="price_jq"><?php echo $field['option_price_t']; ?></p>
|
||||
<input type="hidden" name='option_name[]' value='<?php echo $field['option_name_t']; ?>'>
|
||||
<input type="hidden" name='option_price[]' value='<?php echo $field['option_price_t']; ?>'>
|
||||
<input type="hidden" name='max_qty[]' value='<?php echo $field['option_max_qty']; ?>'>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class='user-innnf'> <div class="user-info-sec">
|
||||
<div id="dadainfo_<?php echo $count; ?>" class="dada-info"></div></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $count++; } ?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_ticket_type_list', $content,$pid,$event_meta);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
<?php
|
||||
function mep_output_add_to_cart_custom_fields() {
|
||||
global $post,$event_meta,$total_book;
|
||||
|
||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||
$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);
|
||||
|
||||
if($total_left>0){
|
||||
do_action('mep_event_ticket_types');
|
||||
do_action('mep_event_extra_service');
|
||||
}else{
|
||||
?>
|
||||
<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'); ?>
|
||||
</span>
|
||||
<?php
|
||||
do_action('mep_after_no_seat_notice');
|
||||
}
|
||||
}
|
||||
add_action( 'mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10 );
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_faq','mep_faq_part');
|
||||
function mep_faq_part(){
|
||||
global $post;
|
||||
$mep_event_faq = get_post_meta($post->ID, 'mep_event_faq', true);
|
||||
if ( $mep_event_faq ) {
|
||||
?>
|
||||
<div class="mep-event-faq-part">
|
||||
<h4><?php _e('Event F.A.Q','mage-eventpress'); ?></h4>
|
||||
<div id='mep-event-accordion' class="">
|
||||
<?php
|
||||
foreach ( $mep_event_faq as $field ) {
|
||||
?>
|
||||
<h3><?php if($field['mep_faq_title'] != '') echo esc_attr( $field['mep_faq_title'] ); ?></h3>
|
||||
<p><?php if($field['mep_faq_content'] != '') echo esc_attr( $field['mep_faq_content'] ); ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_map','ggmap');
|
||||
function ggmap(){
|
||||
global $post,$event_meta,$user_api;
|
||||
$map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||
$location_sts = get_post_meta($post->ID,'mep_org_address',true);
|
||||
|
||||
|
||||
if($location_sts){
|
||||
$org_arr = get_the_terms( $post->ID, 'mep_org' );
|
||||
$org_id = $org_arr[0]->term_id;
|
||||
$lat = get_term_meta( $org_id, 'latitude', true );
|
||||
$lon = get_term_meta( $org_id, 'longitude', true );
|
||||
}else{
|
||||
$lat = $event_meta['latitude'][0];
|
||||
$lon = $event_meta['longitude'][0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($map_type=='iframe'){
|
||||
?>
|
||||
<div class="mep-gmap-sec">
|
||||
<iframe id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo mep_get_event_locaion_item($post->ID,'mep_location_venue'); ?>&t=&z=19&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" style='width: 100%;min-height: 250px;'></iframe>
|
||||
</div>
|
||||
<?php
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($event_meta['mep_sgm'][0]){ if($user_api){ ?>
|
||||
<div class="mep-gmap-sec">
|
||||
<div id="map" class='mep_google_map'></div>
|
||||
</div>
|
||||
<script>
|
||||
var map;
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>},
|
||||
zoom: 17
|
||||
});
|
||||
marker = new google.maps.Marker({
|
||||
map: map,
|
||||
draggable: false,
|
||||
animation: google.maps.Animation.DROP,
|
||||
position: {lat: <?php echo $lat; ?>, lng: <?php echo $lon; ?>}
|
||||
});
|
||||
marker.addListener('click', toggleBounce);
|
||||
}
|
||||
function toggleBounce() {
|
||||
if (marker.getAnimation() !== null) {
|
||||
marker.setAnimation(null);
|
||||
} else {
|
||||
marker.setAnimation(google.maps.Animation.BOUNCE);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap"
|
||||
async defer></script>
|
||||
<?php } } } }?>
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_organizer','mep_ev_org');
|
||||
|
||||
|
||||
function mep_ev_org(){
|
||||
global $author_terms;
|
||||
|
||||
if($author_terms){ ?><p> <?php echo mep_get_option('mep_by_text', 'label_setting_sec') ? mep_get_option('mep_by_text', 'label_setting_sec') : _e('By:','mage-eventpress'); ?> <a href="<?php echo get_term_link( $author_terms[0]->term_id, 'mep_org' ); ?>"><?php echo $author_terms[0]->name; ?></a></p><?php }
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_price','mep_ev_price');
|
||||
|
||||
|
||||
function mep_ev_price(){
|
||||
global $event_meta;
|
||||
if($event_meta['_price'][0]>0){
|
||||
if($event_meta['mep_price_label'][0]){
|
||||
?>
|
||||
<h3><?php echo $event_meta['mep_price_label'][0]; ?>: </h3>
|
||||
<?php }
|
||||
echo wc_price($event_meta['_price'][0]);
|
||||
|
||||
?>
|
||||
<?php } else{ echo ''; }
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_social_share','mep_ev_social_share');
|
||||
|
||||
|
||||
function mep_ev_social_share(){
|
||||
global $post;
|
||||
$post_id = $post->ID;
|
||||
?>
|
||||
<div class="mep-event-meta">
|
||||
<?php _e(mep_get_label($post_id,'mep_share_text','Share This Event:'),'mage-eventpress'); ?> <?php mep_social_share(); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
require_once(dirname(__FILE__) . "/thumbnail.php");
|
||||
require_once(dirname(__FILE__) . "/title.php");
|
||||
require_once(dirname(__FILE__) . "/organizer.php");
|
||||
require_once(dirname(__FILE__) . "/price.php");
|
||||
require_once(dirname(__FILE__) . "/total_seat.php");
|
||||
require_once(dirname(__FILE__) . "/add_calender.php");
|
||||
require_once(dirname(__FILE__) . "/google_map.php");
|
||||
require_once(dirname(__FILE__) . "/social_share.php");
|
||||
require_once(dirname(__FILE__) . "/event_date.php");
|
||||
require_once(dirname(__FILE__) . "/event_details.php");
|
||||
require_once(dirname(__FILE__) . "/event_location.php");
|
||||
require_once(dirname(__FILE__) . "/event_add_cart.php");
|
||||
require_once(dirname(__FILE__) . "/event_ticket_type_extra_service.php");
|
||||
require_once(dirname(__FILE__) . "/event_ticket_type.php");
|
||||
require_once(dirname(__FILE__) . "/event_extra_service.php");
|
||||
require_once(dirname(__FILE__) . "/faq.php");
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_thumbnail','mep_thumbnail');
|
||||
|
||||
function mep_thumbnail(){
|
||||
?>
|
||||
<div class="mep-event-thumbnail">
|
||||
<?php the_post_thumbnail('full'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?php
|
||||
|
||||
add_action('mep_event_title','mep_ev_title');
|
||||
function mep_ev_title(){
|
||||
?>
|
||||
<h2><?php the_title(); ?></h2>
|
||||
<?php
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
add_action('mep_event_seat','mep_ev_seat');
|
||||
function mep_ev_seat(){
|
||||
global $post,$event_meta;
|
||||
$recurring = get_post_meta(get_the_id(), 'mep_enable_recurring', true) ? get_post_meta(get_the_id(), 'mep_enable_recurring', true) : 'no';
|
||||
if($recurring == 'no'){
|
||||
$mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true);
|
||||
if(array_key_exists('mep_available_seat', $event_meta)){
|
||||
$mep_available_seat = $event_meta['mep_available_seat'][0];
|
||||
}else{
|
||||
$mep_available_seat = 'on';
|
||||
}
|
||||
if($mep_event_ticket_type){
|
||||
$total_seat = mep_event_total_seat(get_the_id(),'total');
|
||||
$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);
|
||||
?>
|
||||
<h5><strong><?php echo mep_get_option('mep_total_seat_text', 'label_setting_sec') ? mep_get_option('mep_total_seat_text', 'label_setting_sec') : _e('Total Seat:','mage-eventpress'); ?></strong> <?php echo $total_seat; if($mep_available_seat=='on'){ ?> (<strong><?php echo max($total_left,0); ?></strong> <?php _e('Left','mage-eventpress'); ?>)<?php } ?></h5>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue