<p style="text-align: center; font-family: Rounded; font-size: 17px; color: white; margin-bottom: 50px; margin-top: 50px;text-transform:uppercase"> COSTO DI CONSEGNA 3€ / RAGGIO D'AZIONE: CATONA-PELLARO / ORARIO 19:00 - 22:30 </p> <p style="text-align: center; font-family: Rounded; font-size: 14px; color: white; margin-bottom: 20px; margin-top: 20px;text-transform:uppercase">Effettua il tuo ordine asporto/domicilio e attendi di ricevere il messaggio di conferma! Grazie </p> <script text="javascript"> function mostraBoxBurger(max){ for(var i=4;i<max ;i++){ document.getElementById('panel-80-0-0-'+i+'').style.display="block"; } document.getElementById('bottone-apri-burger-'+max+'').setAttribute('onclick','chiudiBoxBurger(10)'); } function chiudiBoxBurger(max){ for(var i=4;i<max;i++){ document.getElementById('panel-80-0-0-'+i+'').style.display="none"; } document.getElementById('bottone-apri-burger-'+max+'').setAttribute('onclick','mostraBoxBurger(10)'); } </script></max></script>
<div style="<?php if(get_option('pane-salsiccia')=='disattiva'){ ?>display:none<?php } ?>"> <a id="bottone-apri-burger-2" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(2)"><div class="contenitore-bottone-finestrella">PANINO CON SALSICCIA <img src=""/></div></a> </div>
<div class="contenitore-titolo-categoria"> <span>PANINO CON SALSICCIA</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Panino con salsiccia - Carne', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $conta1=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $conta1 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $conta1++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>INGREDIENTI BASE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Panino con salsiccia', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_formaggio_<?php echo $cont2b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>INGREDIENTI EXTRA</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Panino con salsiccia - Extra', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2c=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_formaggio_<?php echo $cont2c ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteUnEuro('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont2c++; endwhile; ?> </div>
<?php if(get_option('sezione_hambuger')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a href="javascript:void(0)" id="bottone-apri-burger-10" onclick="mostraBoxBurger(10)"> <div class="contenitore-bottone-finestrella">HAMBURGER<img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/Cheeseburger-300x200-1.png" /></div> </a> <?php if(get_option('sezione_hambuger')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>BURGERS</span> - <span style="font-size:17px">Componi il tuo hamburger! Seleziona la carne, il tipo di pane e max 5 ingredienti a scelta</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Carne', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $cont ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont++; endwhile; ?> </div>
<div class="contenitore-titolo-categoria"> <span>PANE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Pane', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont1=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_pane_<?php echo $cont1?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont1++; endwhile; ?> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Pane Senza Glutine', ); $loop = new WP_Query( $args ); $cont20=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont20 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteUnEuro('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont20++; endwhile; ?> </div>
<div class="contenitore-titolo-categoria"> <span>FORMAGGI</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Formaggio', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_formaggio_<?php echo $cont2 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2++; endwhile; ?> </div>
<div class="contenitore-titolo-categoria"> <span>VERDURE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Verdura', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont3=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_verdura_<?php echo $cont3 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont3++; endwhile; ?> </div>
<div class="contenitore-titolo-categoria"> <span>SALSE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Salsa', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont8=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont8 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont8++; endwhile; ?> </div>
<div class="contenitore-titolo-categoria"> <span>VARIE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Extra', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont9=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont9 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont9++; endwhile; ?> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Extra(+1€)', ); $loop = new WP_Query( $args ); $cont12=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont12 ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteUnEuro('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont12++; endwhile; ?> </div>
<?php if(get_option('sezione_stuzzicherie')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-11" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(11)"><div class="contenitore-bottone-finestrella">STUZZICHERIE <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/Group-1-2.png"/></div></a> <?php if(get_option('sezione_stuzzicherie')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>PATATE FRITTE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Patate Fritte', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont4=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_stuzzicheria_<?php echo $cont4 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'x')"> <?php $cont4++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>POLLO FRITTO</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Pollo Fritto', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont30=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_stuzzicheria_<?php echo $cont30?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'x')"> <?php $cont30++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>ALTRE FRITTURE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Altre Fritture', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont31=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_stuzzicheria_<?php echo $cont31?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'x')"> <?php $cont31++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>SALSE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Salse Stuzzicherie', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont32=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_stuzzicheria_<?php echo $cont32?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'x')"> <?php $cont32++; endwhile; ?> </div>
<?php if(get_option('sezione_club')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-13" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(13)"><div class="contenitore-bottone-finestrella">CLUB SANDWICH <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/img_pg_pastrami.png"/></div></a> <?php if(get_option('sezione_club')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>CLUB SANDWICH </span><span style="color:white; font-family:Rounded; font-size: 14px;"></span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Club Sandwich', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont6=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); $descrizione=get_post_meta($id,'descrizione', true); ?> <input type="button" id="elemento_club_<?php echo $cont6 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'n')"> <br> <span class="descrizione-panino">(<?php echo $descrizione ?>)</span><br> <hr> <?php $cont6++; endwhile; ?> </div>
<?php if(get_option('sezione_club_componibili')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-15" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(15)"><div class="contenitore-bottone-finestrella">COMPONIBILI: CLUB SANDWICH e HOT DOG <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/img_pg_pastrami.png"/></div></a> <?php if(get_option('sezione_club_componibili')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>COMPONI IL TUO SANDWICH / HOT DOG </span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Componibili', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $conta=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $conta ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $conta++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>FORMAGGI</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Formaggio', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_formaggio_<?php echo $cont2a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2a++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>VERDURE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Verdura', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont3a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_verdura_<?php echo $cont3a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont3a++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>SALSE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Salsa', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont8a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont8a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont8a++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>VARIE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Extra', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont9a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont9a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont9a++; endwhile; ?> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Extra(+1€)', ); $loop = new WP_Query( $args ); $cont12a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont12a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteUnEuro('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont12a++; endwhile; ?> </div>
<?php if(get_option('sezione_hot_dog')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-17" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(17)"><div class="contenitore-bottone-finestrella">HOT DOG <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/hot_dog_PNG10217-e1495534125114.png"/></div></a> <?php if(get_option('sezione_hot_dog')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>HOT DOG</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Hot Dog', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont10=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); $descrizione=get_post_meta($id,'descrizione', true); ?> <input type="button" id="elemento_cheesesteak_<?php echo $cont10 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'n')"> <br> <span class="descrizione-panino"><?php echo $descrizione ?></span><br> <hr> <?php $cont10++; endwhile; ?> </div>
<?php if(get_option('sezione_insalate')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-19" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(19)"><div class="contenitore-bottone-finestrella">INSALATE<img src="http://www.romagnam.it/images/insalata.png"/></div></a> <?php if(get_option('sezione_insalate')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>INSALATE</span> <span style="font-size:17px"> (tutte le insalate sono comprensive di insalata iceberg + max 5 condimenti a scelta) </span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $contb=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $contb ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('Insalata - <?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $contb++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>FORMAGGI</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Formaggi Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_formaggio_<?php echo $cont2b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>VERDURE FRESCHE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Verdure Fresche Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont3b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_verdura_<?php echo $cont3b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont3b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>VERDURE ARROSTO INSALATA</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Verdure Arrosto Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont8b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont8b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont8b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>SALSE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Salse Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont8b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont8b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont8b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>VARIE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Varie Insalata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont9b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salsa_<?php echo $cont9b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont9b++; endwhile; ?> </div>
<?php if(get_option('sezione_dolci')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-21" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(21)"><div class="contenitore-bottone-finestrella">BARATTOLINI</div></a> <?php if(get_option('sezione_dolci')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>DOLCI</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Dolce', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont7=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_dolce_<?php echo $cont7 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'n')"> <?php $cont7++; endwhile; ?> </div>
<?php if(get_option('sezione_dolci_componibili')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-23" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(23)"><div class="contenitore-bottone-finestrella">DOLCI COMPONIBILI<img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/cheesecake.png"/></div></a> <?php if(get_option('sezione_dolci_componibili')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>COMPONI IL TUO DOLCE</span> <span style="font-size:17px">(dolce + max 3 ingredienti compresi nel prezzo) </span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>' Dolci Componibili', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $conta=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $conta ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $conta++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>TOPPING</span> <span style="font-size:17px">(max 2)</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Topping', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_topping_<?php echo $cont2a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteDolce('<?php the_title() ?>')"> <?php $cont2a++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>SNACK E BISCOTTI</span> <span style="font-size:17px">(max 1)</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Snack e biscotti', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont3a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_snack_<?php echo $cont3a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteDolce('<?php the_title() ?>')"> <?php $cont3a++; endwhile; ?> </div>
<?php if(get_option('sezione_crepes')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-25" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(25)"><div class="contenitore-bottone-finestrella">CIAMBELLE</div></a> <?php if(get_option('sezione_crepes')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>CIAMBELLE (max 2 topping compresi nel prezzo)</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Ciambella', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont10=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); $descrizione=get_post_meta($id,'descrizione', true); ?> <input type="button" id="elemento_crepes_<?php echo $cont10 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $cont10++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>TOPPING</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Crema Ciambella', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2a=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_crema_<?php echo $cont2a ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngredienteCiambella('<?php the_title() ?>')"> <?php $cont2a++; endwhile; ?> </div>
<?php if(get_option('sezione_bevande')=="disattivo"){ ?> <div style="display:none"> <?php } ?> <a id="bottone-apri-burger-27" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(27)"><div class="contenitore-bottone-finestrella">BEVANDE <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/Bevande.png"/></div></a> <?php if(get_option('sezione_bevande')=="disattivo"){ ?> </div> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>BEVANDE</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Bevanda', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont11=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_crepes_<?php echo $cont11 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'n')"> <?php $cont11++; endwhile; ?> </div>
<?php if(get_option('bellokinu')=='attivo'){ ?> <a id="bottone-apri-burger-29" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(29)"><div class="contenitore-bottone-finestrella">BELLOKINU </div></a> <?php } ?>
<div class="contenitore-titolo-categoria"> <span>BELLOKINU</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Bellokinu - Pane', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $conta1=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_carne_<?php echo $conta1 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoCarne('<?php the_title() ?>', <?php echo $prezzo ?>)"> <?php $conta1++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>SALUMI (max 1)</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Bellokinu - Salumi', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_salumi_<?php echo $cont2b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2b++; endwhile; ?> </div> <div class="contenitore-titolo-categoria"> <span>CONDIMENTI (max 4)</span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Bellokinu - Condimenti', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont2b=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); ?> <input type="button" id="elemento_condimento_<?php echo $cont2b ?>" class="bottone-menu" value="<?php the_title() ?>" onclick="aggiungiIngrediente('<?php the_title() ?>')"> <?php $cont2b++; endwhile; ?> </div>
<?php if(get_option('edizione_limitata')=='attiva'){ ?> <a id="bottone-apri-burger-31" class="link-bottone-menu" href="javascript:void(0)" onclick="mostraBoxGenerico(31)"><div class="contenitore-bottone-finestrella" style="background: rgb(231, 255, 36);"> LIMITED EDITION - CACIO BURGER <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/Cheeseburger-300x200-1.png"/></div></a> <?php } ?>
<?php if(get_option('edizione_limitata')=='attiva'){ ?> <div class="contenitore-titolo-categoria"> <span style="font-size:17px">Pane sesamo + Italia / pollo panato / pollo arrosto + caciocavallo calabrese + patate dipper speziate + pancetta coppata + salsa crispy </span> </div> <div class="contenitore-bottoni-menu"> <?php $args = array( 'post_type' =>'ingrediente', 'post_status'=> 'publish', 'posts_per_page'=> -1, 'meta_key'=>'categoria', 'meta_value'=>'Edizione Limitata', 'orderby'=> 'title', 'order' => 'ASC' ); $loop = new WP_Query( $args ); $cont25=1; while ( $loop->have_posts() ) : $loop->the_post(); $id=get_the_ID(); $prezzo=get_post_meta($id,'prezzo', true); $img_1 = wp_get_attachment_image_src(get_post_meta($id,'immagine_1',true), $size, $icon ); $img_2 = wp_get_attachment_image_src(get_post_meta($id,'immagine_2',true), $size, $icon ); $img_3 = wp_get_attachment_image_src(get_post_meta($id,'immagine_3',true), $size, $icon ); ?> <input type="button" id="elemento_edizionelimitata_<?php echo $cont25 ?>" class="bottone-menu" value="<?php the_title() ?> - <?php echo $prezzo ?>€" onclick="aggiungiElementoGenerico('<?php the_title() ?>', <?php echo $prezzo ?>,'n')"> <div class="contenitore-foto-speciali"> <?php if (get_post_meta($id,'immagine_1',true)<>'') { ?> <div class="contenitore-miniatura"> <a data-fancybox="gallery" href="<?php echo $img_1[0] ?>"> <img class="miniatura-panino" src="<?php echo $img_1[0] ?>"> </a> </div> <?php } ?> <?php if (get_post_meta($id,'immagine_2',true)<>'') { ?> <div class="contenitore-miniatura"> <a data-fancybox="gallery" href="<?php echo $img_2[0] ?>"> <img class="miniatura-panino" src="<?php echo $img_2[0] ?>"> </a> </div> <?php } ?> <?php if (get_post_meta($id,'immagine_3',true)<>'') { ?> <div class="contenitore-miniatura"> <a data-fancybox="gallery" href="<?php echo $img_3[0] ?>"> <img class="miniatura-panino" src="<?php echo $img_3[0] ?>"> </a> </div> <?php } ?> </div> <?php $cont25++; endwhile; ?> </div> <?php } ?> <script src="//code.jquery.com/jquery-3.3.1.min.js"></script> <link rel="stylesheet" href="https://www.hamburgeriarc.com/wp-content/plugins/fancybox/dist/jquery.fancybox.min.css" /> <script src="https://www.hamburgeriarc.com/wp-content/plugins/fancybox/dist/jquery.fancybox.min.js"></script>
<a href="javascript:void(0)" id="bottone-carrello" onclick="mostraOrdine()"> <img src="https://www.hamburgeriarc.com/wp-content/uploads/2017/05/shopping-cart-349544_960_720.png"/> <span id="totale-ordine-cell" class='totale-ordine'></span> </a> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { $( "#bottone-carrello" ).draggable(); } ); </script> <script text="javascript"> function mostraBoxGenerico(val){ document.getElementById('panel-80-0-0-'+val+'').style.display="block"; document.getElementById('bottone-apri-burger-'+val+'').setAttribute('onclick','chiudiBoxGenerico('+val+')'); } function chiudiBoxGenerico(val){ document.getElementById('panel-80-0-0-'+val+'').style.display="none"; document.getElementById('bottone-apri-burger-'+val+'').setAttribute('onclick','mostraBoxGenerico('+val+')'); } function mostraOrdine(){ document.getElementById('contenitore-ordine').style.display="block"; } function chiudiOrdine(){ document.getElementById('contenitore-ordine').style.display="none"; } function apriMenu(){ for (i=0; i<27; i++) { if(i==0 || i==1 || i==3 || i==1 || i==10 || i==12 || i==14 || i==16 || i==18 || i==20 || i==22 ){ document.getElementById('panel-80-0-0-'+ i).style.display="block"; } } document.getElementById('panel-80-0-0-27').style.display="none"; } </script> <?php if(get_option('avviso_ritardo_ordini')=='attivo') { ?> <style> #panel-80-0-0-0,#panel-80-0-0-1,#panel-80-0-0-2,#panel-80-0-0-3,#panel-80-0-0-4,#panel-80-0-0-5,#panel-80-0-0-6,#panel-80-0-0-7,#panel-80-0-0-8,#panel-80-0-0-9,#panel-80-0-0-10,#panel-80-0-0-11,#panel-80-0-0-12,#panel-80-0-0-13,#panel-80-0-0-14,#panel-80-0-0-15,#panel-80-0-0-16,#panel-80-0-0-17,#panel-80-0-0-18,#panel-80-0-0-19,#panel-80-0-0-20,#panel-80-0-0-21,#panel-80-0-0-22,#panel-80-0-0-23,#panel-80-0-0-24,#panel-80-0-0-25,#panel-80-0-0-26 ,#panel-80-0-0-27,#panel-80-0-0-29{ display:none; } </style> <?php } ?> <?php if(get_option('avviso_ritardo_ordini')=='disattivo') { ?> <style> #panel-80-0-0-31{ display:none; } </style> <?php } ?>
<div class="contenitore-ordine" id="contenitore-ordine"> <div class="contenitore-titolo-ordine"> <span>IL TUO ORDINE</span> <input style="float:right;margin-right:6px;padding:0px;padding-left: 5px;padding-right: 5px;background: red;color: white;" type="button" id="chiudi-ordine" onclick="chiudiOrdine()" value="X"> </div> <ul class="contenuto-ordine" id="contenuto-ordine"> </ul> <span id="totale-ordine" class='totale-ordine'></span><input type="button" style="float:right;height:45px;margin-right: 15px;background: red;color: white;font-family: 'Rounded';font-weight: 800;" value="CONFERMA" onclick="inviaMenu()"><br> </div>
<script > var elementiMenu= new Array(); var prezzi=new Array(); var panino_selezionato; var cont_generale=0; var contatore_ingredienti=0; var oggi="<?php echo date("D") ?>"; var orario = new Date(); orario = "<?php date_default_timezone_set('Europe/Rome'); echo date("H:i") ?>"; function selezionaPanino(val){ panino_selezionato=val; } function aggiungiElementoCarne(value,prezzo){ var contenuto=document.getElementById('contenuto-ordine'); elementiMenu.push(value); prezzi.push(prezzo); console.log("LUNGHEZZA MENU: " + elementiMenu.length); var panino_corrente=elementiMenu.length-1; var prezzo_corrente=prezzi.length-1; var chiusura='<input id="elimina-elemento" class="elimina-elemento" type="button" onclick="eliminaElemento('+cont_generale+','+prezzo+')" value="X">'; contenuto.innerHTML=contenuto.innerHTML + '<a href="javascript:void(0)" class="link-panino" onclick="selezionaPanino('+cont_generale+')" ><li style="border-bottom: 1px solid black!important;" id="panino-'+cont_generale+'">' + elementiMenu[panino_corrente] + ' - ' + prezzi[prezzo_corrente]+'€'+ chiusura +'</li></a>'; panino_selezionato=panino_corrente; var totale=0; for(var i=0;i<prezzi.length; i++){ totale=totale+prezzi[i]; } document.getElementById('totale-ordine').innerHTML="<span id='tot-cell'>TOTALE:</span> <span id='valore-totale-ordine'>"+totale.toFixed(2)+"</span>€"; document.getElementById('totale-ordine-cell').innerHTML=" <span id='valore-totale-ordine-cell'>"+totale.toFixed(2)+"€</span>"; cont_generale++; } function aggiungiIngrediente(nome){ var numero_elementi=0; if(document.getElementById("lista-ingredienti-panino-"+panino_selezionato+"")){ var elemento=document.getElementById('lista-ingredienti-panino-'+panino_selezionato+''); numero_elementi=elemento.childNodes.length ; } if(numero_elementi<7){ contatore_ingredienti++; var chiusura='<input id="elimina-ingrediente" class="elimina-elemento" type="button" onclick="eliminaIngrediente('+contatore_ingredienti+')" value="X">'; document.getElementById('panino-'+panino_selezionato+'').innerHTML= document.getElementById('panino-'+panino_selezionato+'').innerHTML+"<ul id='lista-ingredienti-panino-"+panino_selezionato+"' class='lista-ingredienti-panino'> </ul>"; document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML= document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML + "<li id='ingrediente-"+contatore_ingredienti+"'>"+[nome]+[chiusura]+"</li>"; }else{ window.alert("SI POSSONO AGGIUNGERE MASSIMO 5 INGREDIENTI !!"); } } function aggiungiIngredienteDolce(nome){ var numero_elementi=0; if(document.getElementById("lista-ingredienti-panino-"+panino_selezionato+"")){ var elemento=document.getElementById('lista-ingredienti-panino-'+panino_selezionato+''); numero_elementi=elemento.childNodes.length ; } if(numero_elementi<5){ contatore_ingredienti++; var chiusura='<input id="elimina-ingrediente" class="elimina-elemento" type="button" onclick="eliminaIngrediente('+contatore_ingredienti+')" value="X">'; document.getElementById('panino-'+panino_selezionato+'').innerHTML= document.getElementById('panino-'+panino_selezionato+'').innerHTML+"<ul id='lista-ingredienti-panino-"+panino_selezionato+"' class='lista-ingredienti-panino'> </ul>"; document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML= document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML + "<li id='ingrediente-"+contatore_ingredienti+"'>"+[nome]+[chiusura]+"</li>"; }else{ window.alert("NEL DOLCE SI POSSONO AGGIUNGERE MASSIMO 4 INGREDIENTI !!"); } } function aggiungiIngredienteCiambella(nome){ var numero_elementi=0; if(document.getElementById("lista-ingredienti-panino-"+panino_selezionato+"")){ var elemento=document.getElementById('lista-ingredienti-panino-'+panino_selezionato+''); numero_elementi=elemento.childNodes.length ; } if(numero_elementi<3){ contatore_ingredienti++; var chiusura='<input id="elimina-ingrediente" class="elimina-elemento" type="button" onclick="eliminaIngrediente('+contatore_ingredienti+')" value="X">'; document.getElementById('panino-'+panino_selezionato+'').innerHTML= document.getElementById('panino-'+panino_selezionato+'').innerHTML+"<ul id='lista-ingredienti-panino-"+panino_selezionato+"' class='lista-ingredienti-panino'> </ul>"; document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML= document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML + "<li id='ingrediente-"+contatore_ingredienti+"'>"+[nome]+[chiusura]+"</li>"; }else{ window.alert("NELLE CIAMBELLE SI POSSONO AGGIUNGERE MASSIMO 2 TOPPING !!"); } } function eliminaIngrediente(val){ var elemento; elemento=document.getElementById('ingrediente-'+[val]+''); elemento.parentNode.removeChild(elemento); } function aggiungiElementoGenerico(value,prezzo,antipasto){ var contenuto=document.getElementById('contenuto-ordine'); elementiMenu.push(value); prezzi.push(prezzo); console.log("LUNGHEZZA MENU: " + elementiMenu.length); var panino_corrente=elementiMenu.length-1; var prezzo_corrente=prezzi.length-1; var chiusura='<input id="elimina-elemento" class="elimina-elemento" type="button" onclick="eliminaElemento('+cont_generale+', '+prezzo+')" value="X">'; if(antipasto=='x'){ contenuto.innerHTML=contenuto.innerHTML + '<li style="border-bottom: 1px solid black!important;" id="panino-'+cont_generale+'" alt="antipasto">' + elementiMenu[panino_corrente] + ' - ' + prezzi[prezzo_corrente]+'€'+ chiusura +'</li></a>'; }else{ contenuto.innerHTML=contenuto.innerHTML + '<li style="border-bottom: 1px solid black!important;" id="panino-'+cont_generale+'">' + elementiMenu[panino_corrente] + ' - ' + prezzi[prezzo_corrente]+'€'+ chiusura +'</li></a>'; } var totale=0; for(var i=0;i<prezzi.length; i++){ totale=totale+prezzi[i]; } document.getElementById('totale-ordine').innerHTML="TOTALE: <span id='valore-totale-ordine'>"+totale.toFixed(2)+"</span>€"; document.getElementById('totale-ordine-cell').innerHTML=" <span id='valore-totale-ordine-cell'>"+totale.toFixed(2)+"€</span>"; cont_generale++; } function eliminaElemento(pos,prezzo){ var elemento; elemento=document.getElementById('panino-'+[pos]+''); elemento.parentNode.removeChild(elemento); var totale=0; for(var i=0;i<prezzi.length; i++){ if(prezzi[i]==prezzo){ prezzi.splice(i,1); break; } } for(var i=0;i<prezzi.length; i++){ totale=totale+prezzi[i]; } document.getElementById('totale-ordine').innerHTML="TOTALE: <span id='valore-totale-ordine'>"+totale.toFixed(2)+"</span>€"; document.getElementById('totale-ordine-cell').innerHTML=" <span id='valore-totale-ordine-cell'>"+totale.toFixed(2)+"€</span>"; } function rimuoviLink(){ var b = document.getElementsByClassName('link-panino'); while(b.length) { var parent = b[ 0 ].parentNode; while( b[ 0 ].firstChild ) { parent.insertBefore( b[ 0 ].firstChild, b[ 0 ] ); } parent.removeChild( b[ 0 ] ); } } function inviaMenu(){ if(oggi !="<?php echo get_option('giorno_chiusura') ?>" && document.getElementById('valore-totale-ordine').innerHTML >= <?php echo get_option('limite_spesa') ?> && orario >= "<?php echo get_option('orario_inizio') ?>" && orario <= "<?php echo get_option('orario_fine') ?>" ){ var ingr=document.getElementsByClassName('elimina-elemento'); for(var i=ingr.length ;i--; ){ ingr[i].remove(); } rimuoviLink(); var prezzo=document.getElementById('valore-totale-ordine').innerHTML; var ordine=document.getElementById('contenuto-ordine').innerHTML; var antipasti = document.getElementById("contenuto-ordine").querySelectorAll("li[alt='antipasto']"); var antipasti_testo = ""; for(var k = 0; k < antipasti.length; k++ ){ var temp = antipasti[k]; antipasti_testo = antipasti_testo + temp.outerHTML; } var testo='<input type="text" name="prezzo" value="'+prezzo+'" ><input type="submit" id="bottone-conferma-ordine" value="CONFERMA"></form>'; var testo3 = '<textarea style="display:none" id="contenuto-antipasti" name="antipasti">' + antipasti_testo + '</textarea>'; var testo2='<form action="../conferma-ordine-test" method="post"><textarea style="display:none" id="contenuto-ordine" name="ordine">'+ordine+'</textarea>'+testo3 + testo+''; document.getElementById('invio-ordine').innerHTML=testo2; document.getElementById('bottone-conferma-ordine').click(); }else{ window.alert("<?php echo get_option('messaggio_chiusura') ?>"); } } function aggiungiIngredienteUnEuro(nome,prezzo){ var numero_elementi=0; if(document.getElementById("lista-ingredienti-panino-"+panino_selezionato+"")){ var elemento=document.getElementById('lista-ingredienti-panino-'+panino_selezionato+''); numero_elementi=elemento.childNodes.length ; console.log(numero_elementi); } if(numero_elementi<7){ contatore_ingredienti++; var chiusura='<input id="elimina-ingrediente" class="elimina-elemento" type="button" onclick="eliminaIngredienteUnEuro('+contatore_ingredienti+','+prezzo+')" value="X">'; document.getElementById('panino-'+panino_selezionato+'').innerHTML= document.getElementById('panino-'+panino_selezionato+'').innerHTML+"<ul id='lista-ingredienti-panino-"+panino_selezionato+"' class='lista-ingredienti-panino'> </ul>"; document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML= document.getElementById('lista-ingredienti-panino-'+panino_selezionato+'').innerHTML + "<li id='ingrediente-"+contatore_ingredienti+"'>"+[nome]+[chiusura]+"</li>"; prezzi.push(prezzo); var totale=0; for(var i=0;i<prezzi.length; i++){ totale=totale+prezzi[i]; } document.getElementById('totale-ordine').innerHTML="TOTALE: <span id='valore-totale-ordine'>"+totale.toFixed(2)+"</span>€"; document.getElementById('totale-ordine-cell').innerHTML=" <span id='valore-totale-ordine-cell'>"+totale.toFixed(2)+"€</span>"; }else{ window.alert("SI POSSONO AGGIUNGERE MASSIMO 5 INGREDIENTI !!"); } } function eliminaIngredienteUnEuro(val,prezzo){ var elemento; elemento=document.getElementById('ingrediente-'+[val]+''); elemento.parentNode.removeChild(elemento); var totale=0; for(var i=0;i<prezzi.length; i++){ if(prezzi[i]==prezzo){ prezzi.splice(i,1); break; } } for(var i=0;i<prezzi.length; i++){ totale=totale+prezzi[i]; } document.getElementById('totale-ordine').innerHTML="TOTALE: <span id='valore-totale-ordine'>"+totale.toFixed(2)+"</span>€"; document.getElementById('totale-ordine-cell').innerHTML=" <span id='valore-totale-ordine-cell'>"+totale.toFixed(2)+"€</span>"; } </script>
<div id="invio-ordine"> </div>