6.4 Sign up page [VUC3]

6.4 Sign up page [VUC3]

Sign up component allows to create a custom page with forms for creating new company accounts in VUC. An example of the sign up is on our demo website callto.net

 

The demo of the sign up page is at https://beta.callto.net/Signup 

 

Plans

Configuration is through the below section in the  VUC's AppSettings.config file. 

<!-- Signup Plan Config -->

 <add key="SC:standardPlanId" value="10"/>

 <add key="SC:premiumPlandId" value="11"/>

 

<add key="SC:planCountryId" value="-1"/>

A user can choose a plan during the signup process. Set the IDs of plans which will be shown. You can set only one ID, in this case only one plan will be shown on the page. 

 

Currencies

To use multiple currencies you need to define plans per currency as per example below:

<!-- Signup Plan Config -->

 <add key="PLN.SC:standardPlanId" value="10"/>

 <add key="PLN.SC:premiumPlandId" value="11"/>

 

 

<!-- Signup Plan Config -->

 <add key="USD.SC:standardPlanId" value="10"/>

 <add key="USD.SC:premiumPlandId" value="11"/>

 

The plan keys are prefixed with the currency code. When you open the signup page (for example using a link from your website) add the country parameter with appropriate country code:

/Signup?country=PLN

or 

/Signup?country=USD

For each of the requests different plans will be shown. 

 

Free Trial Signup

 

In the AppSettings.conifg add the following key: PbxSignupPlanFreeId


For different countries you can add a country prefix as in the example below:

 

<add key="PbxSignupPlanFreeId" value="1" />

<add key="PLN.PbxSignupPlanFreeId" value="11" />

<add key="USD.PbxSignupPlanFreeId" value="21" />

Confirmation email 

 

The email template must contain the activation link:

/VUC/Signup?action=activate&token=[SIGNUP_TOKEN]

 

The location of the template is defined by the following key:

<add key="PbxSignupRegisterMessageBody" value="file://VUC/Content/CompanySignup/confirmation_email.html" />

 

email_confirm.html  - edit this file to include additional information in the email body.

 

 <html>

<head>

    <link type="text/css" rel="stylesheet" href="https://fast.fonts.net/cssapi/6b23d5b1-fcc7-4981-ba3d-ac02626f9d02.css"/>

    <style>

    body {

        font-family: 'Solomon W01', sans-serif;

        color: #2b2b2b;

    }

    a {

        color: #00b2ff;

        text-decoration: none;

    }

     

    </style>

</head>

<body>

     

    <p>Hello [FIRST_NAME],</p>

    <p style="margin-top: 35px;">To complete the sign up please click the activation link:</p>

    <p><a href="https://YourServer/VUC/Signup?action=activate&token=[SIGNUP_TOKEN]">https://YourServer/VUC/Signup?action=activate&token=[SIGNUP_TOKEN]</a></p>

     

    <p style="margin-top: 35px;">Best regards,</p>

    <p>YourServer team</p>

</body>

</html>

 

Paid/Subscription Signup

To offer paid subscriptions you need to define a payment provider using the keys below:

 

<add key="PbxSignupPayment" value="PayPalStandardProvider" />

<add key="PbxSignupTransactionType" value="subscription" />

 NOTE: provider must support Recurring payments (subscriptions) and has to be supported by the OnlineShop module. 

OnlineShop redirects.config

 

   

    <!-- Signup -->

<redirect status="success" operation="subscription">

  <from>https://Domain/VUC/Signup</from>

  <to>https://Domain/Signup?action=summary&amp;status=success&amp;currency=EUR</to>

</redirect>

<redirect status="cancel" operation="subscription">

  <from>VUC/Signup</from>

  <to>https://Domain/Signup?action=summary&amp;status=cancel&amp;currency=EUR</to>

</redirect>

 

<redirect status="success" operation="subscription">

      <from>https://Domain/VUC</from>

      <to>https://Domain/VUC/#/Subscription</to>

</redirect>

<redirect status="cancel" operation="subscription">

  <from>https://Domain/VUC</from>

  <to>https://Domain/VUC/#/Subscription</to>

</redirect>

 

 

For different currencies you need to add keys for each currency and set the link to the onlineshop instance which is  configured for this currency.

 

<add key="OnlineShopUrl" value="http://localhost/Onlineshop/" />

<add key="PLN.OnlineShopUrl" value="http://localhost/OnlineshopPLN/" />

<add key="USD.OnlineShopUrl" value="http://localhost/Onlineshop/" />

<add key="EUR.OnlineShopUrl" value="http://localhost/OnlineshopEUR/" />

 

Customizacja:

Pliki sa edytowalne bez kompilacji. Błedy HTML moga powodować brak generowania widoku.

CSS: /Content/Signup/style.css

 

CSHTML (widoki) /Views/Signup/

 

Opis plików:

Index.cshtml - wczytuje paramtery requestu. Domyślnie renderuje jako partial _signup.cshml. 

 

_signup.cshtml - widok signupu (partial page)

_summary.cshml - onlineshop transaction return (partial page)

_activate.cshtml - free trial link activation page (partial page)

 

_layout.cshtml - layout stron (master)

 

 

Przed updated nalezy zrobic backup modyfikowanych plikow i przywrocic po instalacji.

 

 

Addional Signup's

Zrobic kopie plików _signup.cshml np. _signupXX.cshml, _signupScript.cshml _signupScriptXX.cshml

W pliku Index.cshml doadc 

 

@if (action == "nameofyouraction"){

  @Html.Partial("_signupXX")

}

 

W _SignupXX.cshml

Zmienic linie

 

@Html.Partial("_signupScript")

 

na

 

@Html.Partial("_signupScriptXX")

 

 

W _signupScriptXX.cshml modyfikujemy wg wlanych wymagan wartosci :

np.

 

var standardPlanId = "130"; // fixed value not from appSettings

    var premiumPlanId = "131"; //fixed value

 

 

 

Dodatkowy signup dospteny z URL /Signup?action=NameOfYourAction

 

Problemy:

 

 ERROR [CompanyTrialSignupController] System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

 Złe ID FreePlanPack

 

 

<add key="PbxSignupPlanFreeId" value="1" />

<add key="PbxSignupFreeMaxClients" value="5" />

 

 

RROR [CompanyTrialSignupController] System.Exception: transaction is not a subscription

 

 

<add key="PbxSubscriptionType" value="plan_pack_subscription" />

 <add key="PbxSignupPlanFreeId" value="1" />