Home › Forums › Ticket Products › Event Tickets Plus › adding the amount paid into the ticket email
- This topic has 5 replies, 2 voices, and was last updated 11 years, 6 months ago by
Brian.
-
AuthorPosts
-
September 21, 2014 at 7:55 am #757014
vendaragroup
ParticipantWe want to consolidate the emails so that just the ticket email gets sent (did this already through disabling using the check boxes) YET we do want the amount paid to appear on the ticket email.
I’m struggling with what I need to include in the email.php template to accomplish this (php is not my forte). I’ve put the file I have so far in a pastebin here: http://pastebin.com/i8B7jd9NAs you can see, we have a table layout and I would like the 3rd column to have the final order amount. This is generated by WooCommerce if I understand the flow correctly.
We do have Events Calendar Pro and WooTickets.
Thanks for your assistance!September 21, 2014 at 8:32 am #757054vendaragroup
ParticipantI also have two other issues with that email (let me know if I should open up separate tickets for each, though)
How to add the Venue zip code to the address?
Why is the venue web address not hyperlinking on the resultant email? The phone number is, however.
Thanks!September 22, 2014 at 9:32 am #759118Brian
MemberHello,
I can help you with the next step on this customization.
Your coding looks close, but I saw this line:
echo $ticket['ticket_price'];That information does not exist in the array $ticket.
I think you are going to have to use $ticket[order_id] to get the order information from WooCommerce and then get the price from there as the price is not in a variable by default in the email.
Related Questions
I can answer your questions here as they are related.How to add the Venue zip code to the address?
You code add this line with the other venue location fields, then echo the $venue_zip where you would like to show the zip code.
$venue_zip = get_post_meta( $venue_id, '_VenueZip', true );Why is the venue web address not hyperlinking on the resultant email?
The venue does not have a link by default, but if you wanted one you could create a function to turn the address into the correct link for Google Maps or a related service.
Let me know if you would like some help on the next step.
Thanks
September 27, 2014 at 9:28 am #771131vendaragroup
ParticipantThanks for this explanation, Brian. Forgive my delayed reply, I’ve been traveling.
I’ve got the last two issues sorted, but am still baffled about getting the price into the email. Php is NOT my strong suit, so I’m not sure how I call the order from WooCommerce and then get the price. I’d appreciate more direction, thanks!
September 29, 2014 at 7:26 am #775674Brian
MemberI will try to help out a little more here, but there is not much more support on a customization we can provide on our forums for this.
I looked around and found this question on Stack Exchange:
http://wordpress.stackexchange.com/questions/97176/get-product-id-from-order-id-in-woocommerce
If you look at the accepted answer it shows you how to get the order with the ID.
We have the id in an array in our tickets here:
ticket['order_id'];From there you can use that foreach loop to match the product names and get the price either in the order or you may have to get it using the produce id.
Looks like it will take some playing around on your part to get the price either way.
This is about as far as we can go on this customization and going to have to leave it to you to do the rest.
Thanks
October 17, 2014 at 7:25 am #815838Brian
MemberThis thread’s not seen much activity for the last couple of weeks – and there’s not too much more we can offer here given its a customization – so I’ll go ahead and close it. Of course if you still need help with this or any other issue please don’t hesitate to create a new thread (or threads) and one of the team will be only too happy to help. Thanks!
-
AuthorPosts
- The topic ‘adding the amount paid into the ticket email’ is closed to new replies.
