top of page

Forum Posts

Annie Lucid
Apr 05, 2019
In Coding with Velo
I'm having a few issues with using the ScrollTo function -- the most important of which is that is seems to only work in Preview. I've tried different browsers and playing around with a few bits of the code to see if that made any difference (like scrolling to a strip instead of an anchor, or having no collapsed items on the page) but none of this made a difference. Can anyone help make this work!? What I'm doing -- I have multiple menus, as you scroll down the page, one disappears and the other appears. I'm using this here within my shop, so when you first get to the page, I'd like the page to load at the shop menu which starts about 600px down the page. But I cannot get the ScrollTo to work on the live published site. See the video below for the Preview version where the page loads using the ScrollTo code then the rest of the code executes correctly. My issue is that on the live site it does not scroll onReady, and/or if it does it jumps back to the top of the page. See code: $w.onReady(function () { $w("#anchor5").scrollTo(); $w("#shopMenu").show(); $w("#shopStrip").show(); $w("#shopCart").expand(); $w("#siteMenu").hide(); $w("#siteStrip").hide(); $w("#siteCart").collapse(); $w("#socialMediaBox").hide(); }); export function anchor1_viewportEnter(event) { $w("#siteMenu").show(); $w("#siteCart").expand(); } export function anchor1_viewportLeave(event) { $w("#siteMenu").hide(); $w("#siteCart").collapse(); } export function anchor2_viewportEnter(event) { $w("#socialMediaBox").show(); } export function anchor2_viewportLeave(event) { $w("#socialMediaBox").hide(); } export function anchor3_viewportEnter(event) { $w("#siteStrip").show(); $w("#shopStripTemp").hide(); } export function anchor3_viewportLeave(event) { $w("#siteStrip").hide(); $w("#shopStripTemp").show(); } export function anchor4_viewportEnter(event) { $w("#shopStrip").hide(); $w("#shopMenu").hide(); $w("#shopCart").collapse(); } export function anchor4_viewportLeave(event) { $w("#shopStrip").show(); $w("#shopMenu").show(); $w("#shopCart").expand(); } You'll see I move between several anchors in order to achieve the appearing/disappearing menu items, so I don't know if this is impacting how the ScrollTo code is working. Is there a way to JUMP to a location on the page On Ready instead of scroll? Thanks in advance to anyone who can shed a little light!!! Annie
ScrollTo only working in Preview... content media
0
2
111
Annie Lucid
Apr 26, 2018
In Coding with Velo
Hi y'all ... I'm stuck (again)! And I could really use some input ASAP, I need to get this off to the clients. I know I saw some post(s) about this a week or 2 ago, but now can't seem to find an answer I have a dynamic Member Profile page which displays the current user's info from the database on the left (this is previously entered using a form) and then on the right, displays the dated they joined, and if they're an active member (noted in DB by boolean) then a membership expiration date is calculated and shown, otherwise, some text appears notifying the user their membership is expired, and for each instance (active/expired) the button shown changes. Preview expired member: Preview active member (contact info removed for privacy): I've worked out all of the other code (I think), and it's fine in preview mode but only the MOST RECENT entry from the database shows up. In other words, in preview, I can see each individual member's profile with their info and the correct dates & button, however, when I go to the live site, I only see the profile of the last person to register (not me!). I need to make sure the currently logged in user sees their profile page and only their profile page when they click on a button "my account" I've synced the database, changed all the permissions to "anyone" ... So I think it's in the code (below) and the issue lies with using getCurrentItem and/or my onReady -- that it's actually getting the most recent item, not the item associated with the current user. Page Code (dynamic page, url: www...com/members/ID and database data.js Backend Code (called for date calculation of 1-year membership expiration) Also, you can see some of how I got to my code here, if it helps: https://www.wix.com/code/home/forum/questions-answers/working-with-dates-and-time-in-wix-code Note: I used a variation on the "standard" member profile code to gather my member info, db and login page... Please, please help! My brain's turning into spaghetti I think And THANK YOU in advance to anyone who's got advice...!?
PLS HELP dynamic pg only shows most recent entry when live content media
0
12
261
Annie Lucid
Mar 29, 2018
In Coding with Velo
I've been all over the forum for the last week, driving a few of you nuts already I'm sure... but I cannot figure out how to make this code work. I need to: - Submit payment to Stripe - Make record of payment in DB - If successful, redirect to "success" page What I really need is someone who can look at my code, make it work, and then briefly walk me through any questions so I know what I've been missing all this time. sends the payment to Stripe and I receive the token ID in the console, but it doesn't process and I don't receive the charge response ID. Also, this currently submits the user's name to a DB and always redirects to "success" page, but I recognize that these things should only happen if the payment is actually successful; otherwise, I need some kind of error message added.Right now I have 2 "versions" of this code, and both basically do the same thing: Version 1: Version 2: Please help!! I'm happy to hire anyone who can get me through this for an hour or 2 of work if I can get this done ASAP! Contact me here, or directly at annie@twentysevencreative.com Thanks in advance!
Hire expert -- fix my code! content media
0
0
80
Annie Lucid
Mar 26, 2018
In Coding with Velo
I could really use some help here... after about a week of trial and error I'm still stuck -- hoping someone can help me finally get this right :) I need to have visitors pay via Stripe -- they complete name + credit card fields (note: I have this code for this working, but only when I don't have other functions connected to its submit button, because this takes longer.. thus async/await) THEN, when they click "submit" I need 1) Stripe to process, then 2) "name" field is saved to a database where I can cross-reference if a user has paid for a membership yet or not, then 3) redirect to "Success" page I've tried many different ways, but can either only process Stripe or submit to the DB, but I need both, and in that order. This code seems to get me the closest to what I need. I just need to figure out the async/await bits... I'm really new to this, and I'm piecing it all together from what's worked and what hasn't, but I think I need something like let ___ = await payNow(); around line 6, just not sure what goes there... Any input is welcome, since I'm about ready to slam my head into the wall, and I really need to get this off to the client. Thanks in advance!!
Async/await help, please content media
0
11
1k

Annie Lucid

More actions
bottom of page