Can this be done?

Hi

I was forwarded your contact through Wix to post my issue on here and see if what I’m looking for on my site could be done.

I am in a problematic scenario where my current coder (from the Wix Expert Arena) has turned out not be able to do this. Leaving me having lost time and money on my site and missing my launch date. Leaving me with a huge problem with my business and no idea if the job can even be done!

Therefore I am hoping you can help me, I am creating an online yoga video subscription website and the work I initially set out for my current Wix Expert to do was to allow the site to function so that people could:

  • sign up to the homepage through call to actions,

  • they click the call to action taking them to a paid plans page,

  • they select an option of either free trial (1month (I asked if it could be changed to 7 days - and was told yes)), a recurring monthly payment, or yearly payment.

  • Once selected they create a members profile or page

  • Once they are signed up that they then return to the homepage where it has no more call to actions and they can access the videos as they please.

  • Other areas to consider is the payment process and setting up a recurring payment through the site to bank accounts, the management of members, (can members be added manually without having to sign up for payment)

The current coder has lied to about his ability to do the work and, like i said, he isn’t able to do the work. It has left me having to take legal action and contact Wix for help. Leaving me here.

If I could give you an example of the the site that I am looking to emulate (LET ME ITERATE! - from a functionality/ user timeline point of view, not design or look as I realise it is a very advanced/expensive site) it would be www.alomoves.com. On this site you’ll notice that you are able to sign up to a free 7 day trial, create a member account, then after the 7 days you are transferred to being a full paying member.
I would like my site to function this way where the sign up process, membership creation and recurring payments are seamless, with option to cancel anytime.

My current coder has left me in a place where I have missed my deadline as well as time and money. I will be seeking legal action against him but I need to know if what I’m looking to do is possible. I’ve lost a lot of trust and so after discussing with Wix they pointed me here, as well as to some other coders. But I would like any professional opinion that would know whether Wix coding can produce the results I am after.

If you’ve made it here to the end. Thank you. Well done. I’m sorry but I have been left in a very frustrating situation.

I look forward to hearing from you :slight_smile:

1 Like

Hey man!
The site you refer to is created in Ruby on Rails. Probably by using the course from Udemy (https://www.udemy.com/rails-video-subscription-application/) or some gem available.

If you use Wix Paid Plans you won’t be able to set them on Trial using that app. What you could to is if they do not want to subscribe at once.

  1. Create their membership
  2. Set the membership Trial Boolean Flag = True
  3. Add them into the Trial Membership Role which can see some videos.
  4. After the test period is done uncheck the Trial Flag and the next time they get to the site they will be redirected to the Wix Paid Plans app so subscribe and cannot have a trial no longer.

Just remember that Wix Membership system do not provide a valid email checker so if you get a lot of trial users with bad emails over and over again you must consider creating a validation routine for the trial users only.

Everything is is built into Wix almost I guess or like below list

  • sign up to the homepage through call to actions, (BUILT INTO WIX)

  • they click the call to action taking them to a paid plans page, (BUILT INTO WIX)

  • they select an option of either free trial (1month (I asked if it could be changed to 7 days - and was told yes)), a recurring monthly payment, or yearly payment. (HANDLED AS ABOVE)

  • Once selected they create a members profile or page (NO PROBLEM WITH CODE)

  • Once they are signed up that they then return to the homepage where it has no more call to actions and they can access the videos as they please. (NO PROBLEMS)

  • Other areas to consider is the payment process and setting up a recurring payment through the site to bank accounts, the management of members, (can members be added manually without having to sign up for payment)

ANSWER:
Subscriptions directly to bank accounts do not seem like a good think, no one will give you their bank account and even if they did you are on thin ice if you store peoples bank account information inside Wix.

Members can be added manually but it is not good practice but if you want to add members manually go to your site and sign-up a member as Trial and then they will get the welcome email to the mail you entered.

If you do the Trial system as I suggested the manually added members will be asked to pay after the Trial so no payment needs to be setup at first registration.

Hey Lewis -

I hate to hear this happened to you. When something like this happens we at Wix will definitely want to know. You can open a complaint with the arena team here: https://www.wix.com/arena/info/general-support?utm_source=footer

The team takes these incidents very seriously.
Edit: I understand someone from Wix has already reached out to you. =)

Hi Lewis:

Ok I think the way forward for you is to combine a couple of things.

The paid plans functionality relies on you identifying which of your pages are allowed to be accessed by members based on their membership level. I’ll address this for you below in a moment.

Secondly, the functionality that you want, e.g. show call to action, sign up, return to accessible videos should be straight forward to accomplish.

First let me address the paid plan s which I think you may already be familiar with so here is a refresher for any other users finding this post.

Paid plans are reliant on the underlying members functionality. When you configure a paid plan you are essentially establishing a role for your site member. The roles are in terms of the paid for access, in your case UNLIMITED, UNLIMITED YEAR, 1 MONTH FREE TRIAL. There are several different plans that you can configure based on this Wix Article:

Once you have your paid plans you need to create the site pages that you want to tie to the paid plans. This is described here:

So this describes the way to create the pages and limit access. Now the next challenge is how to create a user experience that follows the call to action flow you have outlined.

