top of page
Forum Posts
Yakup
Feb 15, 2023
In Coding with Velo
I was able to get the code to work but the dropdown menus animated all differently despite the effect is all the same in the code. They feel pretty sticky and not smooth either. If you hover on from Light to Heat with Light buttons the animation changes to a grow effect or a slide in from the left instead of sliding down. Here is the link to the site in progress. Any suggestions? Appreciate your feedback. Thank you. $w.onReady(function () {
$w("#heatBttn").onMouseIn((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "top",
"distance": 50,
};
$item("#heatersBox").expand(), $item("#heatersBox").show("slide", slideOptions);
$item("#lightsBox").collapse(), $item("#lightsBox").hide("slide", slideOptions);
$item("#hwlBox").collapse(), $item("#hwlBox").hide("slide", slideOptions);
});
$w("#heatersBox").onMouseOut((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "top",
"distance": 50,
};
$item("#heatersBox").collapse(), $item("#heatersBox").hide("slide", slideOptions);
});
})
$w.onReady(function () {
$w("#lightBttn").onMouseIn((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "top",
"distance": 50,
};
$item("#lightsBox").expand(), $item("#lightsBox").show("slide", slideOptions);
$item("#heatersBox").collapse(), $item("#heatersBox").hide("slide", slideOptions);
$item("#hwlBox").collapse(), $item("#hwlBox").hide("slide", slideOptions);
});
$w("#lightsBox").onMouseOut((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "bottom",
"distance": 50,
};
$item("#lightsBox").collapse(), $item("#lightsBox").hide("slide", slideOptions);
});
})
$w.onReady(function () {
$w("#lightBttn").onMouseIn((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "top",
"distance": 50,
};
$item("#lightsBox").expand(), $item("#lightsBox").show("slide", slideOptions);
$item("#heatersBox").collapse(), $item("#heatersBox").hide("slide", slideOptions);
$item("#hwlBox").collapse(), $item("#hwlBox").show("slide", slideOptions);
});
$w("#lightsBox").onMouseOut((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "bottom",
"distance": 50,
};
$item("#lightsBox").collapse(), $item("#lightsBox").hide("slide", slideOptions);
});
})
$w.onReady(function () {
$w("#hwlBttn").onMouseIn((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "top",
"distance": 50,
};
$item("#hwlBox").expand(), $item("#hwlBox").show("slide", slideOptions);
$item("#heatersBox").collapse(), $item("#heatersBox").hide("slide", slideOptions);
$item("#lightsBox").collapse(), $item("#lightsBox").hide("slide", slideOptions);
});
$w("#hwlBox").onMouseOut((event) => {
let $item = $w.at(event.context);
let slideOptions = {
"duration": 2000,
"delay": 0,
"direction": "bottom",
"distance": 50,
};
$item("#hwlBox").collapse(), $item("#hwlBox").hide("slide", slideOptions);
});
})
0
0
81
Yakup
Apr 27, 2022
In Coding with Velo
Hi there. I am trying to have a "Book now" button that takes the person directly to the booking process and not the Plans & Pricing page in Editor X. The standard editor has this but it is not available in Editor X. Can anyone put me in the right direction so I can do this with Velo? Thanks.
0
1
14
Yakup
Jan 26, 2022
In Coding with Velo
I am working on an iFrame that first shows an external button. The person has to click to view the registration form connected to the button. Is it possible to customize behavior with Velo so the form is shown upon entering the page instead of having to click the button?
0
1
24
Yakup
Aug 20, 2021
In Coding with Velo
Is it possible to turn off this so the info script doesn't show up every time?
0
2
24
Yakup
May 20, 2020
In Coding with Velo
Hi. I created a custom database and a form page for site members to read and write/update. I also created a copy of the form in a separate page only for the admin to access and do a search by member email. When client/member email is entered the form fields need to populate with the client specific information. Then the admin need to be able to update as well. Couldn't get it to work. Here is the code I used. (Just added a few of the input fields in the code to begin with and test) Appreciate any help. Thank you. import wixData from 'wix-data';
export function emailSearch_click_1(event) {
wixData.query("CPEWorkOrder")
.contains("email", $w("#emailSearch").value)
.find()
.then(res => {
$w("#dataset1").getCurrentItem()
});
let item =
$w.onReady(function () {
$w("#input1").value = item.fullName;
$w("#input2").value = item.address;
$w("#input3").value = item.phoneNumber;
});
}
0
1
19
Yakup
Mar 19, 2020
In Coding with Velo
Hi. Looking for a solution to manipulate a non-looping gallery layout to loop with the arrows. I know there are galleries that have this feature by default but the client is set on the gallery style that doesn't have the feature. I saw the API reference for playing the previous item but not one that pulls up the 1st slide with the click of an arrow on the last item in the gallery. Appreciate any help.
0
2
402
Yakup
Mar 19, 2020
In Coding with Velo
Hi to all. Is there a code that freezes the "hover on" state of a button with an onClick event? Building a secondary menu on a site and I need the button to have the "selected" state like the menu tabs. (Wish wix had the feature to add multiple menus to a site or buttons with 3 states like the menu tabs - I did post it on the feature request forum) - Thanks
0
2
30
Yakup
Nov 27, 2019
In Coding with Velo
I created a product list page with a repeater. It is connected to wix Products/Stores dataset.(#dataset2) The product information fields are connected to a custom database collection ("360precisionproducts") to retrieve the unique product info. Below is my code which I couldn't get to work. Hope someone can help. Thanks. $w.onReady( function () {
$w("#cartButton").onClick( (event) => {
let $item = $w.at(event.context); // Get container scope
let selectedProduct = $item('#dataset2').getCurrentItem();
let productId = selectedProduct._id;
$w('#shoppingCartIcon1').addToCart(productId)
.then(() => {
// Item added to the shopping cart
console.log("add product ${productId} success");
})
.catch((error) => {
// Catch an error that occurs
console.log("Error: ${error.stack}");
});
} );
0
6
814
Yakup
Nov 21, 2019
In Coding with Velo
Hi. I was able to create a flow where the user selects a product from a custom database collection with a button that sends the item's Name to a quote request form in a light box. Things that I need: 1. Add multiple items (instead of selecting an item replacing the one that was selected previously) 2. Being able to submit the item Name along with the rest of the form. (since the item name is coming from a different dataset, submitting the Name to the Quote Request database is not possible. (the website doesn't need the wix stores database as it's only for product quote requests) Below are my codes for Product page with a custom collection dataset and the light box with the form that is connected to a different dataset for submission. import wixWindow from 'wix-window';
$w.onReady(() => {
$w("#dataset2").onReady(() => {
$w("#productRepeater").onItemReady(($item, itemData, index) => {
$item('#cartButton').onClick(() => {
let item = $item('#dataset2').getCurrentItem();
wixWindow.openLightbox('Request A Quote', item)
});
});
}); $w.onReady(() => {
let theItem = lightbox.getContext(); //this is the item you took from page
let postID = theItem._id; // this is the field key for the item ID in the database collection
$w("#dataset3").setFilter(wixData.filter()
.eq("_id", postID) //we are now filtering to display only the item that matches this ID
)
.then(() => {
console.log("Dataset is now filtered");
})
.catch((err) => {
console.log(err);
});
});
0
0
29
Yakup
Nov 15, 2019
In Coding with Velo
I built a custom product page with a repeater. I have been looking for a code that enables the user to click on a button [Add to Request Quote] on the repeater and add the item (or preferably multiple items) to a form without directing to the form (page or light box) until the customer is done picking all the items. (There is another button that will take the customer to the submission form when they are done selecting products). The products are not meant to be in the store as they don't have prices / not wanted to be online orders as they are just catalog items that customers supposed ask for the product's current prices through a form. In short, select an item from a custom database and populate a form with the product name/ID etc. on a form on a different page/light box. I tried Nayeli's tutorial but couldn't modify it to work without going through the Store/Product database (https://www.totallycodable.com/wix/corvid/adding-a-request-quote-button-in-wix-stores) Greatly appreciate if you could point me to the code that facilitates this.
1
0
114
Yakup
Oct 29, 2019
In Coding with Velo
My product features (.csv fields) are different than the required wix store .csv fields. Therefore I am creating a repeater flow that is connected to a custom database to display all the product features. The problem I am having is connecting the "Add To Cart" button to the store database since the repeater is connected to the custom product dataset/database. I created a copy of the product database to the store database with the required wix .csv format so the same items exists and can be purchased by going to the store. Is there a way to add an "Add To Cart" button to the custom product repeater and sync up with the right item at the store? I know there is an "Add To Cart" button I can add from the store tools but the inventory is 250 items. The Add To Cart button won't repeat in the repeater and has to be added individually and edited each time. Please advice. Thanks
0
7
2k
Yakup
Sep 07, 2019
In Coding with Velo
I created a custom sign up flow that enables the new members to fill out their profile then make a payment and then sign up on a custom sign up page to create their login credentials. I had to use the ascend form to be able to charge people the membership fee. The default membership payment did not work for the custom set up for various reasons. If you want to test the flow www.wssmda.com (The membership fee is set to 0.10 for test purposes.) I have almost everything to work correctly except these two issues: - I can not figure out why the new profile information shows on the first login and disappears after logging out and back in again. - Upon updating the profile image the "My Profile form changes but not the image next to the "My Profile" button on the top. Also I wonder if there is a way I can take the user directly to the "My Profile" Page after they finish signing up. They end up staying on the new profile registration page. I had to add a note to let the new member know that they need to click on the My Profile button that shows their name once they register. Here is a copy of my code: import wixUsers from 'wix-users';
import wixData from 'wix-data';
import wixLocation from 'wix-location';
$w.onReady(() => {
if(wixUsers.currentUser.loggedIn) {
$w("#login").label = "Logout";
$w("#profileButton").show();
$w("#image").show();
}
else {
$w("#login").label = "Login";
$w("#profileButton").show();
$w("#image").show();
}
} );
export function login_click(event) {
// user is logged in
if(wixUsers.currentUser.loggedIn) {
// log the user out
wixLocation.to(`/`);
wixUsers.logout()
.then( () => {
// update buttons accordingly
$w("#login").label = "Login";
} );
}
// user is logged out
else {
let userId;
let userEmail;
// prompt the user to log in
wixUsers.promptLogin( {"mode": "login"} )
.then( (user) => {
userId = user.id;
return user.getEmail();
} )
.then( (email) => {
// check if there is an item for the user in the collection
userEmail = email;
return wixData.query("Members")
.eq("_id", userId)
.find();
} )
.then( (results) => {
// if an item for the user is not found
if (results.items.length === 0) {
// create an item
const toInsert = {
"_id": userId,
"email": userEmail
};
// add the item to the collection
wixData.insert("Members", toInsert)
.catch( (err) => {
console.log(err);
} );
}
// update buttons accordingly
$w("#login").label = "Logout";
$w("#profileButton").show();
$w("#image").show();
wixLocation.to(`/Member-Profile/page`);
} )
.catch( (err) => {
console.log(err);
} );
}
//Add your code for this event here:
}
import wixWindow from 'wix-window';
$w.onReady( () => {
if(wixWindow.rendering.renderCycle === 2) {
if(wixUsers.currentUser.loggedIn) {
$w("#login").label = "Logout";
$w("#profileButton").show();
$w("#image").show();
}
else {
$w("#login").label = "Login";
$w("#profileButton").show();
$w("#image").show();
$w('#dataset2').refresh();
}
}
});
1
13
1k
Yakup
Aug 16, 2019
In Coding with Velo
Hi. Let's say I want to buy 4of the same item but I want to buy all the colors available: Red, Blue, Green, Yellow Then I want the user to have an option to click on and have an automatic discount without a coupon (can do this by creating another option that changes the price to a discounted one in the product option value manager) As it stands, this is not possible to do in the same product page due to not being able to select multiple options (colors) and calculate the price accordingly. *** As a work around, I thought about creating check boxes in a custom product page and adding the code that populates the checked boxes' info into a text input field that is connected to customTextField field in the store database. So I could collect the selected color values in a manual fashion and let the buyer only select the quantity for the price calculation. Unfortunately the field is Read Only :( If you understand the logic here and where I am falling short and if you have a code or a work around I'd greatly appreciate it. Thank you.
0
2
282
Yakup
Aug 12, 2019
In Coding with Velo
Hi. Here is the flow and the issue: Product=> Education Program Options needed=> 10 (+1 - all classes) different classes with different themes under the same program. Option#2 needed=> Member/Non Member Issue: Wix Product Options feature doesn't allow selecting multiple option values. The admin needs to see which of the 10 classes the person signs up to. Creating 11 different products for the same Program is a bad user experience as the user needs to land in the same product page and be able to select classes. I need either: 1) A code that enables a dropdown/check box list of the classes which also calculates the fee each time a class is added as well as a discount feature when the member option is selected. Appreciate your help.
0
2
1k
Yakup
Mar 23, 2019
In Coding with Velo
The payment form needs to allow custom form creation for data collection about the member. Also, we need to be able to choose where the user is directed at the end of the process by being able to change the link on the "Got it" button. Please let me know if I am missing an update that fixed these.. Thank you.
0
0
20
Yakup
Oct 02, 2018
In Coding with Velo
My question is related to the Paid Plans area. I understand that we can not customize the form a whole lot. However, I was wondering if there is a way to get rid of or disable the “Got It” button. Since we can’t control where this button directs people (by default it takes them to the home page) I created a custom button on the top of the page instructing people to click on and go to create a profile so they don’t skip creating a profile. But some people still click on “Got it’ because it’s intuitive. They end up with not creating a profile and then send us a note telling us they do not see themselves on the Member Directory although they made a payment. If I can simply remove or disable the Got it button it would solve my problem.
0
4
73
Yakup
Sep 07, 2018
In Coding with Velo
Here is the screen recording.https://drive.google.com/open?id=1onwhgrC9btONLryxLFXbhtQXuM0HzDlU The bell icon doesn't respond to clicks. Similarly when I go to "Profile" and click on Notifications, it doesn't work either.
0
13
431
Yakup
Sep 07, 2018
In Coding with Velo
The input fields and boxes are disabled for editing. Can't "Edit" and get into or double click and edit. They also can not be moved. Basically they freeze. The issue seems to happen in areas related to Wix code. The problem I am having is on a dynamic page. I was able to restart the browser and move similar elements in regular pages. Once I go to the dynamic page and click "Edit" everything freeze. Here is my screen recording of the issue. https://drive.google.com/open?id=1k4jZ_WSnvpBgi5apyLVHysGCLYhWDBzu Hope someone takes a look at this very annoying issue.
0
1
23
Yakup
Sep 06, 2018
In Coding with Velo
(I am new to code) Looking for an easy-to-follow code to add a search bar to find member profiles by Name/LastName/State, basically any of the profile input that exists in the live database. Thanks.
0
3
70
Yakup
Aug 31, 2018
In Coding with Velo
Hi. I am new to using wix code. Does anybody have a script for expandable/collapsable strip (box) with text? I was able to do "read more" but I need a stack of collapsable strips/boxes so they don't have dead space in short text mode. Thank you!!!
0
11
142
Yakup
More actions
bottom of page