<form action="" id="update-users-informations" class="sends_catering_order" method="POST">
<!-- choice -->
<!-- size -->
<label></label>
<input type="number" class="col-md-8 order_sum form-control" readonly="readonly" value="" name='order_value' placeholder="" />
<label></label>
<input required class="col-md-8 form-control" type='text' name='order_address' placeholder="" value="" />
<input type="submit" class="button btn btn-success" name="submit_order" value="Submit Order" />
}
?>
catering list page
$query2 = mysqli_query($con, "SELECT DISTINCT menu_item_category FROM menus") or trigger_error("Query Failed: " . mysqli_error($con));
while( $result2 = mysqli_fetch_array($query2, MYSQLI_ASSOC)) {
$category = $result2['menu_item_category'];
$replace_menu_href_link = str_replace(" ","_",$category);
$menu_href_link = strtolower($replace_menu_href_link);
?>
js Page
jQuery( ".catering-order-details" ).click(function() {
// Calculeaza pretul total cand butonul este apasat
// Muta pretul rezultat in input
var sum = 0;
jQuery(".cart_items_goes_up input[name='menu_item_price_per_slice[]']").each( function() { //count total price of cart item
sum += +this.value;
});
jQuery('input.order_sum').val( sum);
var minus = jQuery('input.order_sum').val();
jQuery( ".plus-minus-qty" ).keyup(function() {
jQuery(".plus-minus-qty").each( function() {
var productprice = jQuery(this).parent().parent().find(".menu_item_price_per_slice").val();
var multiplywith = jQuery(this).val(); // value of plus-minus-qty
var totalprice = jQuery(this).parent().parent().find('input.temporary_price_foreach_product').val( productprice * multiplywith );
var sumtemporary = 0;
jQuery('.goeshere input.temporary_price_foreach_product').each(function(){
sumtemporary += +this.value;
jQuery('input.order_sum').val( sumtemporary );
//console.log(sumtemporary);
});
});
});
jQuery(".remove-product-from-cart").click( function() {
jQuery(this).parent().remove();
jQuery("#update-user-informations").hover( function() {
jQuery(".plus-minus-qty").each( function() {
var productprice = jQuery(this).parent().parent().find(".menu_item_price_per_slice").val();
var multiplywith = jQuery(this).val();
var totalprice = jQuery(this).parent().parent().find('input.temporary_price_foreach_product').val( productprice * multiplywith );
var sumtemporary = 0;
jQuery('.goeshere input.temporary_price_foreach_product').each(function(){
sumtemporary += +this.value;
jQuery('input.order_sum').val( sumtemporary );
//console.log(sumtemporary);
});
});
});
});
// Concateneaza numele mancarurilor adaugate in cos
// Muta lista intreaga in textarea
var total = '';
jQuery('.cart_items_goes_up .single_menu_item.item_name').each(function(){ //count total item in cart
total += jQuery(this).val();
});
jQuery('textarea.list_of_purchased_items').html(total); //place item value in textarea
var choicetotal = '';
jQuery('.list_of_choice').each(function(){ //count total choice in cart
choicetotal += jQuery(this).val();
//jQuery('input.list_of_choice').val( choicetotal );
});
jQuery('input.list_of_choice').html(choicetotal); //place item choice value
//console.log("choice :- "+choicetotal);
var sizetotal = '';
jQuery('.cart_size_goes_up .size').each(function(){ //count total size in cart
sizetotal += jQuery(this).val();
//jQuery('input.list_of_size').val( sizetotal );
<!--$('#order_size').val("sizetotal");-->
});
jQuery('input.list_of_size').html(sizetotal); //place item size value
//console.log("size :- "+sizetotal);
});