Created
August 20, 2017 00:02
-
-
Save EliuTimana/11481e3c87d82957877a88cce4a60a39 to your computer and use it in GitHub Desktop.
cambios jhudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// carrito.html | |
$(document).on('click', '#btnConfirmar', function () { | |
if (localStorage.id_usuario) { | |
$.post('../sys/ws/pedido.php', { | |
op:'confirma_cart', | |
id_pedido: localStorage.id_pedido | |
}, function (response) { | |
localStorage.removeItem("id_pedido"); | |
InstantClick.go('index.html'); | |
}); | |
} else { | |
InstantClick.go('login.html'); | |
} | |
}); | |
// sys/ws/pedido.php | |
case 'confirma_cart': | |
$objpedido = new pedido(); | |
$objpedido->setVar('id', $_POST['id_pedido']); | |
$objpedido->setVar('estado_pedido', '1'); | |
echo json_encode($objpedido->updateDB()); | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment