James

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • James
    Participant

    We’ve since decided to take a different approach and have the dates in the titles. But I shall have a look at that link, thanks!

    in reply to: Removing/Resetting Ticket Orders #1139060
    James
    Participant

    Sorted it myself.

    For anyone looking here in the future you go into phpmyadmin and enter the following…

    DELETE FROM wp_posts WHERE post_type = "tribe_wooticket"

    in reply to: How to get the ticket title? #1136950
    James
    Participant

    That doesn’t work, it throws up an internal server error. I tried the below bit myself as well inspired by the sort of thing you did but it didn’t work. Any ideas please? We will get there eventually!

    $tickets = $main->get_tickets( $event_id );
    
    $ticket_title = $tickets->name;
    in reply to: How to get the ticket title? #1136413
    James
    Participant

    Josh and George from your support team helped me find the venue before – maybe you could ask them to have a look please? After all this is the last bit stopping this project going live. All I need to find is the title of the ticket in question, which should be possible as the venue title was found.

    in reply to: How to get the ticket title? #1136161
    James
    Participant

    I can’t do a var_dump in the function as it comes into effect when the e-mail is sent out, since it is defining what document is attached to the e-mail. I’ve tried it and it won’t do it. Can it not be done in a similar way to the way the venue was done? (As per original posting near the comment “Get the venue name”).

    in reply to: How to get the ticket title? #1135918
    James
    Participant

    No this function will be working on a single ticket, so it should only be going through a single ticket, which is the one bought by the customer. Therefore the method you’ve suggested is throwing up an internal server error.

    I’ve got the below code, could you suggest how to get it working to get the ticket title for a single ticket? (There will always only be one ticket for each event).

    $main = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance();
    $tickets = $main->get_tickets( $event_id );
    	
    // Get ticket title - not yet complete
    $ticket_title = current( $tickets )->name;
    • This reply was modified 9 years, 9 months ago by James.
    in reply to: How to get the ticket title? #1135358
    James
    Participant

    Please note that var_dump is on all the tickets outside the function so it’s showing all tickets regardless. This is because the function only works when the user confirms an order.

    in reply to: How to get the ticket title? #1135356
    James
    Participant

    The information I want is in there. I’ll post the var_dump result below, but it looks like it’s in a bit called [“name”] but how to get this?

    array(9) { [0]=> object(Tribe__Tickets__Ticket_Object)#4473 (20) { ["ID"]=> int(308) ["name"]=> string(22) "2 Day SSSTS Chelmsford" ["description"]=> string(0) "" ["price"]=> string(3) "265" ["regular_price"]=> string(3) "265" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(64) "http://ssstsuk.co.uk/1-day-health-safety-awareness-chelmsford-2/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(11) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-20 17:00:00" ["purchase_limit"]=> string(1) "0" } [1]=> object(Tribe__Tickets__Ticket_Object)#4651 (20) { ["ID"]=> int(306) ["name"]=> string(46) "1 Day Health & Safety Awareness Chelmsford" ["description"]=> string(0) "" ["price"]=> string(3) "135" ["regular_price"]=> string(3) "135" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(62) "http://ssstsuk.co.uk/1-day-health-safety-awareness-chelmsford/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-19 17:00:00" ["purchase_limit"]=> string(1) "0" } [2]=> object(Tribe__Tickets__Ticket_Object)#4581 (20) { ["ID"]=> int(304) ["name"]=> string(46) "1 Day Health & Safety Awareness Colchester" ["description"]=> string(0) "" ["price"]=> string(3) "150" ["regular_price"]=> string(3) "150" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(62) "http://ssstsuk.co.uk/1-day-health-safety-awareness-colchester/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-12 17:00:00" ["purchase_limit"]=> string(1) "0" } [3]=> object(Tribe__Tickets__Ticket_Object)#4466 (20) { ["ID"]=> int(301) ["name"]=> string(43) "1 Day Health & Safety Awareness Romford" ["description"]=> string(0) "" ["price"]=> string(3) "150" ["regular_price"]=> string(3) "150" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(51) "http://ssstsuk.co.uk/1-day-health-safety-awareness/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 08:00:00" ["end_date"]=> string(19) "2016-07-12 17:00:00" ["purchase_limit"]=> string(1) "0" } [4]=> object(Tribe__Tickets__Ticket_Object)#4474 (20) { ["ID"]=> int(298) ["name"]=> string(19) "2 Day SSSTS Romford" ["description"]=> string(0) "" ["price"]=> string(3) "295" ["regular_price"]=> string(3) "295" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(33) "http://ssstsuk.co.uk/2-day-sssts/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(0) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-20 09:00:00" ["end_date"]=> string(19) "2016-07-10 17:00:00" ["purchase_limit"]=> string(1) "0" } [5]=> object(Tribe__Tickets__Ticket_Object)#4650 (20) { ["ID"]=> int(237) ["name"]=> string(10) "SSSTS Test" ["description"]=> string(0) "" ["price"]=> string(4) "9.99" ["regular_price"]=> string(4) "9.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(32) "http://ssstsuk.co.uk/sssts-test/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(6) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-06-08 08:00:00" ["end_date"]=> string(19) "2016-06-17 17:00:00" ["purchase_limit"]=> string(1) "0" } [6]=> object(Tribe__Tickets__Ticket_Object)#4745 (20) { ["ID"]=> int(110) ["name"]=> string(13) "IT Training 1" ["description"]=> string(34) "Admits one person to IT Training 1" ["price"]=> string(5) "10.99" ["regular_price"]=> string(5) "10.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(35) "http://ssstsuk.co.uk/it-training-1/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(2) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 09:00:00" ["end_date"]=> string(19) "2016-06-17 17:00:00" ["purchase_limit"]=> string(1) "0" } [7]=> object(Tribe__Tickets__Ticket_Object)#4836 (20) { ["ID"]=> int(108) ["name"]=> string(21) "Health & Safety 2" ["description"]=> string(40) "Admits one person to health and safety 2" ["price"]=> string(5) "11.99" ["regular_price"]=> string(5) "11.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(37) "http://ssstsuk.co.uk/health-safety-2/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(1) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 09:00:00" ["end_date"]=> string(19) "2016-07-22 17:00:00" ["purchase_limit"]=> string(1) "0" } [8]=> object(Tribe__Tickets__Ticket_Object)#4848 (20) { ["ID"]=> int(106) ["name"]=> string(28) "Health & Safety Course 1" ["description"]=> string(49) "Admits one person to Health & Safety Course 1" ["price"]=> string(5) "11.99" ["regular_price"]=> string(5) "11.99" ["on_sale"]=> bool(false) ["admin_link"]=> string(42) "http://ssstsuk.co.uk/wp-admin/&action=edit" ["frontend_link"]=> string(44) "http://ssstsuk.co.uk/health-safety-course-1/" ["provider_class"]=> string(48) "Tribe__Tickets_Plus__Commerce__WooCommerce__Main" ["provider":protected]=> NULL ["stock":protected]=> int(0) ["global_stock_mode":protected]=> string(3) "own" ["global_stock_cap":protected]=> int(0) ["qty_sold":protected]=> int(10) ["qty_pending":protected]=> int(0) ["qty_cancelled":protected]=> int(0) ["manage_stock":protected]=> bool(false) ["start_date"]=> string(19) "2016-05-17 08:00:00" ["end_date"]=> string(19) "2016-06-10 17:00:00" ["purchase_limit"]=> string(1) "0" } }

    in reply to: How to get the ticket title? #1134743
    James
    Participant

    This doesn’t do the job – that file is using a “foreach” loop. I’ve set it up similar to that but then the word doc stops getting attached altogether. Is there a different way to get the ticket title?

    The venue title is retrieved with the code I showed earlier. Can the title not be found a similar way? This should be only checking the one ticket as it is the one that is being bought at the checkout (as it’s using the event id).

    If the ticket title cannot be found, can the event title be found instead? (Using the code I posted earlier)

    in reply to: How to get the ticket title? #1134379
    James
    Participant

    It is a Woocommerce one. I am trying to get the title name of the ticket itself, not the event. I am doing this in my functions.php, which defines which attachment goes with the e-mail. So if the title contains “SSSTS” in the title, then the SSSTS word doc should be attached.

    I already have the venue checker working so this title checker will go alongside the venue to give the absolute correct word doc.

    in reply to: Searching by Venue #1129718
    James
    Participant

    Hi,

    Really that is a quick way to solve it – getting rid of that filters line does allow for venue searching. Is there another file where the filters are defined? I don’t know why venues would be disabled in the search by default.

    Ideally there’d be another input box for the venue but if this is the only possible way then it’ll be acceptable.

    in reply to: Searching by Venue #1128807
    James
    Participant

    Hi,

    Can you please let me know if adding a “venue” field into the search bar is possible please? It would be incredibly useful.

    If it has been done before then please point me to that forum post, or paste on here. Thanks!

    in reply to: Search function brings up single event twice #1128456
    James
    Participant

    This reply is private.

    in reply to: Search function brings up single event twice #1128306
    James
    Participant

    This reply is private.

    in reply to: Searching by Venue #1127801
    James
    Participant

    I think both ways would be suitable, though the drop down box would be best please if you can help? Big thanks.

Viewing 15 posts - 1 through 15 (of 29 total)