I’ve set up a store but didn’t like the default slug (product page) so edited this and started fresh.
I can get all the info to link except the images in the ‘Media Items’ column won’t show on a Pro Gallery.
Am I doing something wrong?
I’ve set up a store but didn’t like the default slug (product page) so edited this and started fresh.
I can get all the info to link except the images in the ‘Media Items’ column won’t show on a Pro Gallery.
Am I doing something wrong?
The pro gallery is nothing more than an Array of objects that have a similar setup of these elements. That’s why I created a Custom Object of it myself.
function GalleryItem() {
this.type = "image",
this.slug = "",
this.title = "",
this.description = "",
this.src = "";
this.link = "";
}
Having this said. Your Media Items is not one Image but an Array of Images.
So, with a simple forEach you can loop through these Images and create a GalleryItem that you put into an Array itemList
let itemList = [];
...
//begin your forEach loop
let galleryItem = new GalleryItem();
... //set the items src is the image url
itemList.push(galleryItem);
//end loop
Having this Array allows you to populate your gallery
$w("#gallery1").items = itemList;