How To Add A Term & Policy On The Vendor Register Page?

Hi



Does some one can tell me How to add a term & policy space on the vendor register page? This page need write the term and policy text and new vendor need click the bottom to accept the store policy.



Thanks in advance!



Franck

Dear Franck,



You may create the checkbox with the text field via Profile Fields, but it will be displayed for all users (vendors and customers).

To make it visible only for the vendors, the code modification is required.

We can make this modification for you. Please check PM.



Best regards, Alt-team.

[quote name='Enew' timestamp='1419458247' post='200873']

Does some one can tell me How to add a term & policy space on the vendor register page? This page need write the term and policy text and new vendor need click the bottom to accept the store policy.



Thanks in advance!

[/quote]



There is no need to hire someone. The modification is quite simple. Please open the design\themes\responsive\templates\views\companies\apply_for_vendor.tpl file and add this code:


```php



{__("vendor_terms_n_conditions")}


```

before this line:

```php
{include file="common/image_verification.tpl" option="use_for_apply_for_vendor_account" align="left"}
```

Then go to [b]Admin panel -> Administration -> Languages -> Translations[/b] and add new [b]vendor_terms_n_conditions[/b] language variable. You can add link to the Terms and Conditions to the value of this language variable.

Hope that helps.

There is one more solution.



Open the file[font=“arial, sans-serif”][color=“#500050”][size=3] [/size][/color][/font]app/controllers/frontend/companies.php



Add this code


// term to use
if (empty($_REQUEST['accept_terms'])) {
fn_save_post_data('user_data', 'company_data');
fn_set_notification('N', __('notice'), 'Please accept the terms and conditions');
return array(CONTROLLER_STATUS_REDIRECT, "companies.apply_for_vendor");
}




After the lines



if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'apply_for_vendor') {
if (Registry::get('settings.Vendors.apply_for_vendor') != 'Y') {
return array(CONTROLLER_STATUS_NO_PAGE);
}




This phrase “Please accept the terms and conditions” you may replace with your own text.



Then we need to add the checkbox to the registration page.



Find the file /design/themes/THEME/templates/views/companies/apply_for_vendor.tpl



Before the lines
{include file="common/image_verification.tpl" option="use_for_apply_for_vendor_account" align="left"}




Add the code ```php



Link to the page on terms to use


```

Here please replace the phrase "Link to the page on terms to use" with your text.
instead of # enter your link with the policy.

Visit the page /admin.php?dispatch=pages.manage , here you can create the page with the terms and policy.

If you already have the page with the policy, you should replace # with the code ```php
{'pages.view&page_id=N'|fn_url:'C'}
``` where the N is the id of the existing page.

Do not forget to clear the cache.

Best regards, Alt-team.

[quote name='eComLabs' timestamp='1419500684' post='200902']

There is no need to hire someone. The modification is quite simple. Please open the design\themes\responsive\templates\views\companies\apply_for_vendor.tpl file and add this code:


```php



{__("vendor_terms_n_conditions")}


```

before this line:

```php
{include file="common/image_verification.tpl" option="use_for_apply_for_vendor_account" align="left"}
```

Then go to [b]Admin panel -> Administration -> Languages -> Translations[/b] and add new [b]vendor_terms_n_conditions[/b] language variable. You can add link to the Terms and Conditions to the value of this language variable.

Hope that helps.
[/quote]Thanks!

[quote name='Alt-team' timestamp='1419505526' post='200914']
There is one more solution.

Open the file[font="arial, sans-serif"][color=#500050][size=3] [/size][/color][/font]app/controllers/frontend/companies.php

Add this code
```php
// term to use
if (empty($_REQUEST['accept_terms'])) {
fn_save_post_data('user_data', 'company_data');
fn_set_notification('N', __('notice'), 'Please accept the terms and conditions');
return array(CONTROLLER_STATUS_REDIRECT, "companies.apply_for_vendor");
}
```

After the lines

```php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'apply_for_vendor') {
if (Registry::get('settings.Vendors.apply_for_vendor') != 'Y') {
return array(CONTROLLER_STATUS_NO_PAGE);
}
```

This phrase "Please accept the terms and conditions" you may replace with your own text.

Then we need to add the checkbox to the registration page.

Find the file /design/themes/THEME/templates/views/companies/apply_for_vendor.tpl

Before the lines ```php
{include file="common/image_verification.tpl" option="use_for_apply_for_vendor_account" align="left"}
```

Add the code ```php

Link to the page on terms to use

```

Here please replace the phrase "Link to the page on terms to use" with your text.
instead of # enter your link with the policy.

Visit the page /admin.php?dispatch=pages.manage , here you can create the page with the terms and policy.

If you already have the page with the policy, you should replace # with the code ```php
{'pages.view&page_id=N'|fn_url:'C'}
``` where the N is the id of the existing page.

Do not forget to clear the cache.

Best regards, Alt-team.
[/quote]Thanks

You are welcome!