This store doesn’t have a rating system by default, so a started to build one via bubble, the store only accepts javascripts and HTML codes to be inserted.
So on the store panel i maked this code to show the embeded page that will show the comments/ratings and also gets the product id that’s inside a hidden input.
//gets the product id that's inside a hidden input
const produto_id = document.querySelector('input[name="produto_id"]').value;
console.log(produto_id);
//inserts the iframe inside the div .secao-secundaria
const corpo = document.querySelector(".secao-secundaria");
const embed = document.createElement("iframe");
// Define the properties of the iframe
embed.setAttribute('src', 'https://lamavi.bubbleapps.io/version-test/comentarios');
embed.setAttribute('width', '100%');
embed.setAttribute('height', 'auto');
embed.style.border = "none"; // Remove borders
embed.style.overflow = "hidden"; // Remove scroll
corpo.after(embed);
With that i was able to display the embed bubble correctly, and show the id in the console.log.

However i’m having issues trying to get this id on bubble via JS, i tried using this line of code on toobox that should get the value, but it doesn’t.
const produto_id = document.querySelector('input[name="produto_id"]').value;
console.log(produto_id);
bubble_fn_getid(produto_id)

Any ideas that can solve this? what i’m doing wrong
, thanks in advance.
