Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

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

 
  • Enew
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 192 posts

Posted 24 December 2014 - 09:57 PM #1

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

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2841 posts

Posted 25 December 2014 - 09:23 AM #2

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.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22171 posts

Posted 25 December 2014 - 09:44 AM #3

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!


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:

<div class="ty-control-group ty-checkout__terms">
	<div class="cm-field-container">
	 <label for="id_accept_terms" class="cm-check-agreement cm-required"><input type="checkbox" id="id_accept_terms" name="accept_terms" value="Y" class="cm-agreement checkbox" />{__("vendor_terms_n_conditions")}</label>
	</div>
   </div>

before this line:

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

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

Hope that helps.
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2841 posts

Posted 25 December 2014 - 11:05 AM #4

There is one more solution.

Open the fileapp/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
<div class="control-group">
   <input type="checkbox" name="accept_terms"  value="1" class="checkbox" /> <a href="#">Link to the page on terms to use</a>
</div>

Here please replace the phrase "Link to the page on terms to use" with your text.
<a href="#"> 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
{'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.

ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • Enew
  • Senior Member
  • Members
  • Join Date: 22-Oct 14
  • 192 posts

Posted 05 January 2015 - 07:04 PM #5

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:

<div class="ty-control-group ty-checkout__terms">
	<div class="cm-field-container">
	 <label for="id_accept_terms" class="cm-check-agreement cm-required"><input type="checkbox" id="id_accept_terms" name="accept_terms" value="Y" class="cm-agreement checkbox" />{__("vendor_terms_n_conditions")}</label>
	</div>
   </div>

before this line:

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

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

Hope that helps.

Thanks!

There is one more solution.

Open the fileapp/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
<div class="control-group">
   <input type="checkbox" name="accept_terms"  value="1" class="checkbox" /> <a href="#">Link to the page on terms to use</a>
</div>

Here please replace the phrase "Link to the page on terms to use" with your text.
<a href="#"> 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
{'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.

Thanks

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22171 posts

Posted 06 January 2015 - 09:26 AM #6

You are welcome!
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)