diff --git a/css/style.css b/css/style.css index 383dfe8..6313e94 100644 --- a/css/style.css +++ b/css/style.css @@ -429,6 +429,20 @@ position: relative; ul.mep-more-date-lists { margin: 10px; } +button.mep-cat-control { + background: #fa6630; + padding: 10px 20px; + font-size: 16px; + margin-right: 5px; + margin-bottom: 10px; + border: 0; + cursor:pointer; + color: #fff; +} +button.mep-cat-control.mixitup-control-active { + background: #ddd; + color: #000; +} /******Responsive*******/ @media only screen and (max-width: 1199px) { /********Default Theme***********/ diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index 11fac52..dea9195 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -145,7 +145,7 @@ add_action( 'woocommerce_before_calculate_totals', 'mep_add_custom_price',90,1 ) function mep_add_custom_price( $cart_object ) { foreach ( $cart_object->cart_contents as $key => $value ) { -$eid = $value['event_id']; +$eid = array_key_exists('event_id', $value) ? $value['event_id'] : 0; //$value['event_id']; if (get_post_type($eid) == 'mep_events') { $cp = $value['event_tp']; $value['data']->set_price($cp); @@ -162,9 +162,9 @@ 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']; +$mep_events_extra_prices = array_key_exists('event_extra_option', $cart_item) ? $cart_item['event_extra_option'] : array(); //$cart_item['event_extra_option']; -$eid = $cart_item['event_id']; +$eid = array_key_exists('event_id', $cart_item) ? $cart_item['event_id'] : 0; //$cart_item['event_id']; if (get_post_type($eid) == 'mep_events') { $user_info = $cart_item['event_user_info']; @@ -286,10 +286,11 @@ function mep_checkout_validation( $posted ) { global $woocommerce; $items = $woocommerce->cart->get_cart(); foreach($items as $item => $values) { - $event_id = $values['event_id']; + $event_id = array_key_exists('event_id', $values) ? $values['event_id'] : 0; // $values['event_id']; + if (get_post_type($event_id) == 'mep_events') { $total_seat = mep_event_total_seat($event_id,'total'); - $total_resv = mep_event_total_seat($event_id,'resv'); - $total_sold = mep_ticket_sold($event_id); + $total_resv = mep_event_total_seat($event_id,'resv'); + $total_sold = mep_ticket_sold($event_id); $total_left = $total_seat - ($total_sold + $total_resv); ; $event_validate_info = $values['event_validate_info'] ? $values['event_validate_info'] : array(); @@ -308,6 +309,7 @@ function mep_checkout_validation( $posted ) { } } + } } @@ -321,7 +323,8 @@ function mep_checkout_validation( $posted ) { function mep_add_custom_fields_text_to_order_items( $item, $cart_item_key, $values, $order ) { - $eid = $values['event_id']; + $eid = array_key_exists('event_id', $values) ? $values['event_id'] : 0; //$values['event_id']; + if (get_post_type($eid) == 'mep_events') { $mep_events_extra_prices = $values['event_extra_option']; if(isset($values['event_ticket_type'])){ diff --git a/inc/mep_functions.php b/inc/mep_functions.php index 81790af..caba5bd 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -2011,9 +2011,9 @@ function mep_get_all_tax_list($current_tax=null){ if(is_array($mep_event_ticket_type) && sizeof($mep_event_ticket_type) > 0){ foreach ( $mep_event_ticket_type as $field ) { if($type == 'total'){ - $total_name = array_key_exists('option_qty_t', $field) ? $field['option_qty_t'] : 0; + $total_name = array_key_exists('option_qty_t', $field) ? (int) $field['option_qty_t'] : 0; }elseif($type == 'resv'){ - $total_name = array_key_exists('option_rsv_t', $field) ? $field['option_rsv_t'] : 0; + $total_name = array_key_exists('option_rsv_t', $field) ? (int) $field['option_rsv_t'] : 0; } $total = $total_name + $total; } diff --git a/inc/mep_query.php b/inc/mep_query.php index 255a462..e4cfddf 100644 --- a/inc/mep_query.php +++ b/inc/mep_query.php @@ -5,7 +5,7 @@ function mep_event_query($type,$show,$sort='',$cat='',$org='',$evnt_type = 'upco $paged = get_query_var("paged") ? get_query_var("paged") : 1; $etype = $evnt_type == 'expired' ? '<' : '>'; - if($type='all'){ + if($type=='all'){ $args = array( 'post_type' => array('mep_events'), 'paged' => $paged, diff --git a/inc/template-prts/event_add_cart.php b/inc/template-prts/event_add_cart.php index e7a8b98..7ed1af5 100755 --- a/inc/template-prts/event_add_cart.php +++ b/inc/template-prts/event_add_cart.php @@ -144,7 +144,7 @@ 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; - + $total_book = 0; $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'); diff --git a/readme.txt b/readme.txt index 73d119b..d4d04c0 100644 --- a/readme.txt +++ b/readme.txt @@ -403,4 +403,7 @@ Schema Rich Text Added, Now it ca be easily add the rich text schema text. PHP Warning removed Added some Action & Filter Hooks Pagination Styling issue fixed +jQuery Filter Tab Button Styling issue Fixed +Event Shortcode Filter issue fixed +WooCommerce Product Cart warning issue fixed 24 March 2020*