From a57a6d7ac30a3605508d22cfff0ba484c9a0cb94 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Sun, 15 Sep 2019 12:03:06 +0000 Subject: [PATCH] version 2.7.2 released with news admin look --- css/admin_style.css | 5 + inc/mep_event_meta.php | 122 ++++++++++++------ inc/mep_extra_price.php | 47 ++++++- inc/mep_shortcode.php | 6 +- readme.txt | 8 +- templates/template-prts/event_add_cart.php | 14 +- templates/template-prts/event_ticket_type.php | 6 +- .../event_ticket_type_extra_service.php | 8 +- templates/template-prts/total_seat.php | 8 +- woocommerce-event-press.php | 18 ++- 10 files changed, 177 insertions(+), 65 deletions(-) diff --git a/css/admin_style.css b/css/admin_style.css index e7388b9..e13df32 100644 --- a/css/admin_style.css +++ b/css/admin_style.css @@ -208,4 +208,9 @@ div#mep-event-price { div#mep-event-price h2 { background: red; color: #fff; +} + +div#mage-primary-button{ +background:green !important; +color:white !important; } \ No newline at end of file diff --git a/inc/mep_event_meta.php b/inc/mep_event_meta.php index 027ff62..8c21f3b 100644 --- a/inc/mep_event_meta.php +++ b/inc/mep_event_meta.php @@ -3,28 +3,28 @@ 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-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-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-ticket-type', __('Event Ticket Type and Pricing','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-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-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-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-day-details', __('Event Daywise Details','mage-eventpress'), 'mep_event_day_details_cb', 'mep_events', 'normal', 'high' ); + 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-day-details', __('Event Daywise Details','mage-eventpress'), 'mep_event_day_details_cb', 'mep_events', 'normal', 'high' ); if(get_option( 'woocommerce_calc_taxes' )=='yes'){ add_meta_box( 'mep-event-tax-sec', __('Event Tax','mage-eventpress'), 'mep_event_tax_cb', 'mep_events', 'side', 'low' ); @@ -237,7 +237,7 @@ $map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'ifram
- '> + '>
@@ -245,35 +245,35 @@ $map_type = mep_get_option( 'mep_google_map_type', 'general_setting_sec', 'ifram
- '> + '>
- '> + '>
- '> + '>
- '> + '>
- '> + '>
@@ -574,7 +574,9 @@ function mep_event_faq_meta_box_cb() {
- + + +
@@ -582,7 +584,11 @@ function mep_event_faq_meta_box_cb() { -

+

+ + + +

- + + + +
@@ -713,7 +722,11 @@ function mep_event_day_details_cb() { -

+

+ + + +

- + - + - + - + + + + - - - + + + - + + + + + + + + -

+

+ + + + +

- + - + - + - + - + + + + - - - - + + + + - + + + + + -

+

+ + + +

ID, 'mep_event_more_date', true);
- '> + '>
@@ -991,7 +1033,7 @@ $more_date = get_post_meta($post->ID, 'mep_event_more_date', true);
- '> + '>
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'] ) ); + } + + $cnt++; + } + + $cart_item_data['event_ticket_info'] = $ticket_type_arr; + + + $cart_item_data['event_extra_option'] = $new; $cart_item_data['event_user_info'] = $user; $cart_item_data['event_tp'] = $tp; @@ -78,6 +106,7 @@ if(isset($_POST['mep_event_ticket_type'])){ $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); @@ -92,7 +121,16 @@ $eid = $value['event_id']; if (get_post_type($eid) == 'mep_events') { $cp = $value['event_tp']; $value['data']->set_price($cp); + $value['data']->set_regular_price($cp); + $value['data']->set_sale_price($cp); + $value['data']->set_sold_individually('yes'); $new_price = $value['data']->get_price(); + // echo $value['data']->get_regular_price(); + // echo '
';
+            // print_r(wc_get_product(4045));
+            // echo '
'; + // die(); + // update_post_meta($eid,'_price',$cp); } } } @@ -106,6 +144,9 @@ $mep_events_extra_prices = $cart_item['event_extra_option']; // print_r($cart_item); $eid = $cart_item['event_id']; if (get_post_type($eid) == 'mep_events') { + +// print_r($cart_item['event_ticket_info']); + echo "