Home › Forums › Ticket Products › Community Tickets › Community Tickets Fees
- This topic has 8 replies, 5 voices, and was last updated 9 years, 6 months ago by
Chris.
-
AuthorPosts
-
August 10, 2016 at 2:20 pm #1150229
Chris
ParticipantFirstly Fees should be allowed to be charged on the ‘events tickets’ pro’ plugin… we fully handle events going into the system, but charge per ticket fees… ER perhaps đ (yeah yeah the graveyard user voice forum). Not sure why this feature isn’t part of ‘event tickets’ and then extended into ‘community tickets’.
—
We calculate our fees based on ‘total’ price (including tax) of a ticket (to save confusion).
Your system calculates ‘tax-excluded’ fees which means on a $20 ticket you charge 1.07 instead of 1.10
Do you have a snippet we could use to allow charges to calculate based on full price?
August 11, 2016 at 12:12 pm #1150689Brook
ParticipantHowdy Chris,
Thank you for reaching out about this. And I really appreciate your feedback on UV and the fee calculator.
I do not have a snippet that does exactly, that, although I do have a snippet for creating your own fee calculations:
function tribe_calculate_cart_fees_custom( $wc_cart ) { $cart = new Tribe__Events__Community__Tickets__Cart_Custom(); $cart->calculate_cart_fees( $wc_cart ); } remove_action( 'woocommerce_cart_calculate_fees', array( Tribe__Events__Community__Tickets__Main::instance(), 'calculate_cart_fees' ) ); add_action( 'woocommerce_cart_calculate_fees', 'tribe_calculate_cart_fees_custom' ); class Tribe__Events__Community__Tickets__Cart_Custom extends Tribe__Events__Community__Tickets__Cart { /** * loops over items in an order and breaks them down into receivers, amounts, and opportunities for fees * * @param array $items Items to loop over (cart items, order items, etc) * * @return array Array of receivers and fees */ public function parse_order( $items ) { $receivers = array(); $fees = array(); $main = Tribe__Events__Community__Tickets__Main::instance(); $options = get_option( Tribe__Events__Community__Tickets__Main::OPTIONNAME ); if ( $main->is_split_payments_enabled() ) { $site_receiver_email = $options['paypal_receiver_email']; } else { $woocommerce_options = get_option( 'woocommerce_paypal_settings' ); $site_receiver_email = isset( $woocommerce_options['receiver_email'] ) ? $woocommerce_options['receiver_email'] : ''; } if ( count( $items ) > 0 ) { foreach ( $items as $item ) { if ( empty( $item['quantity'] ) && empty( $item['qty'] ) ) { continue; } $event_id = get_post_meta( $item['product_id'], '_tribe_wooticket_for_event', true ); // if the event doesn't exist, skip if ( ! $event_id || ! ( $event = get_post( $event_id ) ) ) { continue; } $event_creator = get_user_by( 'id', $event->post_author ); $receiver_email = $site_receiver_email; if ( $main->is_split_payments_enabled() ) { $creator_options = $main->payment_options_form()->get_meta( $event_creator->ID ); $receiver_email = $creator_options['paypal_account_email']; } $payment_fee_setting = $main->get_payment_fee_setting( $event ); $product_id = $item['product_id']; $line_item = $item['line_total']; $receiver_total = $this->gateway()->ticket_price( $line_item, 'pass' !== $payment_fee_setting ); // set up the receiver if ( isset( $receivers[ $receiver_email ] ) ) { $receivers[ $receiver_email ]['amount'] = number_format( $receivers[ $receiver_email ]['amount'] + $receiver_total, 2, '.', '' ); } else { $receiver = array( 'user_id' => $event_creator->ID, 'payment_fee_setting' => $payment_fee_setting, 'email' => $receiver_email, 'amount' => 0, 'primary' => 'false', ); $receiver['amount'] = number_format( $receiver['amount'] + $receiver_total, 2, '.', '' ); $receivers[ $receiver_email ] = $receiver; }//end else // track flat fee deduction requirements if ( ! isset( $fees[ $receiver_email ] ) ) { $fees[ $receiver_email ] = array(); } // The following is new code that gives each ticket its own flat fee, rather than each events $quantity = (int) empty( $item['quantity'] ) ? $item['qty'] : $item['quantity']; $item_price = $item[ 'data' ]->price; for ( $i = 0; $i < $quantity; $i++ ) { $fees[ $receiver_email ][] = array( 'event_id' => $event_id, 'price' => $this->gateway()->ticket_price( $item_price, 'pass' !== $payment_fee_setting ), ); } } } return array( 'receivers' => $receivers, 'fees' => $fees, ); } }That allows you to override the default fee calculator with an entirely custom one. In the above case it changes the flat fee to be per ticket rather than the default per event. If you wish to further modify it it sounds like you would like to adjust the $item_price variable to include more than just the base price. You might simply multiple it by a set percentage if you know what it will be, or pull in the tax data and add it to the base price.
Firstly Fees should be allowed to be charged on the âevents ticketsâ proâ plugin⌠we fully handle events going into the system, but charge per ticket fees⌠ER perhaps ? (yeah yeah the graveyard user voice forum). Not sure why this feature isnât part of âevent ticketsâ and then extended into âcommunity ticketsâ.
I’m super interested in knowing why you feel UserVoice is a graveyard. Do you feel like there are too many requests on UserVoice and yours doesn’t stand a chance of getting enough votes? Or that we take too long to respond to ideas? Or that we just aren’t building features on there?
I’m just keen to hear your specific feedback if you have any. While we all take shifts on triage, coordinating UserVoice is my responsibility. So I am always keenly interested in feedback, constructive or otherwise, on that area.
Did that snippet help get you where you need to be?
Cheers!
– Brook
August 23, 2016 at 5:38 am #1154749Chris
ParticipantThanks for the code, really helpful.
As for user voice, it seems some features that are really common in rego systems are sitting idle with votes, while others are being implemented.
I guess it seems there is no consistency in knowing if something is getting implemented on votes. Something with 7 votes is done, one with 8 votes is not. It also seems features are going in with ‘product’ blinkers on, rather than ‘solution’ blinkers. What you are doing is great, but there are some gaping holes (like a mobile scanning app and a real barcode solution on tickets, not the hacky url that’s there now) and custom design ticket pdf’s that are missing, also putting products into a category in woocommerce – really important, simple to implement, but sitting there.
August 23, 2016 at 10:16 am #1154934Chris
ParticipantBTW… where is the best place to put the code above?
Getting a Tribe__Events__Community__Tickets__Cart not found error?
August 25, 2016 at 12:01 am #1155663Brook
ParticipantBTW⌠where is the best place to put the code above?
Getting a Tribe__Events__Community__Tickets__Cart not found error?
I would load that code after the ‘plugins_loaded’ action. One place that does this automatically is your theme’s functions.php file. Simply inserting the code in there with the Community Tickets plugin active should work.
But if you would prefer to write a proper plugin, just wait to include/require the above class definition until after all of the plugins have loaded, that way the Community Tickets classes will be present and the code can extend them.
I guess it seems there is no consistency in knowing if something is getting implemented on votes. Something with 7 votes is done, one with 8 votes is not.
That is definitely true. There are many reasons for this, such as one feature was trivial to implement, or was something that we had already planned, etc. Typically when this happens there is a good reason for it. We’ll have to consider ways to communicate this better. We are planning an overhaul of our feature request process, so this is good feedback to have.
a mobile scanning app and a real barcode solution on tickets
To be up front there is almost no chance we will ever build our own suite of mobile apps. The initial investment will be huge, the ongoing investment will also be sizable. We know it’s a feature that will make a smattering of folks happy, but for the cost of building that feature we could make many times more people happy by spending our time elsewhere. We are however always looking for already existing native apps that we could build a tie-in with. We already have one for Android that helps streamline the checkin quite a bit. But have yet to find anything for iOS that would help.
also putting products into a category in woocommerce
Tickets already are a category in Woo. But the products inside this category are hidden by default. We have snippets to alter this behavior though if you desire that.
custom design ticket pdfâs
That is one thing we certainly might revisit. We used to run PDF tickets, but they got a lot of complaints. PDFs require a rather sizable library to be included in the plugin, which caused some to complain of bloat. All of the libraries available are rather finicky and thus can be hard for people to customize the look of the tickets. Eventually we stripped it out and switched to HTML tickets, which have their fair share of advantages too. But sometimes we have tossed around the idea of going back.
Thanks again for your honest feedback. Let me know if you have any more questions. Cheers!
– Brook
September 5, 2016 at 12:56 pm #1160109Math
ParticipantHi Brook
Sorry for gate crushing, I just want to the android app you mentioned here and where to get it.
September 7, 2016 at 9:17 am #1160992Brook
ParticipantFor sure Math. The integration can be found here:
https://gist.github.com/elimn/89fbec4850beb115f7a1
The app can be found here:
https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en
Basically it adds a QR scan link to the checkin page. Clicking this link will take you to the zxing barcode scanner mentioned above. With that app open you can just scan a barcode. The barcode will take you to a URL, which is the checkin page again. So at that point you will have checked someone in and will be back at the page ready to scan another. It’s not perfect, but it is a lot fewer steps and just about as streamlined as we can make it.
Cheers!
– Brook
September 29, 2016 at 9:35 am #1170449Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Community Tickets Fees’ is closed to new replies.
