top of page
Forum Posts
Queens Market
May 05, 2021
In Coding with Velo
Sometimes my Collections get unchecked in WixStores, and I have to re-add them. When I do this, the order gets mixed up. I would really like to figure out some code to make sure when the page loads it is in the right order.
Originally I read that this is not possible, unless its a repeater linked to a database, but that just seems like a lot of work to get it to look exactly like the format of the Store. So there must be a way to code it. I looked again, recently, and on brief reading it seems now that WixStores is now integrated. I could be wrong.
These are the pages I have been to and have had no luck,
1) https://support.wix.com/en/article/velo-wix-stores-products-collection-fields 2) https://www.wix.com/velo/forum/coding-with-velo/sorting-filter-for-my-wix-store 3) https://www.wix.com/velo/forum/coding-with-velo/default-sort-order-of-wix-store 4) https://www.wix.com/velo/forum/coding-with-velo/alphabetical-database-list-not-alphabetical-on-site
I know a bit of code, but not much. Experience old HTML. LOL :P. I am doing this site pro-bono to help out a store desperately in need of sales during Lock Down because of Covid. I am trying to better it.
This is what I have so far, which I know is not right and is probably just a mish-mash of code.
wixData.query("Stores/Collections")
.find()
.then( (results) => {
// handle the results
.ascending("name")
} );
Thanks for all help going forward. :)
0
0
8
Queens Market
May 04, 2021
In Coding with Velo
I tried adding to another thread, but it was closed and my problem is still not sorted out. I will try to transfer what I know.
This is the code I had:
$w.onReady(function () {
$w("#repeater1").onItemReady( ($w, itemData, index) => {
if (itemData === undefined || itemData.email === undefined || itemData.email.length === 0) {
let vendorString = "";
if (itemData !== undefined) {
vendorString = itemData.vendor;
}
$w("#email").hide();
} else {
let vendorString = itemData.vendor;
}
if (itemData === undefined || itemData.socialMedia === undefined || itemData.socialMedia.length === 0) {
let vendorString = "";
if (itemData !== undefined) {
vendorString = itemData.socialMedia;
}
$w("#social").hide();
} else {
let vendorString = itemData.socialMedia;
}
});
And it all of a sudden stopped working.
So I tried this:
$w.onReady(function(){ $w("#vendorDataset").onReady(()=>{ if($w("#email").link ===""){ $w("#email").hide();} if($w("#socialMedia").link ===""){ $w("#socialMedia").hide(); } }); });
Which was definitely wrong because I forgot to mention that it was a repeater. So I returned back to the other code, but it is still not working.
Here are some images which might help..
Dataset Name:
Button Names:
Here is the reference page: www.thequeensmarketshop .com/vendors Here is an image of the database showing blank entries.
Its a Normal Page and not a Dynamic page, at least I don't think.
Thanks to those who have helped me so far.
@russian-dima @Kristof @stcroppe
0
17
629
Queens Market
More actions
bottom of page