frangotier

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Downloadable Ticket from Event information #68795
    frangotier
    Participant

    I posted before thinking deeply about what we need, pdf files are not necessary. The attendee only needs to print his e-mail as we customized it. We are already working on repeating the check-in code in the form of a bar code and it will be OK.
    Thank you anyway
    Marçau from frangotier.fr

    in reply to: Ticket information in the "meta", I want it isolated. [solved] #65471
    frangotier
    Participant

    Got it!
    First I store the current event ID in a variable, then I look in the base which post have a key ‘_tribe_wooticket_for_event’, and among these which one has it equal to the ID of the event.
    I store HIS ID in a new variable.
    I use that variable in the get_post_meta() function.
    I even grabbed the currency symbol to display it behind and not before the price.

    $id = get_the_ID();
    global $wpdb;
    $mos_articles = $wpdb->get_results(

    SELECT post_id
    FROM $wpdb->postmeta
    WHERE meta_key = ‘_tribe_wooticket_for_event’
    AND meta_value='” .$id. “‘

    );
    foreach ( $mos_articles as $mon_bilhet )
    {
    $mon_bon_bilhet = $mon_bilhet->post_id;
    }
    $meta_monuda = get_post_meta( get_the_ID(), ‘_EventCurrencySymbol’, true );
    $meta_pretz = get_post_meta( $mon_bon_bilhet, ‘_regular_price’, true );
    echo ‘|’.$meta_pretz.’ ‘.$meta_monuda. ”;

    Thank you for telling me if this non-academic workaround can cause any problem.

    in reply to: Ticket information in the "meta", I want it isolated. [solved] #65432
    frangotier
    Participant

    In the meantime, to show the price of a concert I still use the tribe_get_cost() function which I put back in place like Kelly said. But I would like to avoid to the organizer the confusion of typing the same price two times, once in the ticket field and then in the Event cost field.

    in reply to: Ticket information in the "meta", I want it isolated. [solved] #65430
    frangotier
    Participant

    I went and look in the database tables:
    The ticket (ID:217) has a key named ‘_tribe_wooticket_for_event’ which is set to ‘157’.
    The event (ID:157) has no such key to indicate an associate ticket.
    I could display my price via:

    $meta_truc = get_post_meta( get_the_ID(), ‘_EventCurrencySymbol’, true );
    $meta_bidule = get_post_meta( 217, ‘_regular_price’, true );
    echo $meta_bidule . ‘ ‘.$meta_truc ;

    But I still need to know that 217 to do it
    All I need now is to write something saying to the server “please show me a post which key ‘_tribe_wooticket_for_event’ is equal to the value of [get_the_id()] of the current post”

    in reply to: Ticket information in the "meta", I want it isolated. [solved] #65293
    frangotier
    Participant

    It doesn’t work either. But at least the rest of the page is OK

    in reply to: Ticket information in the "meta", I want it isolated. [solved] #65278
    frangotier
    Participant

    All right, 1 will fit if I have only one ticket per concert, -1 will do if I have several.
    That’s very kind of you to bend over our problem.

    Right now I would like to isolated that [posts] => Array ( [0] => 217 ) in the very end. From that on I feel I could at last display something concerning my ticket.
    What would you type after the new WP_Query to display the “_regular_price” or at least the “217” to work with?

    I asked my collegue how he would do with plain PHP. We tried this:
    /* I assume i’ve got $wpbd to gather the conection information*/
    $toto = get_the_ID();
    $prix = $wpbd -> get_results(“SELECT * FROM undergroov_postmeta WHERE meta_key=’_regular_price’ AND post_id='”.$toto.”‘”);
    WHILE ($voir_prix = $prix -> fetch() ){
    $prix_concert = $voir_prix[‘meta_value’];
    echo $prix_concert ;
    }
    /**/
    But all it does is to prevent the botom of the page to dsisplay…

    frangotier
    Participant

    -1 
    I should have tried that first!
    I won’t look into that deeply enough before next week now, but i let you know how it goes.

    Just for not closing the topic yet…

    frangotier
    Participant

    Hi Chris. I just tried that, it happens that I had to write
    ‘posts_per_page’ => 1, /* – 1 */
    not to see all the rest of the content disapear.
    Once I had done this i tried each things you advised previously and none worked. I also tried and echo the variables to actually see what they returned and the content was again disapearing.
    I tried sprint_r to see what was grabed, it gives me all of this, the only interresting thingee is the very last one.
    WP_Query Object ( [query] => Array ( [post_type] => product [meta_key] => [meta_value] => 157 [meta_compare] => = [posts_per_page] => 1 [fields] => ids [post_status] => publish ) [query_vars] => Array ( [post_type] => product [meta_key] => [meta_value] => 157 [meta_compare] => = [posts_per_page] => 1 [fields] => ids [post_status] => publish [error] => [m] => 0 [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [name] => [static] => [pagename] => [page_id] => 0 [second] => [minute] => [hour] => [day] => 0 [monthnum] => 0 [year] => 0 [w] => 0 [category_name] => [tag] => [cat] => [tag_id] => [author_name] => [feed] => [tb] => [paged] => 0 [comments_popup] => [preview] => [s] => [sentence] => [menu_order] => [category__in] => Array ( ) [category__not_in] => Array ( ) [category__and] => Array ( ) [post__in] => Array ( ) [post__not_in] => Array ( ) [tag__in] => Array ( ) [tag__not_in] => Array ( ) [tag__and] => Array ( ) [tag_slug__in] => Array ( ) [tag_slug__and] => Array ( ) [ignore_sticky_posts] => [suppress_filters] => [cache_results] => 1 [update_post_term_cache] => 1 [update_post_meta_cache] => 1 [nopaging] => [comments_per_page] => 50 [no_found_rows] => [order] => DESC ) [tax_query] => WP_Tax_Query Object ( [queries] => Array ( ) [relation] => AND ) [meta_query] => WP_Meta_Query Object ( [queries] => Array ( [0] => Array ( [compare] => = [value] => 157 ) ) [relation] => AND ) [post_count] => 1 [current_post] => -1 [in_the_loop] => [comment_count] => 0 [current_comment] => -1 [found_posts] => 1 [max_num_pages] => 1 [max_num_comment_pages] => 0 [is_single] => [is_preview] => [is_page] => [is_archive] => 1 [is_date] => [is_year] => [is_month] => [is_day] => [is_time] => [is_author] => [is_category] => [is_tag] => [is_tax] => [is_search] => [is_feed] => [is_comment_feed] => [is_trackback] => [is_home] => [is_404] => [is_comments_popup] => [is_paged] => [is_admin] => [is_attachment] => [is_singular] => [is_robots] => [is_posts_page] => [is_post_type_archive] => 1 [query_vars_hash] => 2b1bf46afb5efcb751f46221fff57c87 [query_vars_changed] => [thumbnails_cached] => [tribe_is_past] => [tribe_is_event] => [tribe_is_event_category] => [tribe_is_event_venue] => [tribe_is_event_organizer] => [tribe_is_event_query] => [request] => SELECT SQL_CALC_FOUND_ROWS DISTINCT undergroov_posts.ID FROM undergroov_posts INNER JOIN undergroov_postmeta ON (undergroov_posts.ID = undergroov_postmeta.post_id) WHERE 1=1 AND undergroov_posts.post_type = ‘product’ AND (undergroov_posts.post_status = ‘publish’) AND ( (CAST(undergroov_postmeta.meta_value AS CHAR) = ‘157’) ) GROUP BY undergroov_posts.ID ORDER BY undergroov_posts.post_date DESC LIMIT 0, 1 [posts] => Array ( [0] => 217 ) )

    Pretty messy! But that 217 is the ID of my ticket, whereas 157 is the ID of my event, so it’s grabing something interresting though.

    frangotier
    Participant

    We’re getting somewhere!
    I tried your echos Chris, and the onlyone working is get_price_html();
    It tells me that the concert is free. I understand it goes and fetch the “event” price which is empty. This is normal.
    The price shown in the front-end form to buy a ticket is affected to a custom post which type is “product” and I guess we need to get the ID of that first

    frangotier
    Participant

    Thank you for the advise Kelly.
    First: I found a way for what I called “standalone part”, through the remove/add operation described in my second post. The front-end ticket form is now displayed before the meta as I wanted. It’s now OK as far as the event page is concerned.

    Then…
    I actually saw that thread you link to and tried it. But that’s not what I want… I would like to display, in a public page, the ticket price I attributed via WooTickets. I’m looking for a way to get the price whithout in the whole front-end ticket form.
    My aim is to have it appear next to the event title in the list/month/map view as well as in the sidebar widgets.

    frangotier
    Participant

    Tickets to be placed on top of single event page


    The snippet sort of does the trick, but then I would like to know how to skip the associated events and the Google map in the same way.

    in reply to: venue widget shows no upcoming event #56396
    frangotier
    Participant

    Oops, I missed something to display the code.

Viewing 12 posts - 1 through 12 (of 12 total)