__init__($conn); // Retrieve and print the current product list generated by the customer. if(isset($_GET["update"])){ $p_barcode = []; $p_name = []; $p_ingredients = []; $p_price = []; $p_number = []; $total_price = []; list($p_barcode, $p_name, $p_ingredients, $p_price, $p_number, $total_price) = $_product->get_current_products($_SESSION["user_token"]); $list = "ProductBarcodeIngredientsPrice($)UnitCounsel"; for($i=0; $i '.$p_barcode[$i].' '.$p_ingredients[$i].' '.$p_price[$i].' '.$p_number[$i].' '; } // Create a JSON object from the generated HTML table rows consisting of the product information and the evaluated total cart price. $data = array("list" => $list, "total_price" => "$".$total_price["total_price"]); $j_data = json_encode($data); // Return the recently generated JSON object. echo($j_data); } ?>