I have a repeater that pulls the data (Image, title and description) from the Stores/Products collection.
I’d like to have text elements within each repeated item that displays three of the info sections I have for each product, but I just can’t seem to figure out how to get access to the additionalInfoSections in the Products collection.
The info sections are for displaying the genre, the tempo and the tag of the product. (I sell music instrumentals).
I have made it work with a button with an onClick event, which logs all the descriptions for the additional sections, but I want to seperate them and show them individually with text elements.
// This snippet is a part of 'export function audioRepeater_itemReady($item, itemData, index)'
// #dataset3 is the Products collection
let product = $item('#dataset3').getCurrentItem()
let ArrayAdditionaInfo = []
ArrayAdditionaInfo = product.additionalInfoSections
ArrayAdditionaInfo.forEach((element) => {
if ($item('#consoleBtn').onClick) {
console.log(element.description)
}
})
Any help is much appreciated.
I’m still learning both Javascript and Wix Code, so bear with me and my confused questions.