Home › Forums › Ticket Products › Event Tickets Plus › WooCommerce Tickets + Wishlists
- This topic has 3 replies, 2 voices, and was last updated 11 years, 9 months ago by
matthewdenton.
-
AuthorPosts
-
June 29, 2014 at 2:35 am #259391
Benjamin Hope
ParticipantHello,
I’m using Tribe ECP and Wootickets to book tickets to events and courses on this page here: http://battersea.wpengine.com/courses/beginner-1-spanish-lessons/
I just purchased the wishlist extension so that users could chose to make a wishlist and buy their course later.
But I cannot get the wishlist link to appear.I believe it has to do with the tickets.php file from tribe not automatically supporting that wishlist, but I’m not sure.
Below is the code for the tickets template, wondering if anyone know what would need to be added to pull in wishlist. Thanks!:<?php global $woocommerce; ?>
<form action=”<?php echo esc_url( add_query_arg( ‘wootickets_process’, 1, $woocommerce->cart->get_cart_url() ) ); ?>”
class=”cart” method=”post”
enctype=’multipart/form-data’>
<table width=”100%” class=”tribe-events-tickets”>
<?php$is_there_any_product = false;
$is_there_any_product_to_sell = false;ob_start();
foreach ( $tickets as $ticket ) {global $product;
if ( class_exists( ‘WC_Product_Simple’ ) ) {
$product = new WC_Product_Simple( $ticket->ID );
} else {
$product = new WC_Product( $ticket->ID );
}$gmt_offset = ( get_option( ‘gmt_offset’ ) >= ‘0’ ) ? ‘ +’ . get_option( ‘gmt_offset’ ) : ” ” . get_option( ‘gmt_offset’ );
$gmt_offset = str_replace( array( ‘.25’, ‘.5’, ‘.75’ ), array( ‘:15’, ‘:30’, ‘:45’ ), $gmt_offset );$end_date = null;
if ( ! empty( $ticket->end_date ) ){
$end_date = strtotime( $ticket->end_date . $gmt_offset );
}else{
$end_date = strtotime( tribe_get_end_date( get_the_ID(), false, ‘Y-m-d G:i’ ) . $gmt_offset );
}$start_date = null;
if ( !empty( $ticket->start_date ) )
$start_date = strtotime( $ticket->start_date . $gmt_offset );if ( ( !$product->is_in_stock() ) || ( empty( $start_date ) || time() > $start_date ) && ( empty( $end_date ) || time() < $end_date ) ) {
$is_there_any_product = true;
echo sprintf( “<input type=’hidden’ name=’product_id[]’ value=’%d’>”, $ticket->ID );
echo “<tr>”;
echo “<td class=’woocommerce’>”;if ( $product->is_in_stock() ) {
woocommerce_quantity_input( array( ‘input_name’ => ‘quantity_’ . $ticket->ID,
‘input_value’ => 1,
‘min_value’ => 0,
‘max_value’ => $product->backorders_allowed() ? ” : $product->get_stock_quantity(), ) );$is_there_any_product_to_sell = true;
} else {
echo “<span class=’tickets_nostock’>” . esc_html__( ‘Out of stock!’, ‘tribe-wootickets’ ) . “</span>”;
}
echo “</td>”;echo “<td nowrap=’nowrap’ class=’tickets_name’>”;
echo $ticket->name;
echo “</td>”;echo “<td class=’tickets_price’>”;
echo $this->get_price_html( $product );
echo “</td>”;echo “<td class=’tickets_description’>”;
echo $ticket->description;
echo “</td>”;echo “</tr>”;
}}
$contents = ob_get_clean();
if ( $is_there_any_product ) {
?>
<h2 class=”tribe-events-tickets-title”><?php _e( ‘Seats’, ‘tribe-wootickets’ );?></h2>
<?php echo $contents; ?>
<?php if ( $is_there_any_product_to_sell ) { ?>
<tr>
<td colspan=”4″ class=’woocommerce’><button type=”submit”
class=”button alt”><?php esc_html_e( ‘Add to cart’, ‘tribe-wootickets’ );?></button>
</td>
</tr>
<?php
}
}
?></table>
</form>
June 30, 2014 at 6:06 pm #263023matthewdenton
MemberHi Benjamin:
Thanks for reaching out to us in the forums, I personally am not familiar with the WooCommerce Wishlist plugin but I will check with my team mates to see if they have any experience/thoughts that they could share with you.
I’ll follow-up tomorrow with any thoughts they have on this topic but as a heads up providing support for customizations is outside the scope of what help we usually provide.
Thanks again for taking the time to reach out to us.
– Matthew
June 30, 2014 at 6:20 pm #263041matthewdenton
MemberHi:
I had a quick chat with some of our developers and they suggested you reach out to the author of the wishlist plugin to find out how to include that link manually on other pages as it may be as simple as adding a link on the WooTix box.
– Matthew
July 21, 2014 at 7:32 am #470947matthewdenton
MemberHi, I wanted to quickly follow-up with you to see if you are all set or if you have further questions. Please let me know if you do have additional questions I can assist with or if I should go ahead and close this thread.
Thank you,
– Matthew
-
AuthorPosts
- The topic ‘WooCommerce Tickets + Wishlists’ is closed to new replies.
