Hi everyone,
I’m struggling with a feature I want to add to my website and I would appreciate your help.
I have a dynamic page where I show product information depending of what product they click on a repeater. When they are on this dynamic page I show the relevant data of that product coming from my database.
One item of the relevant product can be the number 0, if this is the case I want to hide this text. I tried this with the following code but unfortunately I didn’t manage to get it working.
import wixData from ‘wix-data’;
$w.onReady( async function () {
wixData.query(“dynamicDataset”)
.eq(“finalePrijsColruyt”, 0)
.find() // Run the query
.then( (results) => {
$w(‘#text59’).hide();
}
);
});
I have also tried the following:
import wixData from ‘wix-data’;
$w.onReady( async function () {
let value = $w(“#text59”).text
if (value === “0”){
$w(‘#text59’).hide();
}
else {
$w(‘#text59’).show();
}
});