Member vs. Contact - Collections

Thank you so much for clearing this up! I guess I will move on to my car registration database and the photo gallery for each car. Hopefully, they will release this sooner than later!

Happy Holidays!
JD

2 Likes

I am trying to do the same thing - match up entries in my member database with users that have signed up via Contacts - and was directed to this thread.

Has there been any progress on this in the last month? Where is the best place to get updates?

hey guys can i replace the email in sign in with a number
and remove the remove my password button

Hello Nayeli I am interested on the comming soon " because of the same thing. I dont want all members to see all the pages, i want certain members to see what pages they paid to see. not all because I sell courses and I want each member to see each course page they got.

I guess you are talking about the comming soon called:
-Roles & Permissions ( Lets you identify users and define what they can see and do throughout your site.)

I am curious, it says users not members… Is it user like roles of different admins?

The best thing it could be is that you tell each member by tags what pages they can access and what pages they cant’s because they did not pay for them.

Or a new Learning Management System so I can sell my courses in peace.

Thank you!

Diego, I’m no expert here, but I have been playing around quite a bit with this and similar areas of code for the last 6 weeks, so maybe I can help clarify for you (or anyone else) who’s still a little confused…

So you mentioned several different things: members, users, admins, roles/permissions… I’ll try to explain what each of these means, and it might help you sort thru the code

A user is the person viewing & using your site – they may or may not be a member. Wix has 3 types of users (learn more here ): Visitor (someone using the site who is not logged in), Member (someone who is logged in), and Admin (someone who has backend privileges):

A member – someone who entered their email and created a password in order to login to member-only pages of your site (this is saved in the Wix Contacts dashboard and is NOT automatically or directly connected to any database thta you might create). You set individual web pages as public, password-protected, or members-only within the Editor, when you select “Manage Pages” (note that anyone who is a member or has a password will be able to access these pages, there isn’t really a way to create “tiers” yet)

Menu > Manage Pages > Permissions:

Admins & Roles/Permissions – you can grant a variety of roles and permissions to editors of your site through the Wix dashboard, and while you can create areas of your site that are only visible to these people (by hiding them, for instance), this shouldn’t be used for your paying customers, but rather designers/bloggers/etc who should have access to the backend of your site.

The feature Wix has had “COMING SOON” since (at least) Christmas is supposed to be a true Paid Membership/Subscription type setup, wherein you can grant different levels of permission to individual users based on whether or not they’ve paid.

As for the Member/User & Contact list, the 2 aren’t really connected, but you can use the Member/User list you create (presumably from a form that enters info into a database) to cross-reference and verify if a site member (someone who created a login and is your Contact list) is _____ (paid member, fits certain criteria, etc) using Wix Code.

Phew. I’m not completely sure if that’s what you were referring to, but if so, that should clarify, I hope!

Also, WIX — please, PLEASE release this! I feel like I see people struggling with these same code issues almost daily. We need paid-member sites and subscriptions!

2 Likes

is there a way i can get my members who sign up and added to my contact list into the database im doing it at the moment via they sign up then they after activate there account via log out n back in but my members are complaining about it

Robert, what are you trying to add to the database?

Is the issue that you want new members approved after they create an account? If not (which means anyone can create an account), then…

You can follow this tutorial which should allow your visitors to:

  1. Visit your site
  2. Create an account (this will add them to your Contact list)
  3. Redirect them to a new page with a form to gather whatever info you want in your database
  4. Submit form and redirect them to another page

But if the problem is that you want

  1. Create an account
  2. Admin approves account (THEN visitor has access to members-only pages)
  3. Add some data to a database…

You’ll need to get more creative with the code.

Not sure if that answers your question – let me know and I’ll see if my limited knowledge helps

i wnt to use the new members pges and have there details in a databse when they register so i can add customer promotions to eachh customer if they earnt them as at min they after sign up then click a button so it adds to database and some dont do it

Robert,

There’s [currently] no way to connect the Contact and a database – I’m still not entirely sure I understand what you’re trying to do, but I can share what my solution for a paid-members site has been…

  1. User completes form, clicks “submit,” form fields connect to database, redirect to next page
  2. In this case, my users now complete payment, but this step can be skipped if unnecessary
  3. Redirect to “success” page – note: this page must be members-only (see below)
  4. User must now sign up using Wix’s Members app (this creates new Contact)
  5. Users now see “success” page content … If sign-up must be approved, then simply write some text that explains they’ll have access once approved / If not, users will have access immediately

