Add cart nodejs mongodb

Good morning all
I am training to develop a shopping cart site. I have done almost everything but I cannot add a product to the cart.
Please how to do

File controllers

const AjoutProduit = require('../models/Ajout_Produits')

const getAccueil = (req, res) =>{

    AjoutProduit.find((err, ajouterProduit) =>{
        if(err) throw err
        res.render('accueil', {produit: ajouterProduit})

const getLogin = (req, res) =>{

const getDescription = (req, res) =>{
    const {id} = req.params

    AjoutProduit.findById(id, (err, produitDescription) =>{
        if(err) throw err
        res.render('description', {produitDescription: produitDescription})

const getPanier = (req, res) =>{

const postPanier = (req, res) =>{
    const produitId = req.body.produitID


module.exports = {
    getAccueil: getAccueil, 
    getLogin: getLogin,
    getDescription: getDescription,
    getPanier: getPanier,
    postPanier: postPanier

File ejs

<!DOCTYPE html>
<html lang="fr">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="">
    <script src="" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
    <script src="" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src=''></script>
      <%- include('./partials/nav')   %>

      <h4 class="text-center mt-5 mb-5">###  CARD EST LA POUR VOUS   ###</h4>

      <div class="container mb-5 mt-5">
        <div class="row">
          <%  for(produit of produit)  {%>
            <div class="col-12 col-md-12 col-lg-4 col-xl-4 mb-5">
              <div class="card">
                <img src="<%= produit.image  %>" class="card-img-top" alt="<%= produit.image  %>">
                <div class="card-body">
                  <h5 class="card-title text-center"><i class="fas fa-signature"></i> <%= produit.name_produit  %></h5>
                  <h5 class="card-text text-center" ><i class="fas fa-money-bill-wave"></i> <%= produit.prix  %> £</h5>
                  <div class="text-center">
                    <a target="blank" href="/description/<%=  %>" class="btn btn-primary w-25 mt-3">Voir</a> 
                    <form method="POST" action="ajoutPanier" class="w-100 mt-3">
                      <input type="hidden" name="produitID" value="<%=  %>" />
                       <button type="submit" class="btn btn-danger w-25">Panier</button>
            <%}   %>



      <%- include('./partials/footer')   %>


Hey Mouhamad,

any errors in the Browser Console?
Any errors in the Browser Network Tab? (red font color)
Any logs in the express console?

no I have no error.
I wanted to know how to add a product to a cart

So what is your specific question?

When I search for “mongodb add data” I find a lot of docs, articles, examples, tutorials.

Ok, I want when someone clicks add a cart the product is added to the cart

it’s a shopping cart that I’m developing

I just want how to add a product to a cart to buy it

Sure, but it seems you want us to give you the finished solution.
That’s not what we do here.

What do you not understand to build this on your own?
When I search for “mongodb add data” I literally find 100 examples on how to add data to a database.

So what is the current problem you can’t fix?

Are you trying it through regular form post or api?

Just a wild guess.
Kindly check on your app.js if you have this middleware
app.use(express.urlencoded({extended: true, limit: '10kb'}))