Here we need to do a few of things:

  1. We need to determine if the page visitor is logged into our site or not. If they are not then we need to show your home page with the call to action options.
  2. If the user is logged in AND the user is a paid or trial member then we need to show the members page allowing access to the members only content.
  3. If the user is logged in and doesn’t have a valid membership, i.e. the their previous membership has expired OR you allow access to non paying member for certain pages to tease them into a trial or purchase, then you want to show the call to action page again.

OK So this is accomplished very easily using the wix-users API. When you access a page you can load the current state of the user who has loaded the page. You can then determine very easily what the classification of the user is and what page the need to be able to load. Here is the code you can add to your home page:

import wixUsers from 'wix-users';

// Execute the loginActions after member plan purchase or login
wixUsers.onLogin(loginActions);

$w.onReady(() => {
    if (wixUsers.currentUser.loggedIn) {
        // execute loginActions() if page is reloaded and user is logged in.
        loginActions();
    }
});

function loginActions() {
     // Get the member pricing plan information
    wixUsers.currentUser.getPricingPlans()
    .then((planList) => {
        // We have one or more plans. So the user is logged in
        // & is a member
        // Check to see if they have a valid current plan
        if (currentPlanIsValid(planList)) {
            showMemberServicesPage();
        } else {
            showCallToActionPage();
        }
    })
    .catch((error) => {
        // If we get an error then either the user is not logged in or
        // they don't have a plan.
        // console.log(error.message); // Uncomment this to see the error message 
        showCallToActionPage();
    });
}

So this is the basic outline of how we check the member privileges. In this example we will only explore a simple membership model where there is one and only one active membership per user. This may need to be adapted based on how sophisticated you need your site to be.

For this example we assume that there is only one plan in the list. So we will assume that the first record in the planList is the one we need to examine. So our currentPlanIsValid() function will look like this:

function currentPlanIsValid(planList) {
    let result = false; // Assume we don't have a valid plan
    // Check to see if we have data to examine
    let planListLength = planList.length;
    if (planListLength && planListLength > 0) {
        // We have something to check. Get the first plan record
        let lastActiveRecord = planList[0];
        let expirationDate = Date.parse(lastActiveRecord.expiryDate);
        let today = Date.now();
        // If today's date is less than (earlier) than 
        // the expiryDate then
        if (today < expirationDate) {
            // the membership is valid
            result = true;
        }
    }
    // Return the result of our assessment
    return result;
}

Ok now we are on the last leg of our solution!
We have two more functions to write. One that shows the members only options and one that shows the call to action options, showMemberServicesPage() and showCallToActionPage() respectively.

There are many different options here. You can use two containers or strips or repeaters on the same page each of which is either collapsed or expanded base upon the options you want to show. Depending on how many services and calls to action you have maintaining this could be a challenge. Another option would be to have separate pages, each of which is loaded once the membership state is known. You could also have a pop up lightBox that loads instead of a new page.

Here are two options for our show page functions.

Option 1:

First, we will assume there are two strips on the page and we will name them memberServicesStrip and callToActionStrip. When you create a strip it defaults to a name like ‘#strip1’. You can rename a strip using the element property panel


This makes our job of expanding and collapsing strips easy:

function showMemberServicesPage() {
    // Collapse the call to action strip
    $w('#callToActionStrip').collapse();
    // Expand memberServices Strip
    $w('#memberServicesStrip').expand();
}

function showCallToActionPage() {
    // Expand the call to action strip 
    $w('#callToActionStrip').expand();
    // Collapse memberServices Strip
    $w('#memberServicesStrip').collapse();
}

=============================================================================
Option 2:

This option uses the wix-location API to load a new page if we need to. With this option we need to include the wix-location API on our page:

import wixLocation from 'wix-location'; 

Once we have done this we can redirect the page if it isn’t the one we want. To use this solution you need to have the same currentPlanIsValid() check on both the Members Only page AND the Call To Action page. The main difference being that the page load directive will only be needed if the loaded page is not the one you want.

For example, the user loads the default home page. This page is the Call To Action page. As the page loads it checks the membership. If the membership is not valid than the page completes loading. If the membership is valid then, before the page completes loading and becomes visible, it redirects to a Members Only page. The Members Only page as it loads checks to see if the membership. if the membership check passes then the page is loaded otherwise the user is redirected to the default home page.

We can use the wix-location API to check which page is loaded to simplify the code and the check. In the snippet below I will assume that our home page is https://www.myHomePage.example.

function showMemberServicesPage() {
    // Are we on the home page 
    if (wixLocation.baseUrl === 'https://www.myHomePage.example') {
        // We need to load the member services page
        wixLocation.to('/memberservices');
    }
} 

function showCallToActionPage() {
    // Are we NOT on the home page
    if (wixLocation.baseUrl !== 'https://www.myHomePage.example') {
        // We need to load the home page     
        wixLocation.to('/');
    }
}

Cheers
Steve

1 Like

Thank you Steve, this is great.

Thank you everyone who has given their input into this situation. :slight_smile:

Thanks Lewis for posting this. This is the exact functionality I was trying to add as well so this thread was hugely helpful. Now to get it to work …