Suddenly getting this error pop up when changing the dataset number to display setting.
Failed to load initial data Error: {“message”:“value Some(150) for paging.limit is not valid”,“details”:{}}
It is for a custom product collection repeater.
Have tried to adjust the number of items to display in the dataset settings but it only works for under 100 products. Any ideas if it can work for more than 100?
If you have added a query to it then there is no some filter, it is hasSome.
https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#hasSome
Otherwise, if you are using Wix Stores which is a Wix app, then if you are limited to 100 products you can’t do anything about it.
The only option you have is to do a product collection page as stated in the Wix Stores own support pages.
https://support.wix.com/en/article/creating-a-product-collection-page-in-wix-stores
As this issue is not really code related you would be better suited reading through Wix Stores own support pages for it or contacting Wix Support themselves.
https://support.wix.com/en/wix-stores/setting-up-your-store
https://support.wix.com/en/about-wix/contacting-wix-support
This is part of the code
export function productsRepeater1_itemReady($item, itemData, index) {
$w(“#dataset1”).onReady(() => {
$w(“#dataset1”).setFilter(wixData.filter().hasSome(‘collections.id’, [“decca73f-5011-4966-b465-1f49ede3884d”])
)
.then(() => {
$w(“#productsRepeater1”).expand()
})
});
I still have to add a quantity to the dateset or it shows nothing
For starters you are better off putting your dataset’s own onReady function call into your page’s own onReady function so that the page and your dataset finish loading first, as currently you have your export function happening before your dataset has finished loading.
$w.onReady( () => {
$w("#myDataset").onReady( () => {
As for the repeater, have you simply tried putting pagination into it and set the page size function too?
https://www.wix.com/corvid/reference/$w.Pagination.html
https://www.wix.com/corvid/reference/wix-dataset.html#data-paging
Dataset - Velo API Reference - Wix.com
Finally, check Repeater reference as it should be like this
$w("#myRepeater").onItemReady( ($item, itemData, index) => {
Not just
.... productsRepeater1_itemReady.....
https://www.wix.com/corvid/reference/$w.Repeater.html#onItemReady
Thanks Whisky, will look into that. Seems to all be running fine apart from not being able to show more than 100 products.