The original approach was incorrect since modifying the Drupal table was complex and difficult to be implemented as it is.
The approach I ended up taking was to create a custom dynamic javascript table with the jQuery UI sortable table plugin attached to it, and filling a Drupal table field with the values of that dynamic table. This way the developer has better control over the behavior of the table without having to change the underlying Drupal table behavior.
Good afternoon, I am getting a 406 Not Acceptable on the request below. I see I need to append the format to the request but I am unclear on where to do that? Is there a patch that fixes this? Help !! What view do I change or update?
I am trying to create shopping cart functionality via a custom module.
I send the cart items from my controller to my twig template using the following code.
MainController.php
// get the cart items and send them to twig template
public function loadCart() {
$data = $this->db_logic->getCart();
return [
'#theme' => 'cart',
'#title' => false,
'#data' => $data,
];
}