php error fix and date format changed
This commit is contained in:
parent
e046fcc2cb
commit
ce058c5aad
|
@ -28,6 +28,8 @@ function add_admin_scripts( $hook ) {
|
|||
if ( 'mep_events' === $post->post_type ) {
|
||||
wp_enqueue_script('jquery-ui-timepicker-addon',plugin_dir_url( __DIR__ ).'js/jquery-ui-timepicker-addon.js',array('jquery','jquery-ui-core'),1,true);
|
||||
wp_enqueue_script('jquery-ui-timepicker-addon',plugin_dir_url( __DIR__ ).'js/jquery-ui-sliderAccess.js',array('jquery','jquery-ui-core','jquery-ui-timepicker-addon'),1,true);
|
||||
wp_enqueue_script('mep_datepicker',plugin_dir_url( __DIR__ ).'js/mep_datepicker.js',array('jquery','jquery-ui-core','jquery-ui-timepicker-addon'),1,true);
|
||||
|
||||
wp_enqueue_style('jquery-ui-timepicker-addon',plugin_dir_url( __DIR__ ).'css/jquery-ui-timepicker-addon.css',array());
|
||||
wp_enqueue_style('mep-jquery-ui-style',plugin_dir_url( __DIR__ ).'css/jquery-ui.css',array());
|
||||
wp_enqueue_script('gmap-scripts',plugin_dir_url( __DIR__ ).'js/mkb-admin.js',array('jquery','jquery-ui-core'),1,true);
|
||||
|
@ -61,34 +63,3 @@ add_action('at_footer', 'mep_event_custom_enqueue_scripts');
|
|||
function mep_event_custom_enqueue_scripts() {
|
||||
wp_enqueue_script('jquery-barcode',plugin_dir_url( __DIR__ ).'js/jquery-barcode.min.js',array('jquery'),1,true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Datepicker code for admin dashboard load in footer section
|
||||
add_action('admin_footer','mep_admin_footer_script',10,99);
|
||||
function mep_admin_footer_script(){
|
||||
global $post;
|
||||
if ( 'mep_events' === $post->post_type ) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
var startDateTextBox = jQuery('.event_start');
|
||||
var endDateTextBox = jQuery('.event_end');
|
||||
jQuery.timepicker.datetimeRange(
|
||||
startDateTextBox,
|
||||
endDateTextBox,
|
||||
{
|
||||
minInterval: (1000*60*60), // 1hr
|
||||
dateFormat: 'dd M yy',
|
||||
timeFormat: 'HH:mm',
|
||||
start: {}, // start picker options
|
||||
end: {} // end picker options
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -76,7 +76,7 @@ if($user_api){
|
|||
?>
|
||||
<div class='sec'>
|
||||
<label for="mep_ev_989"> Show Google Map: </label>
|
||||
<span><input style='text-align: left;width: auto;' id='mep_ev_989' type="checkbox" name='mep_sgm' value='1' <?php $mep_sgm = $values['mep_sgm'][0]; if($mep_sgm==1){ echo 'checked'; } ?> > Yes</span>
|
||||
<span><input style='text-align: left;width: auto;' id='mep_ev_989' type="checkbox" name='mep_sgm' value='1' <?php if(array_key_exists('mep_sgm', $values)){ $mep_sgm = $values['mep_sgm'][0]; if($mep_sgm==1){ echo 'checked'; } } ?> > Yes</span>
|
||||
</div>
|
||||
<div class='sec'>
|
||||
<input id="pac-input" name='location_name' value='<?php //echo $values['location_name'][0]; ?>'/>
|
||||
|
@ -561,13 +561,13 @@ $values = get_post_custom( $post->ID );
|
|||
|
||||
<div class='sec'>
|
||||
<label for="event_start_date"> Start Date & Time: </label>
|
||||
<span><input class='event_start' id='event_start_date' type="text" name='mep_event_start_date' value='<?php echo $values['mep_event_start_date'][0]; ?>'> </span>
|
||||
<span><input class='event_start' id='event_start_date' type="text" name='mep_event_start_date' value='<?php if(array_key_exists('mep_event_start_date', $values)){ echo $values['mep_event_start_date'][0]; } ?>'> </span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='sec'>
|
||||
<label for="event_end_date"> End Date & Time: </label>
|
||||
<span><input class='event_end' id='event_end_date' type="text" name='mep_event_end_date' value='<?php echo $values['mep_event_end_date'][0]; ?>'> </span>
|
||||
<span><input class='event_end' id='event_end_date' type="text" name='mep_event_end_date' value='<?php if(array_key_exists('mep_event_end_date', $values)){ echo $values['mep_event_end_date'][0]; } ?>'> </span>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -6,23 +6,65 @@ function mep_add_custom_fields_text_to_cart_item( $cart_item_data, $product_id,
|
|||
$new = array();
|
||||
$user = array();
|
||||
|
||||
if(isset($_POST['event_addt_price'])){
|
||||
$checked = $_POST['event_addt_price'];
|
||||
}else{ $checked=""; }
|
||||
|
||||
if(isset($_POST['option_name'])){
|
||||
$names = $_POST['option_name'];
|
||||
}else{ $names=""; }
|
||||
|
||||
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'];
|
||||
$mep_user_email = $_POST['user_email'];
|
||||
$mep_user_phone = $_POST['user_phone'];
|
||||
$mep_user_address = $_POST['user_address'];
|
||||
$mep_user_gender = $_POST['gender'];
|
||||
$mep_user_tshirtsize = $_POST['tshirtsize'];
|
||||
$mep_user_company = $_POST['user_company'];
|
||||
$mep_user_desg = $_POST['user_designation'];
|
||||
$mep_user_website = $_POST['user_website'];
|
||||
$mep_user_vegetarian = $_POST['vegetarian'];
|
||||
$mep_user_ticket_type = $_POST['ticket_type'];
|
||||
}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'];
|
||||
|
@ -35,7 +77,7 @@ if(isset($_POST['mep_ucf'])){
|
|||
$count = count( $names );
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['option_name'])){
|
||||
for ( $i = 0; $i < $count; $i++ ) {
|
||||
|
||||
if ( $names[$i] != '' ) :
|
||||
|
@ -53,7 +95,7 @@ if(isset($_POST['mep_ucf'])){
|
|||
$opttprice = ($price[$i]*$qty[$i]);
|
||||
$tp = ($tp+$opttprice);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for ( $iu = 0; $iu < $count_user; $iu++ ) {
|
||||
|
||||
|
@ -122,7 +164,7 @@ $mep_form_builder_data = get_post_meta($product_id, 'mep_form_builder_data', tru
|
|||
}
|
||||
|
||||
|
||||
if($_POST['mep_event_ticket_type']){
|
||||
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);
|
||||
|
@ -177,8 +219,8 @@ echo "<ul class='event-custom-price'>";
|
|||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if($cart_item['event_ticket_type']){
|
||||
if(array_key_exists('event_ticket_type', $cart_item)){
|
||||
// if($cart_item['event_ticket_type']){
|
||||
echo "<li> Ticket: ".$cart_item['event_ticket_type']." x ".$cart_item['event_ticket_qty'].": ".get_woocommerce_currency_symbol().$cart_item['event_ticket_price']."</li>";
|
||||
}
|
||||
echo "</ul>";
|
||||
|
|
|
@ -173,8 +173,8 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
|
|||
|
||||
|
||||
if(time() < strtotime($newformat)){
|
||||
$tt = get_the_terms( $post->ID, 'mep_cat');
|
||||
$torg = get_the_terms( $post->ID, 'mep_org');
|
||||
$tt = get_the_terms( get_the_id(), 'mep_cat');
|
||||
$torg = get_the_terms( get_the_id(), 'mep_org');
|
||||
// print_r($tt);
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
jQuery(document).ready(function($){
|
||||
var startDateTextBox = jQuery('.event_start');
|
||||
var endDateTextBox = jQuery('.event_end');
|
||||
jQuery.timepicker.datetimeRange(
|
||||
startDateTextBox,
|
||||
endDateTextBox,
|
||||
{
|
||||
minInterval: (1000*60*60), // 1hr
|
||||
dateFormat: 'yy-mm-dd',
|
||||
timeFormat: 'HH:mm',
|
||||
start: {}, // start picker options
|
||||
end: {} // end picker options
|
||||
}
|
||||
);
|
||||
});
|
|
@ -1,6 +1,8 @@
|
|||
=== Woocommerce Events Manager ===
|
||||
Contributors: MagePeople Team
|
||||
Tags: event, event with woocommerce, woocommerce event, wordpress event plugin, event management wordpress, event booking for woocommerce, best wordpress event plugin, event booking manager wordpress, wordpress event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events, Sell Event Tickets
|
||||
Tags: event, event with woocommerce, woocommerce event, wordpress event plugin, event management wordpress, event booking for woocommerce, best wordpress event plugin, event booking manager wordpress, wordpress event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events, Sell Event Tickets,Event Ticket Manager,Event Ticket Plugin,Wordpress Event Booking Plugin,Events Manager,Events booking Manager,Events Booking System Plugin
|
||||
|
||||
|
||||
Requires at least: 3.7
|
||||
Tested up to: 4.9
|
||||
Stable tag: 1.0
|
||||
|
@ -167,3 +169,6 @@ You can display the event list on any page by using the ShortCode. Just use this
|
|||
|
||||
= 2.1.0 =
|
||||
*Update Release, jQuery Conflict fixed with DiVi theme. 8 Aug 2018*
|
||||
|
||||
= 2.1.1 =
|
||||
*Update Release, php warning and notice removed and date issue fixed. 16 Aug 2018*
|
|
@ -14,7 +14,7 @@ add_action('mep_event_date_only','mep_ev_date');
|
|||
function mep_ev_date(){
|
||||
global $event_meta;
|
||||
?>
|
||||
<p><?php echo substr($event_meta['mep_event_start_date'][0],0,12); ?> </p>
|
||||
<p><?php echo substr($event_meta['mep_event_start_date'][0],0,11); ?> </p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
|
@ -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.1.0
|
||||
* Version: 2.1.1
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue