Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. // carrito.html
  2. $(document).on('click', '#btnConfirmar', function () {
  3. if (localStorage.id_usuario) {
  4. $.post('../sys/ws/pedido.php', {
  5. op:'confirma_cart',
  6. id_pedido: localStorage.id_pedido
  7. }, function (response) {
  8. localStorage.removeItem("id_pedido");
  9. InstantClick.go('index.html');
  10. });
  11. } else {
  12. InstantClick.go('login.html');
  13. }
  14. });
  15.  
  16.  
  17.  
  18. // sys/ws/pedido.php
  19. case 'confirma_cart':
  20. $objpedido = new pedido();
  21. $objpedido->setVar('id', $_POST['id_pedido']);
  22. $objpedido->setVar('estado_pedido', '1');
  23. echo json_encode($objpedido->updateDB());
  24. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement