Jump to content

Facundo

New Members
  • Posts

    4
  • Joined

  • Last visited

Facundo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi ginerjm, The problem is that the pagination, search and filter of the datatable disappear, I found that the error is thanks to this: </tr> <?php for ($i = 1; $i < $numProductos; $i++) { ?> <tr> <td><?php echo $descripcionProductos[$i] ?></td> <td><?php echo $cantidadProductos[$i] ?></td> <?php $productoPrecio = obtenerPrecioProductoPedido($codigoPedido, $descripcionProductos[$i]); ?> <td><?php echo $productoPrecio ?></td> </tr> <?php } ?> <?php } ?> </tbody> I'm going to see what mac_gyver said maybe you have a solution
  2. My table shows an order, but when an order is created with more than one product, the filtering, search and pagination options disappear. I want these options to not disappear while maintaining the ability to show more than one product in the order. Here is the complete code: https://live.datatables.net/hedazavu/1/edit
  3. sorry, I do not understand. I understand that the pagination, filter, and search disappear because I have more than one product in my order (I tried deleting the counter and the pagination, filter, and search appear)
  4. I have this part of code where I show data in the table: <?php foreach ($pedidos as $dato) { $codigoPedido = $dato['Codigo_pedido']; $razonSocialCliente = $dato['Razon_social']; $tipoPedido = $dato['Tipo_pedido']; $nombreEmpleado = $dato['NombreEmpleado']; $estadoPedido = $dato['Estado_pedido']; $fechaPedido = $dato['Fecha']; $descripcionProductos = explode('<br>', $dato['DescripcionProductos']); $cantidadProductos = explode(' ', $dato['CantidadProductos']); $precioTotal = $dato['PrecioTotal']; $numProductos = count($descripcionProductos); if (count($cantidadProductos) !== $numProductos) { continue; } ?> <tr> <td rowspan="<?php echo $numProductos ?>"><?php echo $codigoPedido ?></td> <td rowspan="<?php echo $numProductos ?>"><?php echo $razonSocialCliente ?></td> <td rowspan="<?php echo $numProductos ?>"><?php echo $tipoPedido ?></td> <td rowspan="<?php echo $numProductos ?>"><?php echo $nombreEmpleado ?></td> <td rowspan="<?php echo $numProductos ?>"><?php echo $estadoPedido ?></td> <td rowspan="<?php echo $numProductos ?>"><?php echo $fechaPedido ?></td> <td><?php echo $descripcionProductos[0] ?></td> <td><?php echo $cantidadProductos[0] ?></td> <?php $primerProductoPrecio = obtenerPrecioProductoPedido($codigoPedido, $descripcionProductos[0]); ?> <td><?php echo $primerProductoPrecio ?></td> <td rowspan="<?php echo $numProductos ?>"> <a href="borrarPedido.php?id=<?php echo $codigoPedido ?>" onclick='return test_click();' class="btn btn-danger"><i class="fas fa-user-minus"></i></a> <a href="actualizarPedido.php?id=<?php echo $codigoPedido ?>" class="btn btn-info"><i class="fas fa-pen"></i></a> <a href="agregarremito.php?id=<?php echo $codigoPedido ?>" class="btn btn-info"><i class="fas fa-bars"></i></a> </td> </tr> <?php for ($i = 1; $i < $numProductos; $i++) { ?> <tr> <td><?php echo $descripcionProductos[$i] ?></td> <td><?php echo $cantidadProductos[$i] ?></td> <?php $productoPrecio = obtenerPrecioProductoPedido($codigoPedido, $descripcionProductos[$i]); ?> <td><?php echo $productoPrecio ?></td> </tr> <?php } ?> <?php } ?> </tbody> I need help because in the part where I add more than one data in a row, it makes the filter, pagination and search disappear
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.