Make Terms and Condition configurable for a Domain

Updating the Terms & Condition PDF link in the signup form in such a way that should be configurable from netsuite .

Created a configuration field “TermsAndCondition_Title”.

{
    "type": "object",
    "subtab":{
        "id": "TermsAndCondition_subtab",
        "title": "TermsAndCondition_Title",
        "group":"Extensions"
    },
    "properties": { 
        "TermsAndCondition.config": {
            "group": "extensions",
            "subtab": "TermsAndCondition_subtab",
            "type": "string",
            "title": "TermsAndCondition_Title",
            "description": "Update Pdf link ",
            "default": "Default config example"
        }
    }
}

Uploaded the Terms and Condition PDF link in the path :

Web Site Hosting Files > Live Hosting Files > SSP Applications > THERMOGARD PTY LTD_5742647 > Development-USA > Terms and Conditions file

In .js file

_.extend(LoginRegisterRegisterView.prototype, {
template: jj_termsandcondition_termsandcondition_tpl,
getContext: _.wrap(LoginRegisterRegisterView.prototype.getContext, function (fn) {
var context = fn.apply(this, _.toArray(arguments).slice(1));
var TermsAndConditionHTML = SC.CONFIGURATION.TermsAndCondition.config
//console.log(TermsAndConditionHTML)
context.TermsAndConditionHTML = TermsAndConditionHTML;
//console.log(context, 'contex')
return context;

})

})

Update the .tpl file

<a target="_blank" href = "{{TermsAndConditionHTML}}" >Terms and Conditions</a>

Leave a comment

Your email address will not be published. Required fields are marked *