Beispiel #1
0
/**
 * Regresa las ventanas de tiempo disponibles para el platillo del día / semana
 * @return array $timeframe_options
 */
function get_valid_timeframe($type = "json")
{
    if (is_breakfast() && can_order_breakfast()) {
        return get_valid_breakfast_timeframe($type);
    }
    if (!can_order_breakfast() && can_order_lunch()) {
        return get_valid_lunch_timeframe($type);
    }
    if (can_order_tomorrows_breakfast()) {
        return get_valid_breakfast_timeframe($type);
    }
    //if( is_dinner() ) return get_valid_dinner_timeframe( $type );
    return 0;
}
Beispiel #2
0
	<?php 
if (can_order_breakfast() || can_order_tomorrows_breakfast()) {
    get_template_part('templates/menu', 'desayuno');
}
?>
	<?php 
if (can_order_lunch()) {
    get_template_part('templates/menu', 'comida');
}
?>
	<?php 
// if( can_order_dinner() ) get_template_part( 'templates/menu', 'cena' );
?>

	<?php 
if (!can_order_breakfast() and !can_order_lunch() and !can_order_tomorrows_breakfast()) {
    get_template_part('templates/menu', 'empty');
}
?>

	<?php 
//if ( is_user_logged_in() ) get_template_part( 'templates/store_credits' );
?>

	<section class="[ detalles ][ margin-bottom--large ]">
		<div class="[ container ][ text-center color-secondary ]">
			<div class="[ block ][ col-xs-12 col-sm-10 col-md-8 col-lg-6 col-centered ][ text-center ]">
				<h2 class="">Detalles</h2>
				<div class="[ row ]">
					<div class="[ col-xs-12 col-sm-6 ][ margin-bottom ]">
						<img class="[ svg ][ icon icon--feature icon--stroke ][ margin-bottom--small ]" src="<?php 
Beispiel #3
0
        ?>
</h3>
								<p class="[ no-margin ]"><?php 
        echo format_contenido_platillo($guarnicion_1, $guarnicion_2);
        ?>
</p>
							</div>
							<?php 
        if (is_user_logged_in()) {
            ?>
								<div class="[ col-xs-12 col-sm-4 ]">
									<div class="[ pull-right ][ width-xs-100 ]">
										<?php 
            if (!$product->is_in_stock()) {
                echo '<a rel="nofollow" class="[ btn btn-sm btn-default btn-hollow ]">agotado</a>';
            } elseif (!is_breakfast() && !can_order_breakfast() && !can_order_tomorrows_breakfast()) {
                echo '<a href="' . get_permalink() . '" rel="nofollow" class="[ btn btn-sm btn-primary btn-xs-block ][ js-view-details ]"  data-id="<?php echo $post->ID; ?>" data-name="<?php echo get_the_title(); ?>" data-price="<?php echo $product->price; ?>">ver detalles</a>';
            } else {
                echo woocommerce_template_loop_add_to_cart();
            }
            ?>
									</div>
								</div>
							<?php 
        }
        ?>
						</div>
					</article>
					<?php 
        if ($query_count % 2 == 0) {
            echo '<div class="[ clearfix ]"></div>';