Display Filtered Image, Number, and Rich Text Field Types on Repeater

Good afternoon all,

I am almost complete with my page code but would like to know how to display image, number and rich text field types on my repeater. Besides this, my code works flawlessly.

Here is my code:

wixData.query("batteryfitment") 
             .include("title") 
                .contains("year", VINInfo.Results[8].Value) 
                .and(wixData.query("batteryfitment") 
                    .contains("make", VINInfo.Results[5].Value) 
                    .and(wixData.query("batteryfitment") 
                        .contains("model", VINInfo.Results[7].Value))) 
                .find() 
                .then((results1) => { 
 let  results = results1; 
                    console.log(results1); 
                    $w("#text1").text = results.items[0].title[0].name; 
                    $w("#text3").text = results.items[0].title[0].description; 
                    $w("#image8").src = results.items[0].title[0].mainMedia; 


All feedback/advice is greatly appreciated!

Best regards,
Brittani

Start by checking the documentation for the API out here:

Good afternoon @stcroppe ,
Thank you for your response! I was able to figure out how to display the results but am now stuck on how to add the filtered product result to the cart. Any thoughts?

@tsuyoidesigns one thing I propose is that you get familiar with the Wix Code architecture and the API documentation.

For example every element on a Wix page has an API that you can use to perform some action.

Also in the editor when you type in the element name - e.g. $(“#shoppingCart”) and add the “.” after it you are presented a number of options for properties and functions to call in the editor autocomplete mode.

when you select a property or function and add it to the element - e.g. $(“#shoppingCart”).addProductsToCart() - and hover over the function name you will get a link to the docs - Read More.

Now this will take you to a page like this: https://www.wix.com/corvid/reference/$w.CartIcon.html#addProductsToCart

  • which explains how to interact with the shopping cart using the shopping cart icon Element and the selected function.

So to answer the question check the link out above and see how you go ;-).