I’m new to Javascript and Wix. I have basic experience with HTML, PHP, and MySQL. I am trying to create a website with some javascript in it and am struggling. I am working off of a tutorial on WIX code to create a members only area. I would like to have some additional member features that the members app does not allow (such as multiple “levels” of membership). So I started with the following code and it’s producing nothing dynamic on the website. I think the issue is it’s not recognizing ‘wix-users’, wix-data’, or ‘wix-location’ from the following code. They are all red. Can someone help me? Do I need to make the page dynamic?
import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
" member features that the members app does not allow (such as multiple “levels” of membership) " My website has something similar. With all of these things I suggest using database collections and using those to keep track of membership information. I suggest following some database tutorials.
Thanjs for the reply. I have my databases set up and am comfortable using them. I have used SQL databases in the past with PHP, but am having troubles with javascript. I put some code in straight off a wix tutorial and cannot seem to get the results on my site I should be. Are there tutorials that help explain the basics of using javascript with the WIX editor?
Velo API Reference - Wix.com This is the best, except for the responses of specialists here on the forum
Hi,
Check out this tutorial .
Roi.
I suggest following this tutorial to make members only websites: Velo Tutorial: Building Your Own Members Area | Help Center | Wix.com,
Use your knowledge of database collections along with that tutorial to put their login information into a collection along with a boolean or number for whether or not they are a certain membership. Check their email against an email query in the collection to see if their email matches. If it finds a match, see if that boolean is true or not. That’s the best way to validate, as far as I know.