So this is sort of backwards, but it forces users to complete the form before they can become a site member and access members-only pages. The trick is to make the “success” page members-only so it prompts them to create an account (you can also do this with code if you want to customize further, but this is simpler) – when you do this, make sure your Wix Members App settings are set to “sign up” first also (again, you can change this in code too, but more complicated)

Does that make sense? Does that help? If so, let me know and I can share the code I put together

1 Like

i hve manged a way to do it but its complicated for my members to do it would just be alot easier

i currently do it like this -

This is a sample of the members page I have on my site. Instead of the member’s page displaying the date somebody joined, I would prefer to display email, phone and address as this is a resident’s community website. Having to create a members data collection is double entry and maintenance of data. Any ideas how to do this? If this can be done, can one sort by something other than oldest and newest member and member role?

Alternatively, is there a way for the admin of the site to fill in this information in each member’s About Page?

Thx in advance.

1 Like

Hi,
Currently there’s no integration of Wix Code with Wix Members page. Therefore, there’s no option to modify the page to display different / other information.

Best,
Tal.

1 Like

Although it’s not a logical user experience this makes sense. However, the custom database ID and the wix Contacts App ID are two different entities. This creates all kinds of problems when the Member updates their profile in the custom database collection since the member login is managed in the wix App and can not be updated through the database. I am looking for a solution myself.

This situation makes creating a custom members database meaningless. Simply, a website can not have two separate member management fields for the same user. It’s non-sense and it’s useless. Wix needs to address this as well as adding a note to all member database creation tutorials about this. Spent days to create the database only to run into this deal-breaker issue.

4 Likes

Different angle on the same question:

Can I make the primary key of the Contacts database a foreign key entry in a separate collection that I create?

I think this would let me use the Wix Members app to have members sign up, then they could create and update their additional attributes through a read&write form after login. That form would be linked to a separate collection where their primary key appears as a foreign key, thereby linking this additional attributes information to each individual member in a one-to-one relationship.

Is that possible in Wix? And if so, what are the steps to follow to set this up?

Thank you!

N

Hi Nicolas:

The most important aspect of managing auxiliary data associated with a member is to create a data collection with ‘_id’ mapped to the contact/member id.

There are a few ways to set this up.

  1. If you use the wix-users.register function you can create your own custom registration page and capture all of your member’s data in a single registration activity. Basically after the user signs up (registered) you get a Promise result that contains the member record id. You can then create your toAdd object with ‘_id’ equal to the registered id.

  2. You can force the additional auxiliary data upon login for the first time by accessing the wix-users.currentUser object. If isLoggedIn is true you can search your data collection (or dataset if you want) for a record with an ‘_id’ record that equals [wix-data.query().eq()]. If there is the a record then you can load the ‘profile page’ and have the user fill out you auxiliary data. If there is a record then you can ignore the forced update and defer to a menu option.

Hopefully that makes sense.

Steve

1 Like

Just read this posting by chance and got excited thinking maybe I missed this “coming soon” update. It’s Oct 2018 and still not there. This is a huge pain and it makes the custom members area less effective than it could be. I hope they fix this soon.

1 Like

@stcroppe what is the code for step #1?

@dustin Hi Dustin

The API Documentation provides some good examples.

This link shows how to use the register function.
https://www.wix.com/code/reference/wix-users.html#register


When you get the result from the wixUsers.register call you need to access the user object from result:

let user = result.user;

the syntax for a user object is described in the API documentation here:
https://www.wix.com/code/reference/wix-users.User.html

Which shows how to access the id field from the user object


You use the wix-data (or the wix-dataset to create and update records in a data collection.
The APIs are documented here

Here is an example using the wix-data API.

When you use wix-data.save() you can insert a new data record or update an existing record. The wix-data API relies on unique column values in the ID column of the record. You access the ID record using the field key ‘_id’. When you insert a record you can choose to include an _id value or not. If you don’t then the wix-data API will generate a new unique value for you. If you do it will be used as a unique value. Any record with the same _id will be overwritten (updated).

Since user.id values are also unique you can tie the registered user id saved in the CRM to your data collection using this id value.


The code snippet above shows how to assign values to properties in an object to be saved to a data collection. Each property is a “key” : “value” pair where the “key” is the field key from the data collection and value is the value you want to assign to the column identified by the field key.

In the above example toSave is used to create the data collection object. In this example the value assigned to the “_id” field key is “00001”. You would modify this to use the user id like so:

let toSave = {
    “_id”: user.id,
    ”email”: email, // email variable from above 
    ...   // Add other fields you need in your data collection
};

Hope that answers your question.

Steve

@info52 yes I agree, it isn’t really logical and creates a messy situation on the backend. There were other issues relating to this member/contact/login issue that still never really got resolved… :frowning: