WHMCS Support Manager WHMCS John Posted May 14, 2010 WHMCS Support Manager Share Posted May 14, 2010 This simple template addition replaces the Terms of Service link on the checkout page with a text box into which you can paste your company's wording so that your clients can read it without navigating away from the order form. Clients are still required to tick the checkbox to indicate they have read the terms. Open templates/orderforms/*your active template*/viewcart.tpl Find: {if $accepttos} <p align="center"> <input type="checkbox" name="accepttos" id="accepttos" /> <label for="accepttos">{$LANG.ordertosagreement} <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a></label> <p> {/if} Replace with: {if $accepttos} <p align="center"> <textarea rows="10" cols="100" readonly="readonly"> ***INSERT YOUR TERMS AND CONDITIONS HERE IN PLAIN TEXT*** </textarea> </p><p align="center"> <input type="checkbox" name="accepttos" id="accepttos" /> <label for="accepttos">{$LANG.ordertosagreement} {$LANG.ordertos} above.</label> </p> {/if} Replace "***INSERT YOUR TERMS AND CONDITIONS HERE IN PLAIN TEXT***" with your own terms of service wording. Upload and you're done! Update: 24/05/2010 - Text area is no longer editable by the visitor. (Thanks to gs-liam). 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted May 15, 2010 Share Posted May 15, 2010 Cheers John 0 Quote Link to comment Share on other sites More sharing options...
GNS_Harrison Posted May 22, 2010 Share Posted May 22, 2010 thanks! alot 0 Quote Link to comment Share on other sites More sharing options...
rider Posted May 22, 2010 Share Posted May 22, 2010 This code is usefull but customer can modify the text. That need to don't allow this 0 Quote Link to comment Share on other sites More sharing options...
EasyWHMCS Posted May 23, 2010 Share Posted May 23, 2010 {if $accepttos} <p align="center"> <textarea rows="10" cols="100" readonly="readonly"> ***INSERT YOUR TERMS AND CONDITIONS HERE IN PLAIN TEXT*** </textarea> </p><p align="center"> <input type="checkbox" name="accepttos" id="accepttos" /> <label for="accepttos">{$LANG.ordertosagreement} {$LANG.ordertos} above.</label> </p> {/if} If you use this code instead of what John has posted, your clients will not be able to edit the text 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 23, 2010 Share Posted May 23, 2010 Why make it a text area at all? As long as the TOS checkbox is within the form, it still works. I'm using this: <div style="border:1px black solid; width:600px; height:200px; overflow:auto;"> {include file='/home/user/www/terms.html'} <p align="center"><input type="checkbox" name="accepttos" id="accepttos" /> <labelfor="accepttos">{$LANG.ordertosagreement}{$LANG.ordertos} </label><p> </div> It's in a scrolling DIV, and as it's text on the page, they can't edit. Bonus is that it's in a separate file so easily maintained, not overwritten by updates, and can have formatting. 0 Quote Link to comment Share on other sites More sharing options...
mediastream Posted August 19, 2010 Share Posted August 19, 2010 Why make it a text area at all? As long as the TOS checkbox is within the form, it still works. I'm using this: <div style="border:1px black solid; width:600px; height:200px; overflow:auto;"> {include file='/home/user/www/terms.html'} <p align="center"><input type="checkbox" name="accepttos" id="accepttos" /> <labelfor="accepttos">{$LANG.ordertosagreement}{$LANG.ordertos} </label><p> </div> It's in a scrolling DIV, and as it's text on the page, they can't edit. Bonus is that it's in a separate file so easily maintained, not overwritten by updates, and can have formatting. nice one bear!! thanks everyone. implemented looks great 0 Quote Link to comment Share on other sites More sharing options...
trader Posted October 6, 2010 Share Posted October 6, 2010 Thanks Guys, I have also found this post very useful 0 Quote Link to comment Share on other sites More sharing options...
fasthostonline Posted October 22, 2010 Share Posted October 22, 2010 thx guys, it very2 helpfull for me 0 Quote Link to comment Share on other sites More sharing options...
MikeP Posted December 3, 2010 Share Posted December 3, 2010 Why only plain text? 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 4, 2010 Share Posted December 4, 2010 Thanks John for starting this and to gs-liam and bear for the followups. I've implemented bear's version but pulled the checkbox out of the div so that those who don't wish to read and scroll can simply accept the terms and check out. Great work everyone! Rick 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 4, 2010 Share Posted December 4, 2010 Why only plain text? It's in a scrolling DIV, and as it's text on the page, they can't edit. Bonus is that it's in a separate file so easily maintained, not overwritten by updates, and can have formatting. If it's not in a form field, you can indeed format it. 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 4, 2010 Share Posted December 4, 2010 Bear, your contributions to the WHMCS cause have merited a special badge my friend. http://img405.imageshack.us/img405/6532/bearb.gif Rick 0 Quote Link to comment Share on other sites More sharing options...
bear Posted December 4, 2010 Share Posted December 4, 2010 Spiffy, thanks! 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 4, 2010 Share Posted December 4, 2010 Spiffy, thanks! You're welcome, mate. Keep all the helpful modification tips coming as they are quite helpful. Rick 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted December 8, 2010 Share Posted December 8, 2010 Can this be specified on a per-product basis? Different terms per product? 0 Quote Link to comment Share on other sites More sharing options...
peaceofmind Posted December 31, 2010 Share Posted December 31, 2010 Can this be specified on a per-product basis? Different terms per product? I'd like to know the answer to that as well. Marcy 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 31, 2010 Share Posted December 31, 2010 Can this be specified on a per-product basis? Different terms per product? The simplest solution would be to put the terms for all products within a singe TOS, otherwise you'd have to do some custom coding to get it to pull a separate TOS per product. Cheers, Rick 0 Quote Link to comment Share on other sites More sharing options...
railto Posted February 23, 2011 Share Posted February 23, 2011 Why make it a text area at all? As long as the TOS checkbox is within the form, it still works. I'm using this: <div style="border:1px black solid; width:600px; height:200px; overflow:auto;"> {include file='/home/user/www/terms.html'} <p align="center"><input type="checkbox" name="accepttos" id="accepttos" /> <labelfor="accepttos">{$LANG.ordertosagreement}{$LANG.ordertos} </label><p> </div> It's in a scrolling DIV, and as it's text on the page, they can't edit. Bonus is that it's in a separate file so easily maintained, not overwritten by updates, and can have formatting. Thanks bear that is exactly the way I wanted it to rock, thanks so much 0 Quote Link to comment Share on other sites More sharing options...
Sel_888 Posted March 6, 2011 Share Posted March 6, 2011 Awesome!!! worked like a charm, just that I make sure that I have an < h3 > titling above the div so that I tell people that they have to scroll to the bottom of the TOS to check the box in order to continue their order.... 0 Quote Link to comment Share on other sites More sharing options...
hostand Posted March 22, 2011 Share Posted March 22, 2011 What did i do wrong that my terms and conditions are not showing up?, i repalce the below code on the viewcart.tpl of the boxes folder as thats what i am using. <div style="border:1px black solid; width:600px; height:200px; overflow:auto;"> {include file='/public_html/billing/templates/orderforms/boxes/tos.html'} <p align="center"><input type="checkbox" name="accepttos" id="accepttos" /> <labelfor="accepttos">{$LANG.ordertosagreement}{$LANG.ordertos} </label> <p> </div> 0 Quote Link to comment Share on other sites More sharing options...
bear Posted March 23, 2011 Share Posted March 23, 2011 '/public_html/billing/templates/orderforms/boxes/tos.html' That doesn't appear to be the full address. Should be /home/user/public_html....or at the least relative to the doc root or file that's calling it. /billing/... ../whatever... 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted March 23, 2011 Share Posted March 23, 2011 for in the cart templates it is like this {include file='$template/tos.html'} 0 Quote Link to comment Share on other sites More sharing options...
hostand Posted March 23, 2011 Share Posted March 23, 2011 thank you it worked, with full path, didn't with $template. Would it be too much to ask how i can have the I agree check box outside of the DIV? so they can see it easily? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted March 23, 2011 Share Posted March 23, 2011 The file would need to have been in your normal template directory eg.. templates/portal/tos.html if it is in the cart directory, your case using the boxes theme would be {include file="orderforms/boxes/tos.html"} The path is relative to the templates directory Else as bear sugested use the absolute full path 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.