top of page

Forum Posts

אסף נועם
Nov 27, 2020
In Coding with Velo
really slow to load, unreasonably slow. please don't share the basic "how to make your site load faster", I think it's something deeper. can a wix person help here, maybe look at the site's configuration or something? www.garimd.com thanks
0
11
216
אסף נועם
Nov 21, 2020
In Coding with Velo
this is the webpage: https://www.garimd.com/create-search when I try to fill in details and submit (to database) I get an error: "save operation failed" but I don't understand why or how to fix it. dataset is "write-only", with permissions for "anyone" for everything. advice?
0
3
22
אסף נועם
Nov 15, 2020
In Coding with Velo
I get this message when I load my website: https://www.garimd.com/ and pressing F12: Uncaught TypeError: Cannot read property 'dataset' of null Can anyone help me understand what this means, what is the problem and how can I fix it?
0
9
1k
אסף נועם
Nov 14, 2020
In Coding with Velo
My webpage is not loaded properly, data from query is not inserted to repeater. I think this has something to do with promise but I'm not sure, can anyone help? https://www.garimd.com/for-rent import wixWindow from 'wix-window'; import wixData from 'wix-data'; import wixLocation from 'wix-location'; $w.onReady(() => { // show only approved data //$w('#dataset1').setFilter(wixData.filter().eq('isApproved', true)); wixData.query('RentRealEstate') .eq('isApproved', true) // show only approved data .find() .then((results) => { $w('#repeater1').data = results.items; console.log('here1'); }) // show all cities in dropdown: city wixData.query('RentRealEstate') .ascending('city') .eq('isApproved', true) .find() .then(res => { let options = [{ 'value': '', 'label': 'כל הארץ' }]; const uniqueCities = getUniqueCities(res.items); $w('#dropdownRentCity').options = options.concat((buildOptions(uniqueCities))); console.log('here2'); }) // show all types in dropdown: property-type wixData.query('PropertyTypes') .find() .then(res => { let options = [{'value': '', 'label': 'כל סוג'}]; const uniqueType = getUniqueType(res.items); $w('#dropdownPropertyType').options = options.concat(buildOptions(uniqueType)); }) $w('#dataset1').onReady(() => { $w('#repeater1').onItemReady(($item, itemData, index) => { // open dynamic lightbox on click $item('#buttonOpenLightbox').onClick(() => { wixWindow.openLightbox('LightboxRentRealEstate', itemData); }) // create a google maps link for each item let mapsURL = 'https://www.google.co.il/maps/place/' + itemData.address.replace(' ', '+') + ',+' + itemData.city.replace(' ', '+'); //console.log(mapsURL); $item('#buttonAddress').link = mapsURL; $item('#buttonAddress').target = '_blank'; console.log('here3'); }) }); // // I deleted some necessary code here // function getUniqueCities(items) { const citiesOnly = items.map(item => item.city); // Return an array with a list of unique cities return [...new Set(citiesOnly)]; } function getUniqueType(items) { const uniqueType = items.map(item => item.title); // Return an array with a list of unique cities return [...new Set(uniqueType)]; } function buildOptions(uniqueList) { return uniqueList.map(curr => { return { value: curr, label: curr }; }); }
0
6
35
אסף נועם
Nov 06, 2020
In Coding with Velo
my website is loading ok (speedwise) in Preview mode and also on PC, BUT on my phone - disaster! so slow and non-responsive... what can I do to help my site load faster on mobile??
0
1
23
אסף נועם
Nov 04, 2020
In Coding with Velo
the next function should tell me if current user is on "premium" plan not. I tried to test it but I can't in preview mode. So I signed up as a real user but something isn't working and I can't debug it... any ideas how to test if a user's premium plan is working? $w.onReady(function () { // check if user has a pricing Plan let user = wixUsers.currentUser; let planName; user.getPricingPlans() .then((pricingPlans) => { let userPlan = pricingPlans[0]; planName = userPlan.name; }); if (planName === undefined) { // show at least 2-days-old results var today = new Date().getTime(); // date in milliseconds var twoDaysAgo = new Date(today - (2 * 24 * 60 * 60 * 1000)); $w("#dataset1").setFilter(wixData.filter() .lt("_updatedDate", twoDaysAgo) // remove latest results .eq("isApproved", true)); // show only approved data console.log("user is: " + user.role); console.log("user plan is: " + planName); } else if (planName === "Premium"){ $w("#textConnectedAsPremium").show(); // not working in real user $w("#dataset1").setFilter(wixData.filter() .eq("isApproved", true)); // show only approved data console.log(planName); // can't see it anywhere } // the rest of the code here... }
0
0
34
אסף נועם
Nov 02, 2020
In Coding with Velo
Hi, a code that worked before is not working now and I don't know why, can anyone help? this is the filter code: var today = new Date().getTime(); // date in milliseconds var twoDaysAgo = new Date(today - (2 * 24 * 60 * 60 * 1000)); $w("#dataset1").setFilter(wixData.filter() .lt("_updatedDate", twoDaysAgo)); // remove latest results
0
4
630
אסף נועם
Oct 12, 2020
In Coding with Velo
Hi, I have a repeater that shows info from a dataset, and I connected everything OK. I build a URL using the info from the dataset, but I can't get it to open in a new tab. I tried to define the element's link in the "OnReady" section, and tried it on "OnClick" button. I also know about "target = _blank" but no success. Here is the "onReady" code: $w.onReady(() => { $w("#dataset1").onReady( () => { $w("#repeaterRent").onItemReady(($item, itemData, index) => { // open google maps in a new tab let mapsURL = "https://someWebsite" + $item("#buttonAddress").label.toString().rep(" ", "+") + "," + $item('#textCity').text.replace(" ", "+"); //console.log(mapsURL); $item("#buttonAddress").link = mapsURL; $item("#buttonAddress").target = "_blank"; }) }); }); and here is the button code (OnClick): export function buttonAddress_click(event) { let $item = $w.at(event.context); let mapsURL = "someWebsite" + $item("#buttonAddress").label.toString().replace(" ", "+") + "," + $item('#textCity').text.replace(" ", "+"); //console.log(mapsURL); $item("#buttonAddress").link = mapsURL; }
0
11
219
אסף נועם
Oct 06, 2020
In Coding with Velo
Hi, I'm trying to create a dashboard for uploading info into a dataset. In the dataset there is a "media gallery" field (which can contain several images and videos). Unfortunately I can't find the correct way to upload and submit a number of images at once, I tried the "upload button" but that's not working, and I don't see how can I use the code to do it. The dashboard is for users to upload images into a dataset, so they suppose to be able to do it for multiple items at once. I don't won't to use a number of fields - one for each image, so can anyone help? Thanks...
0
2
137

אסף נועם

More actions
bottom of page