Question:
My repeater is a custom made one. Very simple, main media, name, price. Im using it as a related products or ‘You May Also Like…’ repeater at the bottom of the products page.
Problem is I really want to add custom back and next buttons to it, instead of the slider and I don’t want it to automatically loop just move when the buttons are used.
Im unsure where to start. What would be most useful too look at, loops / arrays? Is there specific documents on velo about adding custom nav buttons? Im about to redo a javascript course that i did ages ago to refresh- is that the correct language to bursh up on??
Sorry its been a while and i forgot alot about what i learned previously.
Thank you.
Current Code:
function bindItemReadyForRelatedRepeater(){
$w(“#relatedProductsRepeater”).onItemReady(($item, itemData) => {
$item(“#relatedMainMedia”).src = itemData.mainMedia;
$item(“#relatedMainMedia”).onClick(() => {
wixLocationFrontEnd.to(“/products/” + itemData.slug);
});
$item("#relatedMainMedia").src= itemData.mainMedia;
$item("#relatedProductName").text= itemData.name;
$item("#relatedPrice").text= product.formattedPrice;
})
}
async function populateRelatedRepeater(){
const productsQueryResult = await wixData.query(“Stores/Products”).find();
const products = productsQueryResult.items;
console.log(“products”, products);
$w(“#relatedProductsRepeater”).data = products;
}
Product:
wix studio