How to assign different JavaScript variable values based on plan type in Webflow page settings? Answered
Good morning. I'm using MS on a webflow site and I'm trying to assign different values to js variables within the page settings based on plan type. Is this possible?
https://developers.memberstack.com/docs/dom-front-end-package - I have seen some of that, but am having a hard time tracking down what I need to get this to work. It's a real taped-together use of Webflow, SimplyBook.me, and MS.
Code: https://pastebin.com/RUTi8rBb
This is a rough implementation, but they are extremely budget conscious and we're at teh end of it.
I'm basically trying to detect what membership plan they have, then assign variables that get used to build the SimplyBook widget.
Thanks Duncan Hamra
Comments
5 comments
Hi Trey,
Thanks for the information you provided. I've just reviewed your code and added the Memberstack part to it. This is what it should look like:
Feel free to modify it to suit your use case.
Chukwudi thanks for the help, but this isn't quite getting me there.
I think I'm missing something that allows me to use $memberstackDom.
For testing, I'm in console on the page I'm working on and I'm running the following within the console just to make sure I can get the member data and I'm getting "memberstack" is undefined.
let memberDetails = await memberstack.getCurrentMember();
Here's the modified script:
We are in business.
That worked perfectly.
Seriously. I can not thank you enough.
Awesome!! So glad to hear that everything worked out.
Really appreciate the kind words. Happy to help anytime! 🙌
Please sign in to leave a comment.