I try to do a search at additional Info Sectios of the products and it does not work
import {local} from 'wix-storage';
import wixData from 'wix-data';
import wixLocation from 'wix-location';
import wixWindow from 'wix-window';
import wixStoresBackend from 'wix-stores-backend';
$w.onReady(function () {
if (wixWindow.rendering.env === "browser") {
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
$w('#searchInkRepeater').onItemReady(($w, itemData, index) => {
$w('#image21').src = itemData.mainMedia;
$w('#image21').alt = itemData.name;
$w('#image21').link = itemData.productPageUrl;
$w('#button29').onClick(() => {
wixLocation.to("https://www.topink.co.il/product-page/" + itemData.slug);
});
$w('#addToCartIcon').onClick(()=>{
$w('#shoppingCartIcon1').addToCart(itemData._id);
});
$w('#text64').text = itemData.name;
$w('#text86').text = itemData.formattedDiscountedPrice;
}, 1000);
})
}//TODO: write your page related code here...
});
let lastFilterInfoSections;
let debounceTimer;
export function searchInk_keyPress(event, $w) {
$w('#group15').expand()
if (debounceTimer) {
clearTimeout(debounceTimer);
debounceTimer = undefined;
}
debounceTimer = setTimeout(() => {
filter($w('#searchInk').value);
}, 100);//Add your code for this event here:
}
function filter(InfoSections) {
if (lastFilterInfoSections !== InfoSections) {
wixData.query("Stores/Products")
.limit(8)
.contains('additionalInfoSections', InfoSections)
.find()
.then(res => {
$w('#searchInkRepeater').data = res.items;
let items = res.items;
let firstItem = items[0];
let totalCount = res.totalCount;
let pageSize = res.pageSize;
let currentPage = res.currentPage;
let totalPages = res.totalPages;
let hasNext = res.hasNext();
let hasPrev = res.hasPrev();
let length = res.length;
let query = res.query;
})
.catch( (error) => {
let errorMsg = error.message;
let code = error.code;
} );
lastFilterInfoSections = InfoSections;
}
}
https://www.topink.co.il/ink-and-toner
I appreciate the help
have a nice day