HI mibusouha , an error appears due to user is already registered and logged in. You can check this if add “catch” for register(email, password)
. catch ((rejected) =>{
console.log(“rejected”)
console.log(rejected)
console.log(wixUsers.currentUser.getEmail());
})
@dragonlord4469187 , please follow Notes section https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValue . Try to change Lightboxe >Signup > function saveAndRegister() > peace of code
from
$w(‘#dataset1’).setFieldValue(“title”, $w(‘#inEmail’).value.toLowerCase())
to
$w(‘#dataset1’).onReady(() =>{
$w(‘#dataset1’).setFieldValue(“title”, $w(‘#inEmail’).value.toLowerCase()) $w(‘#dataset1’).setFieldValue(“title”, $w(‘#inEmail’).value.toLowerCase())
})
@olesiaz @huangchingyun A better way to do this is to check for the user in Members/PrivateMemberData. Since you have access to the user info there you can check before registering:
import wixData from ‘wix-data’;
import wixUsers from ‘wix-users’;
$w.onReady(() => {
$w(“#registerButton”).onClick(registerUser);
});
// Assumes user email is entered in $w(“#email”)
function registerUser(event) {
if ($w(“#email”).valid && $w(“#password”).valid) {
let email = $w(“#email”).value;
let password = $w(“#password”).value;
wixData.query(“Members/PrivateMemberData”)
.eq(“loginEmail”, email)
.find()
.then((queryResult) => {
if (queryResult.length > 0) {
throw Error(“User already has an account”);
}
return wixUsers.register(email, password);
})
.then(…
})
.catch((error) => {
console.log(error.message);
});
}
}
@stevesoftwareservice Thanks so much Steven!
@huangchingyun No problem. Once you get the hang of this one thing you can do (which I now do regularly) is check to see if an email entered in a textInput field is in the site members data collection (PrivateMembersData). If it is then i automatically present the Login screen. If it isn’t then present the registration screen. Helps with a better UX I think.
Cheers
I cannot Preview the site while editing. Anyone experiencing the same issue?
Yes. I have submitted a ticket.
Very simple question for most of you, but I’m stuggling! Do I need to use Corvid to add pay option or checkout to my bookings? I created a seperate pay pal button at one point and pasted bookings but it shows up on every booking page in the same spot? Point is, bookings includes buttons that say book now and then keeps pushing users to a new page in which they can’t book? I’m very confused? Any help would be great. Is there an easier way to just attach a form/payment option to bookings or do everything a differnt way? Thanks so much!
Hi, Although the API is great, there is so little information on the stores-backend events and just doesn’t seem to work. If there anybody on this forum that has gotten this to work, please advise.
Also, Trying to access information from cart on client side if that is possible?
Thanks,
Tom
@Travis Walch
Have you checked out the Wix Bookings Docs?
@sigpoggy Hi. Our development team has been working on some improvements. Can you please confirm if the issue is still relevant on the site you’ve created for demonstration? If not, please specify the exact scenario. Thank you
I will add Wix made sign-up page on my website. I saw that I have the option to customize sign-up page . I will add username, email,and password on new (light box) sign up page. But when I connect the sign-up page to database. I am not found the password section so what can I do to connect password input to database
@pasiomkar4 The custom sign up cannot be connected to the Members/PrivateMembersData collection in write mode using a dataset. The password field is not available for obvious reasons. You have to use JavaScript to access the element values and the call wixUsers.register to complete the sign-up.
check out this article:
@Steven cropper
thanks
Great work Yova but can I ask you something, can we connect domain to wix.com.
@olesiaz Hi! Any news? I see that the problem is not fixed yet.
Hello, I´m having problems with onViewportEnter( ) working for this code, please can someone check and tell me what to change. Thank you.
export function text60_viewportEnter(event) {
//Add your code for this event here:
}
let startNum = 0;
let endNum = 37;
const duration = 600;
setInterval(()=> {
countUp();
}, duration);
function countUp(){
if (startNum <= endNum ){
$w('#text60').text = startNum.toString();
startNum++;
}
}
let startNum1 = 0;
let endNum1 = 4;
const duration1 = 4000;
$w.onReady(function () {
setInterval(()=> {
countUp1();
}, duration1);
});
function countUp1(){
if (startNum1 <= endNum1 ){
$w('#text62').text = startNum1.toString();
startNum1++;
}
}
let startNum2 = 0;
let endNum2 = 191;
const duration2 = 150;
$w.onReady(function () {
setInterval(()=> {
countUp2();
}, duration2);
});
function countUp2(){
if (startNum2 <= endNum2 ){
$w('#text64').text = startNum2.toString();
startNum2++;
}
}
export function text64_viewportEnter(event) {
//Add your code for this event here:
}
export function text62_viewportEnter(event) {
//Add your code for this event here:
}
export function column15_viewportEnter(event) {
//Add your code for this event here:
}
export function columnStrip4_mouseIn(event) {
//Add your code for this event here:
}
export function text60_mouseIn(event) {
//Add your code for this event here:
I am making a single page website with the help of anchor page. I have added a static element which is common on all the anchor pages but I want to remove that element in few anchors pages. I tried using corvid but it removes that static element from all the pages.
I tried using a single line code " $w(“#myElement”).hide(); ", but it removes the static element from all the pages.
Please provide me with a solution as soon as possible so that I can continue designing my website. I have attached the screenshot. I want to remove the phone image from the 3rd anchor page.
@pasiomkar4 Take a look at this document.
$w(“#page1”) should be a product page element, which this doesn’t appear to be. If it was then it would have a getProduct() function that you can use to access the product data showing on the page.