get item id / Requesting a quote based on the dynamic page

I added back the defining theProduct, but that didn’t work either

import { session } from 'wix-storage';
import wixLocation from 'wix-location';

$w.onReady(function () {

 $w("#addButton").onClick((event) => {
 let itemObj = $w("#lightingdata").getCurrentItem();
 let theProduct = itemObj._id; //This line gets the ID of the current product
session.setItem("product", theProduct); //This line saved the product ID into session storage
   })
   .then(() => {
    wixLocation.to("/selection");  //This line redirects you to the page with the request form
   })
   .catch((error) => {
    console.log(error);
   });
 });