i’m building my JSON string over a http-function by querying Wix Data:
import {ok, notFound, serverError} from 'wix-http-functions';
import wixData from 'wix-data';
export function get_getproducts(request) {
[... some code for JSON header ...]
wixData.query("Stores/Products")
.find()
[... some code for JSON body ...]
but the attribute ‘sku’ of a product variant is obviously stored elsewhere. how can i get it or how can i join each product variant ?
or does someone else have a better idea how to store a GTIN per product variant (a variant is a different size or color in this context) ? but, i don’t want to display the GTIN in the shop.