public function addPurchasableAction(Request $request, CartInterface $cart, $id)
{
$purchasable = $this->get('elcodi.repository.purchasable')->find($id);
if (!$purchasable instanceof PurchasableInterface) {
throw new EntityNotFoundException('Purchasable not found');
}
$cartQuantity = (int) $request->request->get('add-cart-quantity', 1);
$this->get('elcodi.manager.cart')->addPurchasable($cart, $purchasable, $cartQuantity);
return $this->redirect($this->generateUrl('store_cart_view'));
}