Jump to content

2nd TOS


hebergeni

Recommended Posts

one easier option might be to use Additional Domain Fields which the customer can accept these terms during the domains configuration step of the ordering process. :idea:

 

or you could use the existing TOS checkbox for both your Terms, and the additional ccTLD terms - optionally, you could check the cart at checkout to see if it contains a ccTLD and only display the additional text if it does.

 

7uH9yW0.png

 

though your biggest problem with doing that might be that you will have to manually define which TLDs you consider to be ccTLDs - as WHMCS won't know that '.uk' is a ccTLD, but '.com' isn't... or that '.tv' is technically a ccTLD but marketed as a gTLD.

Link to comment
Share on other sites

Hi,

It's helpful so now how can i please put this condition on checkout page instead configurationdomain page please

assuming you're using the standard_cart orderform template, all you should need in checkout.tpl is to change...

 

                    {if $accepttos}
                       <p>
                           <label class="checkbox-inline">
                               <input type="checkbox" name="accepttos" id="accepttos" />
                                
                               {$LANG.ordertosagreement}
                               <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a>
                           </label>
                       </p>
                   {/if}

to...

                    {if $accepttos}
                       <p>
                           <label class="checkbox-inline">
                               <input type="checkbox" name="accepttos" id="accepttos" />
                                
                               {$LANG.ordertosagreement}
                               <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a>
                               {assign cctld array('.co.uk','.org.uk')} 
                               {foreach $domains as $domain}
                                   {assign tld value=$domain.domain|substr:($domain.domain|strpos:".")}
                                   {if $tld|in_array:$cctld}
                                       {assign cctldvalid TRUE}
                                   {/if}
                               {/foreach}
                               {if $cctldvalid} and the ccTLD Terms of Service{/if}
                           </label>
                       </p>
                   {/if}

if there is a ccTLD domain in the cart, then it should add the "and the ccTLD Terms of Service" text to the TOS output... if there are no ccTLDs in the cart, it will not add any additional text. :idea:

 

there are three important things to note with this solution...

 

1. you will need to define your list of ccTLDs in the $cctld array....

 

 {assign cctld array('.co.uk','.org.uk')}

so if you wanted to add .uk, .nl and .be to the list, you would edit it...

 

 {assign cctld array('.co.uk','.org.uk','.uk','.be','.nl')}

the order of the ccTLDs in the array does not matter. :idea:

 

2. if your site uses multiple languages, then you should probably replace " and the ccTLD Terms of Service" with a language string using Language Overrides.

3. you could add a link to your ccTLD Terms of Service by either adding it to the above code, or to the Language Overrides.

Ira9rks.png

I quickly tested the above code on v7.1 beta and it worked fine - I can't see anything in the code that would prevent it from working on v6 or v7 (unless v6 takes exception to how i've used assign, though that can be easily changed by using fuller declarations - but if it works, don't worry about doing that!). :idea:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated