Simon Groves

Forum Replies Created

Viewing 7 posts - 46 through 52 (of 52 total)
  • Author
    Posts
  • in reply to: Attendee List Add Guest Name Column #956183
    Simon Groves
    Participant

    I’ve managed to code up a solution, I’m not a coder but the below works (not sure if there was a better way of doing this either!):

    
    function column_name( $item ) {
    		global $wpdb;
    		
    		$order_id = $item['order_id']; 
    		#echo 'ORDER ID: '.$items.'<br/>'; #DEBUG
    		
    		$attendee_id = $item['attendee_id'];
    		#echo 'ATTENDEE ID: '.$attendee_id.'<br/>'; #DEBUG
    		
    		$query = "
    		SELECT *
    		FROM <code>$wpdb->postmeta</code>
    		WHERE <code>meta_key</code> LIKE '_tribe_wooticket_order'
    		AND <code>meta_value</code> LIKE '".$order_id."'
    		ORDER BY <code>hacc_postmeta</code>.<code>post_id</code> ASC
    		";
    		$rows = $wpdb -> get_results($query);
    		#echo  $wpdb->num_rows . ' Rows Found<br />'; #DEBUG
    		
    		$i=0;
    		foreach	( $rows as $row ) {
    			$i++;
    			$user_meta = $row->post_id;
    			#echo $user_meta.'<br/>';
    			if ($user_meta == $attendee_id) :
    				echo get_post_meta( $item['order_id'], $i.' Attendee Name', true );
    			endif;		
    		}
    
    		return $items;		
    }
    

    Hope that helps someone else. Only downside is when an update is made to the plugin, this will be replaced (I assume) so just bear it in mind!

    in reply to: Attendee List Add Guest Name Column #956000
    Simon Groves
    Participant

    Hi All,

    Just following on from this and hope someone can help.

    When tickets are purchased, I’ve got custom fields which collect Name, Email and Phone for each ticket. This stores the custom fields as :
    X Attendee Name
    X Attendee Email
    X Attendee Phone
    Where X is the number, so in one order, if 2 tickets are purchased, the above would be used three times like so:
    1 Attendee Name
    1 Attendee Email
    1 Attendee Phone

    2 Attendee Name
    2 Attendee Email
    2 Attendee Phone

    Alls fine so far. I’ve then found this tuturial: http://jaredcamarata.com/how-to-add-name-to-attendee-list-table-for-wootickets/

    So wish to add an extra column ‘Guest Name’. Problem is, I need to loop the below to get the desired info:

    
    $order = new WC_Order( $item['order_id'] );
    $items = get_post_meta( $order, '1 Attendee Name', true );
    return $items;
    

    At the moment, that will return the first name input for both tickets.

    I can see that in the attendee list table there is a column called Ticket# which increments the number of tickets per order.

    What I’m trying to do, is find where this is generated, so I can do something like:

    
    $i=0;
    foreach($qty as $quantity){
    $i++;	
    $items = get_post_meta( $item['order_id'], $i.' Attendee Name', true );
    }
    

    Hopefully, this will get me in the right direction.

    Any help is much appreciated at this point as it’s driving me mad!!!

    Simon Groves
    Participant

    Hey endorsecommunications,

    We needed similar and used http://buzzwebmedia.com.au/wootickets-attendee-list/

    Not sure on your requirements but I updated my support ticket https://theeventscalendar.com/support/forums/topic/dynamic-pricing-with-wootickets/ with what we did

    Hope that helps!

    in reply to: Dynamic Pricing with WooTickets #955306
    Simon Groves
    Participant

    Hi All,

    I thought I’d post an update on this, firstly to say I’ve found a solution but also as a point of reference in case any one else needed similar! Here’s what we did…

    Ok, firstly the plugins used:
    – WooCommerce
    – WooTickets
    – WooCommerce Subscriptions
    – WooCommerce Groups
    – WooTickets Attendee List (http://buzzwebmedia.com.au/wootickets-attendee-list/)

    Once all installed and activated:
    1) Create your groups. This means when people subscribe and become ‘members’ they get placed into the right group
    2) Create your event. In our case, it was a networking event which required 2 prices (members and guests)
    3) Add the 2 ticket options and once saved, click Edit in WooCommerce for the member ticket
    4) Once you’re in the edit in WooCommerce screen for the member ticket, use the access restriction options (added by the WooCommerce Groups plugin which you set up in step 1)
    5) Save and test

    Now, when you view your event (not logged in) you will only see the guest ticket on the event. If you then log in and view the event, you will see 2 options member and guest prices. For us this was necessary as a member may bring a guest. However, you could use the groups option to hide the other option if needs be.

    Finally, as we also needed to collect additional info on each ticket, the free plugin courtesy of Buzz Media’s Attendee List works like a charm, adding the necessary fields at the checkout.

    Fingers crossed someone else will find this of use!

    Cheers

    in reply to: Dynamic Pricing with WooTickets #955066
    Simon Groves
    Participant
    in reply to: WooCommerce Tickets and Dynamic Pricing Plugin #955054
    Simon Groves
    Participant

    Thanks Barry, I’ve posted over in the other forum.

    My apologies

    in reply to: WooCommerce Tickets and Dynamic Pricing Plugin #955007
    Simon Groves
    Participant

    Hi Barry,

    We’ve gone ahead and purchased the plugin (which is pretty neat!).

    We created our test event, edited the 2 tickets using the edit in WooCommerce option.

    Using the dynamic pricing plugin, we applied a role type against each ticket type (logged in vs logged out).

    Unfortunately, both tickets are displayed on the screen 🙁

    I wonder if we need to add a function or we’ve missed something? Are you able to assist in any way?

    Many thanks

Viewing 7 posts - 46 through 52 (of 52 total)