Advertisement
BakerMan

Section of existing WooTix template

Mar 20th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1. if ( ( !$product->is_in_stock() ) || ( empty( $start_date ) || time() > $start_date ) && (  empty( $end_date ) || time() < $end_date ) ) {
  2.  
  3.     $is_there_any_product = true;
  4.  
  5.     echo sprintf( "<input type='hidden' name='product_id[]' value='%d'>", $ticket->ID );
  6.  
  7.     echo "<tr>";
  8.     echo "<td width='75' class='woocommerce'>";
  9.  
  10.  
  11.     if ( $product->is_in_stock() ) {
  12.  
  13.         woocommerce_quantity_input( array( 'input_name'  => 'quantity_' . $ticket->ID,
  14.                                            'input_value' => 0,
  15.                                            'min_value'   => 0,
  16.                                            'max_value'   => $product->backorders_allowed() ? '' : $product->get_stock_quantity(), ) );
  17.  
  18.         $is_there_any_product_to_sell = true;
  19.  
  20.     } else {
  21.         echo "<span class='tickets_nostock'>" . esc_html__( 'Out of stock!', 'tribe-wootickets' ) . "</span>";
  22.     }
  23.     echo "</td>";
  24.  
  25.     echo "<td nowrap='nowrap' class='tickets_name'>";
  26.     echo $ticket->name;
  27.     echo "</td>";
  28.  
  29.     echo "<td class='tickets_price'>";
  30.     echo $this->get_price_html( $product );
  31.     echo "</td>";
  32.  
  33.     echo "<td class='tickets_description'>";
  34.     echo $ticket->description;
  35.     echo "</td>";
  36.  
  37.     echo "</tr>";
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement