<?php
session_start();
require 'verifica_cookie.php';
require 'conexao.php';
require 'config.php';

$item  = (isset($_POST['item'])) ? $_POST['item'] : '';
$qtde  = (isset($_POST['qtde'])) ? trim($_POST['qtde']) : '';


if (isset($_SESSION['PEDIDO'])):

	if (!empty($qtde)):
		$_SESSION['PEDIDO'][$item]['QUANTIDADE'] = $qtde;
	endif;

	echo json_encode(['status' => 1]);
else:
	echo json_encode(['status' => 0]);
endif;