version 2.5.0 released

This commit is contained in:
magepeopleteam 2019-03-25 10:17:44 +00:00
parent c5d51d400e
commit 496323ebdd
8 changed files with 364 additions and 211 deletions

View File

@ -129,7 +129,18 @@ class MAGE_Events_Setting_Controls {
'12' => '12 Hour',
'24' => '24 Hour'
)
)
),
array(
'name' => 'mep_event_direct_checkout',
'label' => __( 'Redirect Checkout after Booking?', 'mage-eventpress' ),
'desc' => __( 'If you want to go direct checkout page after booking an event please enable/disable this.', 'mage-eventpress' ),
'type' => 'select',
'default' => 'yes',
'options' => array(
'yes' => 'Enable',
'no' => 'Disable'
)
)
),
'email_setting_sec' => array(

146
inc/mep_addon_list.php Normal file
View File

@ -0,0 +1,146 @@
<?php
add_action( 'admin_menu', 'mep_addon_list_menu',10,99);
function mep_addon_list_menu() {
add_submenu_page('edit.php?post_type=mep_events', __('Get Addon','wbtm-menu'), __('<span style="color:red">Get Addons</span>','mage-eventpress'), 'manage_options', 'mep_all_addon_list', 'mep_addon_list_sec');
}
function mep_addon_list_sec(){
?>
<style type="text/css">
.addon_list_sec .mep_addon_list li img{
max-width: 100%;
width: auto;
}
.addon_list_sec .mep_addon_list li {
border: 1px solid #ddd!important;
display: inline-block!important;
float: left;
margin: 10px!important;
min-height: 405px;
padding: 0px;
position: relative;
text-align: center;
vertical-align: top;
width: 31.2%!important;
box-shadow: 3px 4px 5px #d9e1e7;
background: #fff;
overflow: hidden;
}
.addon_list_sec .mep_addon_list li a {
display: block;
background: #0000b5;
color: #fff;
width: 95%;
margin: 0 auto;
padding: 10px;
text-decoration: none;
font-size: 15px;
position: absolute;
bottom: 0;
left: 0;
right: auto;
}
.addon_list_sec .mep_addon_list li h3 {
margin-top: 10px;
}
.addon_list_sec .mep_addon_list li p {
padding: 0 15px;
font-size: 12px;
}
.addon_list_sec .mep_addon_list li h4 {
background: #e74635;
color: #fff;
font-size: 20px;
padding: 10px;
width: 50px;
position: absolute;
bottom: 40%;
top: auto;
}
</style>
<?php
$addon_list = array(
array(
'name' => 'WooCommerce Event Booking Manager PRO',
'price' => '$30',
'banner' => 'https://mage-people.com/wp-content/uploads/2018/06/banner_EVENT.png',
'url' => 'https://mage-people.com/product/mage-woo-event-booking-manager-pro/',
'excerpt' => 'A Complete Event Solution forWooCommerce with Lots of Premium features Powered by WordPress',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Coupon Code Addon',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/02/banner_EVENT_Coupon.png',
'url' => 'https://mage-people.com/product/woocommerce-event-coupon-code-addon/',
'excerpt' => 'WooCommerce Event Manager is a great solution managing events and this is a simple solution for managing coupon code for specific events to specific customer',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Waitlist Addon',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/02/banner_WaitList.png',
'url' => 'https://mage-people.com/product/woocommerce-event-waitlist-addon/',
'excerpt' => 'WooCommerce Event Waitlist Addon, It will work with Event plugin, Once event ticket available quantity will finish, Waitlist plugin will be activated and the subscriber can join the waitlist, admin can send email to the user for next free slot.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Waitlist Addon',
'price' => '$20',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_calender-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-calendar-addon/',
'excerpt' => 'Showcase your events into an awesome calendar by this Addon. Just installed this plugin and use the shortcode to show the calendar anywhere in your website.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event: Book an Event From Dashboard',
'price' => '$20',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_order_dashboard-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-book-an-event-from-dashboard/',
'excerpt' => 'This addon will add a new feature so you can book any event from the WordPress Dashboard.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'Woocommerce Event: User Registration Form Position',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_user_reg-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-user-registration-form-position/',
'excerpt' => 'This addon adds this feature, You can choose where the event Attendee/user form will display into the event details page or into the checkout page',
'btn_txt' => 'Get Now'
),
array(
'name' => 'Woocommerce Event: Duplicator Addon',
'price' => '$5',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_duplicator-1-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-duplicator-addon/',
'excerpt' => 'This addon will add Duplicator feature into Woocommerce Event Plugin. So you can easily duplicate any event and re-use.',
'btn_txt' => 'Get Now'
)
);
echo '<div class="addon_list_sec"><ul class="mep_addon_list">';
foreach ($addon_list as $list) {
echo '<li>';
echo '<img src='.$list['banner'].'>';
echo '<h3>'.$list['name'].'</h3>';
echo '<p>'.$list['excerpt'].'</p>';
echo '<h4>'.$list['price'].'</h4>';
echo '<a href='.$list['url'].'>'.$list['btn_txt'].'</a>';
echo '</li>';
}
echo '</ul></div>';
}

View File

@ -2,34 +2,37 @@
if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
add_action( 'add_meta_boxes', 'mep_event_meta_box_add' );
function mep_event_meta_box_add(){
add_meta_box( 'mep-event-meta', __('Event Venue','mage-eventpress'), 'mep_event_venue_meta_box_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-price', __('Event Price (Event Base price, It will not work if you add Event Ticket type Price)','mage-eventpress'), 'mep_event_price_meta_box_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-extra-price', __('Event Extra Service (Extra Service as Product that you can sell and it is not included on event package)','mage-eventpress'), 'mep_event_extra_price_option', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-ticket-type', __('Event Ticket Type','mage-eventpress'), 'mep_event_ticket_type', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-date', __('Event Date & Time','mage-eventpress'), 'mep_event_date_meta_box_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-emails', __('Event Email text','mage-eventpress'), 'mep_event_email_meta_box_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-template', __('Template','mage-eventpress'), 'mep_event_template_meta_box_cb', 'mep_events', 'side', 'low' );
add_meta_box( 'mep-event-faq-box', __('Event F.A.Q','mage-eventpress'), 'mep_event_faq_meta_box_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-reg-on-off', __('Registration Status','mage-eventpress'), 'mep_event_change_reg_status_cb', 'mep_events', 'side', 'low' );
add_meta_box( 'mep-event-available-set-on-off', __('Show Available Seat Count?','mage-eventpress'), 'mep_event_available_seat_cb', 'mep_events', 'side', 'low' );
add_meta_box( 'mep-event-day-details', __('Event Daywise Details','mage-eventpress'), 'mep_event_day_details_cb', 'mep_events', 'normal', 'high' );
add_meta_box( 'mep-event-reg-on-off', __('Registration Status','mage-eventpress'), 'mep_event_change_reg_status_cb', 'mep_events', 'side', 'low' );
add_meta_box( 'mep-event-available-set-on-off', __('Show Available Seat Count?','mage-eventpress'), 'mep_event_available_seat_cb', 'mep_events', 'side', 'low' );
add_meta_box( 'mep-event-day-details', __('Event Daywise Details','mage-eventpress'), 'mep_event_day_details_cb', 'mep_events', 'normal', 'high' );
}
function mep_event_change_reg_status_cb($post){
@ -1144,12 +1147,6 @@ elseif ( empty($mdate) && $oldm )
$update_reg_name = update_post_meta( $pid, 'mep_full_name', $mep_full_name);
$update_reg_email = update_post_meta( $pid, 'mep_reg_email', $mep_reg_email);
$update_reg_phone = update_post_meta( $pid, 'mep_reg_phone', $mep_reg_phone);
@ -1330,9 +1327,9 @@ $event_meta = get_post_custom($values['ea_event_id'][0]);
$mep_form_builder_data = get_post_meta($values['ea_event_id'][0], 'mep_form_builder_data', true);
if ( $mep_form_builder_data ) {
foreach ( $mep_form_builder_data as $_field ) {
if ( $mep_user_ticket_type[$iu] != '' ) :
$user[$iu][$_field['mep_fbc_id']] = stripslashes( strip_tags( $_POST[$_field['mep_fbc_id']][$iu] ) );
endif;
// if ( $mep_user_ticket_type[$iu] != '' ) :
// $user[$iu][$_field['mep_fbc_id']] = stripslashes( strip_tags( $_POST[$_field['mep_fbc_id']][$iu] ) );
// endif;
?>
<div class='sec'>

View File

@ -1,194 +1,72 @@
<?php
function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id, $variation_id ){
$tp = get_post_meta($product_id,'_price',true);
$new = array();
$user = array();
if(isset($_POST['mep_event_location_cart'])){
$event_cart_location = $_POST['mep_event_location_cart'];
}else{ $event_cart_location = ""; }
if(isset($_POST['mep_event_date_cart'])){
$event_cart_date = $_POST['mep_event_date_cart'];
}else{ $event_cart_date = ""; }
if(isset($_POST['event_addt_price'])){
$checked = $_POST['event_addt_price'];
}else{ $checked=""; }
if(isset($_POST['mep_event_location_cart'])){
$event_cart_location = $_POST['mep_event_location_cart'];
}else{ $event_cart_location = ""; }
if(isset($_POST['option_name'])){
$names = $_POST['option_name'];
}else{ $names=array(); }
if(isset($_POST['option_qty'])){
$qty = $_POST['option_qty'];
}else{ $qty=""; }
if(isset($_POST['mep_event_date_cart'])){
$event_cart_date = $_POST['mep_event_date_cart'];
}else{ $event_cart_date = ""; }
if(isset($_POST['option_price'])){
$price = $_POST['option_price'];
}else{ $price=""; }
if(isset($_POST['event_addt_price'])){
$checked = $_POST['event_addt_price'];
}else{ $checked=""; }
if(isset($_POST['option_name'])){
$names = $_POST['option_name'];
}else{ $names=array(); }
if(isset($_POST['option_qty'])){
$qty = $_POST['option_qty'];
}else{ $qty=""; }
if(isset($_POST['option_price'])){
$price = $_POST['option_price'];
}else{ $price=""; }
if(isset($_POST['user_name'])){
$mep_user_name = $_POST['user_name'];
}else{ $mep_user_name=""; }
if(isset($_POST['user_email'])){
$mep_user_email = $_POST['user_email'];
}else{ $mep_user_email=""; }
if(isset($_POST['user_phone'])){
$mep_user_phone = $_POST['user_phone'];
}else{ $mep_user_phone=""; }
if(isset($_POST['user_address'])){
$mep_user_address = $_POST['user_address'];
}else{ $mep_user_address=""; }
if(isset($_POST['gender'])){
$mep_user_gender = $_POST['gender'];
}else{ $mep_user_gender=""; }
if(isset($_POST['tshirtsize'])){
$mep_user_tshirtsize = $_POST['tshirtsize'];
}else{ $mep_user_tshirtsize=""; }
if(isset($_POST['user_company'])){
$mep_user_company = $_POST['user_company'];
}else{ $mep_user_company=""; }
if(isset($_POST['user_designation'])){
$mep_user_desg = $_POST['user_designation'];
}else{ $mep_user_desg=""; }
if(isset($_POST['user_website'])){
$mep_user_website = $_POST['user_website'];
}else{ $mep_user_website=""; }
if(isset($_POST['vegetarian'])){
$mep_user_vegetarian = $_POST['vegetarian'];
}else{ $mep_user_vegetarian=""; }
if(isset($_POST['ticket_type'])){
$mep_user_ticket_type = $_POST['ticket_type'];
}else{ $mep_user_ticket_type=""; }
if(isset($_POST['mep_ucf'])){
$mep_user_cfd = $_POST['mep_ucf'];
}else{
$mep_user_cfd = "";
}
$count_user = count($mep_user_name);
$count = count( $names );
if(isset($_POST['option_name'])){
for ( $i = 0; $i < $count; $i++ ) {
if ( $names[$i] != '' ) :
$new[$i]['option_name'] = stripslashes( strip_tags( $names[$i] ) );
endif;
if ( $price[$i] != '' ) :
$new[$i]['option_price'] = stripslashes( strip_tags( $price[$i] ) );
endif;
if ( $qty[$i] != '' ) :
$new[$i]['option_qty'] = stripslashes( strip_tags( $qty[$i] ) );
endif;
$opttprice = ($price[$i]*$qty[$i]);
$tp = ($tp+$opttprice);
}
}
for ( $iu = 0; $iu < $count_user; $iu++ ) {
if ( $mep_user_name[$iu] != '' ) :
$user[$iu]['user_name'] = stripslashes( strip_tags( $mep_user_name[$iu] ) );
endif;
if ( $mep_user_email[$iu] != '' ) :
$user[$iu]['user_email'] = stripslashes( strip_tags( $mep_user_email[$iu] ) );
endif;
if ( $mep_user_phone[$iu] != '' ) :
$user[$iu]['user_phone'] = stripslashes( strip_tags( $mep_user_phone[$iu] ) );
endif;
if ( $mep_user_address[$iu] != '' ) :
$user[$iu]['user_address'] = stripslashes( strip_tags( $mep_user_address[$iu] ) );
endif;
if ( $mep_user_gender[$iu] != '' ) :
$user[$iu]['user_gender'] = stripslashes( strip_tags( $mep_user_gender[$iu] ) );
endif;
if ( $mep_user_tshirtsize[$iu] != '' ) :
$user[$iu]['user_tshirtsize'] = stripslashes( strip_tags( $mep_user_tshirtsize[$iu] ) );
endif;
if ( $mep_user_company[$iu] != '' ) :
$user[$iu]['user_company'] = stripslashes( strip_tags( $mep_user_company[$iu] ) );
endif;
if ( $mep_user_desg[$iu] != '' ) :
$user[$iu]['user_designation'] = stripslashes( strip_tags( $mep_user_desg[$iu] ) );
endif;
if ( $mep_user_website[$iu] != '' ) :
$user[$iu]['user_website'] = stripslashes( strip_tags( $mep_user_website[$iu] ) );
endif;
if ( $mep_user_vegetarian[$iu] != '' ) :
$user[$iu]['user_vegetarian'] = stripslashes( strip_tags( $mep_user_vegetarian[$iu] ) );
endif;
if ( $mep_user_ticket_type[$iu] != '' ) :
$user[$iu]['user_ticket_type'] = stripslashes( strip_tags( $mep_user_ticket_type[$iu] ) );
endif;
$mep_form_builder_data = get_post_meta($product_id, 'mep_form_builder_data', true);
if ( $mep_form_builder_data ) {
foreach ( $mep_form_builder_data as $_field ) {
$user[$iu][$_field['mep_fbc_id']] = stripslashes( strip_tags( $_POST[$_field['mep_fbc_id']][$iu] ) );
}
}
}
if(isset($_POST['mep_event_ticket_type'])){
$ttp = $_POST['mep_event_ticket_type'];
$ttpqt = $_POST['tcp_qty'];
$ticket_type = mep_get_order_info($ttp,1);
$ticket_type_price = (mep_get_order_info($ttp,0)*$ttpqt);
$cart_item_data['event_ticket_type'] = $ticket_type;
$ttp = $_POST['mep_event_ticket_type'];
$ttpqt = $_POST['tcp_qty'];
$ticket_type = mep_get_order_info($ttp,1);
$ticket_type_price = (mep_get_order_info($ttp,0)*$ttpqt);
$cart_item_data['event_ticket_type'] = $ticket_type;
$cart_item_data['event_ticket_price'] = $ticket_type_price;
$cart_item_data['event_ticket_qty'] = $ttpqt;
$tp = $tp+$ticket_type_price;
$cart_item_data['event_ticket_qty'] = $ttpqt;
$tp = $tp+$ticket_type_price;
}
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
if($form_position=='details_page'){
$user = mep_save_attendee_info_into_cart($product_id);
}else{
$user = '';
}
$cart_item_data['event_extra_option'] = $new;
$cart_item_data['event_user_info'] = $user;
@ -199,6 +77,7 @@ if(isset($_POST['mep_event_ticket_type'])){
$cart_item_data['event_cart_location'] = $event_cart_location;
$cart_item_data['event_cart_date'] = $event_cart_date;
return $cart_item_data;
}
add_filter( 'woocommerce_add_cart_item_data', 'mep_add_custom_fields_text_to_cart_item', 10, 3);
@ -225,12 +104,13 @@ if (get_post_type($eid) == 'mep_events') {
function mep_display_custom_fields_text_cart( $item_data, $cart_item ) {
$mep_events_extra_prices = $cart_item['event_extra_option'];
// print_r($cart_item);
if($mep_events_extra_prices){
echo "<ul class='event-custom-price'>";
?>
<li><?php _e('Event Date','mage-eventpress'); ?>: <?php echo $cart_item['event_cart_date']; ?></li>
<li><?php _e('Event Location','mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; ?></li>
<li><?php _e('Event Location','mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; //echo $cart_item['event_ticket_type']; ?></li>
<?php
if($mep_events_extra_prices){
foreach ( $mep_events_extra_prices as $field ) {
if($field['option_qty']>0){
?>
@ -253,17 +133,25 @@ add_filter( 'woocommerce_get_item_data', 'mep_display_custom_fields_text_cart',
function mep_add_custom_fields_text_to_order_items( $item, $cart_item_key, $values, $order ) {
$eid = $values['event_id'];
$eid = $values['event_id'];
if (get_post_type($eid) == 'mep_events') {
$mep_events_extra_prices = $values['event_extra_option'];
$event_user_info = $values['event_user_info'];
$event_ticket_type = $values['event_ticket_type'];
$event_ticket_price = $values['event_ticket_price'];
$event_ticket_qty = $values['event_ticket_qty'];
$product_id = $values['product_id'];
$cart_location = $values['event_cart_location'];
$cart_date = $values['event_cart_date'];
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
if($form_position=='details_page'){
$event_user_info = $values['event_user_info'];
}else{
$event_user_info = mep_save_attendee_info_into_cart($eid);
}
$item->add_meta_data('Date',$cart_date);
$item->add_meta_data('Location',$cart_location);
@ -299,17 +187,15 @@ $tck_name = $product_id.str_replace(' ', '', $event_ticket_type);
$tesqt = get_post_meta($product_id,"mep_xtra_$tck_name",true);
$ntesqt = ($tesqt+$event_ticket_qty);
update_post_meta( $product_id, "mep_xtra_$tck_name",$ntesqt);
$item->add_meta_data('event_ticket_type','ticket_typs');
$item->add_meta_data('_event_ticket_type','ticket_typs');
}else{
$item->add_meta_data('event_ticket_type','normal');
$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('_event_service_info',$mep_events_extra_prices);
$item->add_meta_data('event_id',$eid);
$item->add_meta_data('no_of_ticket',count($event_user_info));
}
}

View File

@ -216,22 +216,16 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
?>
<div class='mep_event_<?php echo $style; ?>_item mix <?php if($tt){ echo $tt[0]->slug; } ?> <?php if($torg){ echo $torg[0]->slug; } ?>'>
<div class="mep_list_thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('full'); ?></a>
<div class="mep-ev-start-date">
<div class="mep-day"><?php echo date('d', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
<div class="mep-month"><?php echo date('M', strtotime($event_meta['mep_event_start_date'][0])); ?></div>
</div>
<?php if($available_seat==0){ do_action('mep_show_waitlist_label'); } ?>
</div>
<div class="mep_list_event_details"><a href="<?php the_permalink(); ?>">
<div class="mep-list-header">
<h2 class='mep_list_title'><?php the_title(); ?></h2>
<?php if($available_seat==0){ do_action('mep_show_waitlist_label'); } ?>
<h3 class='mep_list_date'> <?php if($show_price=='yes'){ echo $show_price_label." ".mep_event_list_price(get_the_id()); }?><!-- <i class="fa fa-calendar"></i> <?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo $event_meta['mep_event_end_date'][0]; ?> --></h3>
</div>
@ -544,5 +538,4 @@ if($pagination=='yes'){
<?php
$content = ob_get_clean();
return $content;
}
}

View File

@ -151,8 +151,7 @@ https://www.youtube.com/watch?v=IyUCCIeS6P8
**CHECKOUT OUR OTHER PRODUCTS**
**CHECKOUR OUR OTHER PLUGINS**
[Multipurpose Ticket Booking Manager (Bus/Train/Ferry/Boat/Shuttle)
](https://wordpress.org/plugins/bus-booking-manager/)
[Bus Booking Manager](https://wordpress.org/plugins/bus-booking-manager/)
[Bus Ticket Booking with Seat Reservation](https://wordpress.org/plugins/bus-ticket-booking-with-seat-reservation/)
[Woocommerce Events Manager](https://wordpress.org/plugins/mage-eventpress/)

View File

@ -63,13 +63,24 @@ $values = get_post_custom(get_the_id());
<table>
<tr>
<td colspan="2" align="center">
<center>
<?php echo get_avatar( $values['ea_email'][0], 128 ); ?>
<h2><?php echo $values['ea_name'][0]; ?></h2>
<!-- <h3>ID: <?php //echo $values['ea_user_id'][0].$values['ea_order_id'][0].get_the_id(); ?></h3> -->
<div id="bcTarget"></div>
<img src="https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=<?php echo $values['ea_user_id'][0].$values['ea_order_id'][0].get_the_id(); ?>&choe=UTF-8" title="Pin QR Code" />
<h4><?php echo $values['ea_event_name'][0]; ?></h4>
</center>
</td>
</tr>
<tr>
<td><?php _e('Ticket No','mage-eventpress'); ?></td>
<td><?php echo $values['ea_user_id'][0].$values['ea_order_id'][0].get_the_id(); ?></td>
</tr>
<tr>
<td><?php _e('Order ID','mage-eventpress'); ?></td>
<td><?php echo $values['ea_order_id'][0]; ?></td>
</tr>
<?php if($values['ea_email'][0]){ ?>
<tr>
<td><?php _e('Email','mage-eventpress'); ?></td>
@ -129,9 +140,8 @@ $values = get_post_custom(get_the_id());
$mep_form_builder_data = get_post_meta($values['ea_event_id'][0], 'mep_form_builder_data', true);
if ( $mep_form_builder_data ) {
foreach ( $mep_form_builder_data as $_field ) {
if ( $mep_user_ticket_type[$iu] != '' ) :
$user[$iu][$_field['mep_fbc_id']] = stripslashes( strip_tags( $_POST[$_field['mep_fbc_id']][$iu] ) );
endif;
$vname = "ea_".$_field['mep_fbc_id'];
$vals = $values[$vname][0];
if($vals){

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: 2.4.1
* Version: 2.5.0
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
@ -25,6 +25,7 @@ require_once(dirname(__FILE__) . "/lib/PHPExcel.php");
require_once(dirname(__FILE__) . "/inc/mep_csv_export.php");
require_once(dirname(__FILE__) . "/inc/mep_user_custom_style.php");
require_once(dirname(__FILE__) . "/inc/mep_tax_meta.php");
require_once(dirname(__FILE__) . "/inc/mep_addon_list.php");
// Language Load
add_action( 'init', 'mep_language_load');
@ -175,7 +176,7 @@ function mep_event_get_order_meta($item_id,$key){
global $wpdb;
$table_name = $wpdb->prefix."woocommerce_order_itemmeta";
$sql = 'SELECT meta_value FROM '.$table_name.' WHERE order_item_id ='.$item_id.' AND meta_key="'.$key.'"';
$results = $wpdb->get_results($sql);
$results = $wpdb->get_results($sql); //or die(mysql_error());
foreach( $results as $result ) {
$value = $result->meta_value;
}
@ -248,7 +249,7 @@ $result = $wpdb->get_results( "SELECT * FROM $table_name WHERE order_item_id=$it
// if($order->has_status( 'processing' ) || $order->has_status( 'pending' )) {
if($order->has_status( 'processing' ) || $order->has_status( 'completed' )) {
if($order->has_status( 'processing' ) || $order->has_status( 'pending' )) {
// update_post_meta( $event_id, $mep_atnd, "a2");
$mep_stock_msgc = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),0);
@ -268,15 +269,11 @@ if($mep_stock_orderc==$order_id){
update_post_meta( $event_id, "mep_xtra_$order_option_name",$ntes);
}
}
}
}
update_post_meta( $event_id, $order_meta_text, $order_processing);
$mep_stock_msg = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),0);
$mep_stock_order = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),1);
@ -290,11 +287,7 @@ if($mep_stock_order==$order_id){
update_post_meta( $event_id, $order_meta_text, $order_processing);
}
}
}
}
@ -345,7 +338,7 @@ update_post_meta( $event_id, $mep_atnd, "a2");
update_post_meta( $event_id, $order_meta_text, $order_completed);
}
else{
update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
// update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
update_post_meta( $event_id, $order_meta_text, $order_completed);
foreach ( $result as $page ){
@ -477,8 +470,11 @@ function mep_get_event_status($startdatetime){
add_filter ('woocommerce_add_to_cart_redirect', 'mep_event_redirect_to_checkout');
function mep_event_redirect_to_checkout() {
global $woocommerce;
$redirect_status = mep_get_option( 'mep_event_direct_checkout', 'general_setting_sec', 'yes' );
if($redirect_status=='yes'){
$checkout_url = wc_get_checkout_url();
return $checkout_url;
}
}
@ -891,7 +887,7 @@ $org_id = $org_arr[0]->term_id;
}
}
function mep_get_total_available_seat($event_id, $event_meta){
$book_count = get_post_meta(get_the_id(),'total_booking', true);
@ -1031,4 +1027,119 @@ if($item_name=='mep_country'){
}
}
}
function mep_save_attendee_info_into_cart($product_id){
$user = array();
if(isset($_POST['user_name'])){
$mep_user_name = $_POST['user_name'];
}else{ $mep_user_name=""; }
if(isset($_POST['user_email'])){
$mep_user_email = $_POST['user_email'];
}else{ $mep_user_email=""; }
if(isset($_POST['user_phone'])){
$mep_user_phone = $_POST['user_phone'];
}else{ $mep_user_phone=""; }
if(isset($_POST['user_address'])){
$mep_user_address = $_POST['user_address'];
}else{ $mep_user_address=""; }
if(isset($_POST['gender'])){
$mep_user_gender = $_POST['gender'];
}else{ $mep_user_gender=""; }
if(isset($_POST['tshirtsize'])){
$mep_user_tshirtsize = $_POST['tshirtsize'];
}else{ $mep_user_tshirtsize=""; }
if(isset($_POST['user_company'])){
$mep_user_company = $_POST['user_company'];
}else{ $mep_user_company=""; }
if(isset($_POST['user_designation'])){
$mep_user_desg = $_POST['user_designation'];
}else{ $mep_user_desg=""; }
if(isset($_POST['user_website'])){
$mep_user_website = $_POST['user_website'];
}else{ $mep_user_website=""; }
if(isset($_POST['vegetarian'])){
$mep_user_vegetarian = $_POST['vegetarian'];
}else{ $mep_user_vegetarian=""; }
if(isset($_POST['ticket_type'])){
$mep_user_ticket_type = $_POST['ticket_type'];
}else{ $mep_user_ticket_type=""; }
if(isset($_POST['mep_ucf'])){
$mep_user_cfd = $_POST['mep_ucf'];
}else{
$mep_user_cfd = "";
}
$count_user = count($mep_user_name);
for ( $iu = 0; $iu < $count_user; $iu++ ) {
if ( $mep_user_name[$iu] != '' ) :
$user[$iu]['user_name'] = stripslashes( strip_tags( $mep_user_name[$iu] ) );
endif;
if ( $mep_user_email[$iu] != '' ) :
$user[$iu]['user_email'] = stripslashes( strip_tags( $mep_user_email[$iu] ) );
endif;
if ( $mep_user_phone[$iu] != '' ) :
$user[$iu]['user_phone'] = stripslashes( strip_tags( $mep_user_phone[$iu] ) );
endif;
if ( $mep_user_address[$iu] != '' ) :
$user[$iu]['user_address'] = stripslashes( strip_tags( $mep_user_address[$iu] ) );
endif;
if ( $mep_user_gender[$iu] != '' ) :
$user[$iu]['user_gender'] = stripslashes( strip_tags( $mep_user_gender[$iu] ) );
endif;
if ( $mep_user_tshirtsize[$iu] != '' ) :
$user[$iu]['user_tshirtsize'] = stripslashes( strip_tags( $mep_user_tshirtsize[$iu] ) );
endif;
if ( $mep_user_company[$iu] != '' ) :
$user[$iu]['user_company'] = stripslashes( strip_tags( $mep_user_company[$iu] ) );
endif;
if ( $mep_user_desg[$iu] != '' ) :
$user[$iu]['user_designation'] = stripslashes( strip_tags( $mep_user_desg[$iu] ) );
endif;
if ( $mep_user_website[$iu] != '' ) :
$user[$iu]['user_website'] = stripslashes( strip_tags( $mep_user_website[$iu] ) );
endif;
if ( $mep_user_vegetarian[$iu] != '' ) :
$user[$iu]['user_vegetarian'] = stripslashes( strip_tags( $mep_user_vegetarian[$iu] ) );
endif;
if ( $mep_user_ticket_type[$iu] != '' ) :
$user[$iu]['user_ticket_type'] = stripslashes( strip_tags( $mep_user_ticket_type[$iu] ) );
endif;
$mep_form_builder_data = get_post_meta($product_id, 'mep_form_builder_data', true);
if ( $mep_form_builder_data ) {
foreach ( $mep_form_builder_data as $_field ) {
$user[$iu][$_field['mep_fbc_id']] = stripslashes( strip_tags( $_POST[$_field['mep_fbc_id']][$iu] ) );
}
}
}
return $user;
}