Problem
when I call this
const wixClient = await wixClientServer();
const res = wixClient.products.queryProducts();
let data;
try {
data = await res.find();
} catch (e) {
}
console.log(data);
the data is undefind
Problem
when I call this
const wixClient = await wixClientServer();
const res = wixClient.products.queryProducts();
let data;
try {
data = await res.find();
} catch (e) {
}
console.log(data);
the data is undefind
Hi, try using queryProducts() in this way:
import { products } from "wix-stores.v2";
async function queryProducts() {
const { items } = products.queryProducts().find();
}
You can find the queryProducts()
method documented here: Query Product Variants | Velo