<?php /* * WARNING -This is a relatively new feature and is likly to change as we fine-tune things over the coming weeks/months, if at all possible try to use our hooks or CSS/jQuery to acheive your customizations * This displays the booking cart showing the persons bookings, attendees and a breakdown of pricing. * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager-pro/multiple-bookings/ and modifying it however you need. * For more information, see http://wp-events-plugin.com/documentation/using-template-files/ */ $EM_Multiple_Booking = empty($EM_Multiple_Booking) ? EM_Multiple_Bookings::get_multiple_booking() : $EM_Multiple_Booking; /* @var $EM_Multiple_Booking EM_Multiple_Booking */ //TODO add delete booking from cart //TODO make bookings editable ?> <table class="em-cart-table em-mb-admin-table"> <tbody class="em-cart-summary"> <?php do_action('em_multiple_bookings_table_before_events', $EM_Multiple_Booking); //do not delete ?> <tr class="em-cart-title"> <th class="em-cart-title-event">Event</th> <th class="em-cart-title-spaces">Spaces</th> <th class="em-cart-title-price">Price</th> </tr> <?php foreach ($EM_Multiple_Booking->get_bookings() as $EM_Booking) { /* @var $EM_Booking EM_Booking */ ?> <tr class="em-cart-table-event-summary" id="em-cart-table-event-summary-<?php echo $EM_Booking->get_event()->event_id; ?>
<?php /* * WARNING -This is a recently added template (2013-01-30), and is likly to change as we fine-tune things over the coming weeks/months, if at all possible try to use our hooks or CSS/jQuery to acheive your customizations * This displays the booking cart showing the persons bookings, attendees and a breakdown of pricing. * You can override the default display settings pages by copying this file to yourthemefolder/plugins/events-manager-pro/multiple-bookings/ and modifying it however you need. * For more information, see http://wp-events-plugin.com/documentation/using-template-files/ */ if (empty($EM_Multiple_Booking)) { $EM_Multiple_Booking = EM_Multiple_Bookings::get_multiple_booking(); } //TODO add delete booking from cart //TODO make bookings editable ?> <table class="em-checkout-table"> <tbody class="em-checkout-summary"> <?php do_action('em_checkout_form_before_events', $EM_Multiple_Booking); //do not delete ?> <tr class="em-checkout-title"> <th class="em-checkout-title-event">Event</th> <th class="em-checkout-title-spaces">Spaces</th> <th class="em-checkout-title-price">Price</th> </tr> <?php foreach ($EM_Multiple_Booking->get_bookings() as $EM_Booking) { /* @var $EM_Booking EM_Booking */ ?> <tr class="em-checkout-table-event-summary" id="em-checkout-table-event-summary-<?php echo $EM_Booking->get_event()->event_id;
static function mb_booking_form_footer() { $EM_Multiple_Booking = EM_Multiple_Bookings::get_multiple_booking(); if ($EM_Multiple_Booking->get_price() > 0) { self::booking_form_footer(); } }
public static function cart_page() { if (!EM_Multiple_Bookings::get_multiple_booking()->validate_bookings_spaces()) { global $EM_Notices; $EM_Notices->add_error(EM_Multiple_Bookings::get_multiple_booking()->get_errors()); } //load contents if not using caching, do not alter this conditional structure as it allows the cart to work with caching plugins echo '<div class="em-cart-page-contents" style="position:relative;">'; if (!defined('WP_CACHE') || !WP_CACHE) { emp_locate_template('multiple-bookings/page-cart.php', true); } else { echo '<p>' . get_option('dbem_multiple_bookings_feedback_loading_cart') . '</p>'; } echo '</div>'; if (!defined('EM_CART_JS_LOADED')) { //load function em_cart_js_footer() { ?> <script type="text/javascript"> <?php include 'multiple-bookings.js'; ?> <?php do_action('em_cart_js_footer'); ?> </script> <?php } add_action('wp_footer', 'em_cart_js_footer', 100); add_action('admin_footer', 'em_cart_js_footer', 100); define('EM_CART_JS_LOADED', true); } }
public static function cart_coupon_apply($coupon_code) { $EM_Multiple_Booking = EM_Multiple_Bookings::get_multiple_booking(); if (!empty($_REQUEST['coupon_code'])) { $EM_Coupon = new EM_Coupon($_REQUEST['coupon_code'], 'code'); if (!empty($EM_Coupon->coupon_id)) { if ($EM_Coupon->is_valid()) { $EM_Multiple_Booking->booking_meta['coupon'] = $EM_Coupon->to_array(); //we add an clean a coupon array here for the first time $EM_Multiple_Booking->calculate_price(); //refresh price return true; } } } return false; }